Export to GitHub

glextensions - GL_ARB_window_pos.wiki


Contents

  • Dependencies
  • Overview
  • New Procedures and Functions
  • New Tokens
  • Errors
  • New State
  • New Implementation Dependent State

Dependencies

OpenGL 1.0 is required.

The extension is written against the OpenGL 1.3 Specification

GL_EXT_fog_coord effects the definition of this extension.

GL_EXT_secondary_color effects the definition of this extension.

Overview

In order to set the current raster position to a specific window coordinate with the RasterPos command, the modelview matrix, projection matrix and viewport must be set very carefully. Furthermore, if the desired window coordinate is outside of the window's bounds one must rely on a subtle side-effect of the Bitmap command in order to avoid frustum clipping.

This extension provides a set of functions to directly set the current raster position in window coordinates, bypassing the modelview matrix, the projection matrix and the viewport-to-window mapping. Furthermore, clip testing is not performed, so that the current raster position is always valid.

This greatly simplifies the process of setting the current raster position to a specific window coordinate prior to calling DrawPixels, CopyPixels or Bitmap. Many matrix operations can be avoided when mixing 2D and 3D rendering.

New Procedures and Functions

``` void WindowPos2dARB(double x, double y) void WindowPos2fARB(float x, float y) void WindowPos2iARB(int x, int y) void WindowPos2sARB(short x, short y)

void WindowPos2dvARB(const double *p) void WindowPos2fvARB(const float *p) void WindowPos2ivARB(const int *p) void WindowPos2svARB(const short *p)

void WindowPos3dARB(double x, double y, double z) void WindowPos3fARB(float x, float y, float z) void WindowPos3iARB(int x, int y, int z) void WindowPos3sARB(short x, short y, short z)

void WindowPos3dvARB(const double *p) void WindowPos3fvARB(const float *p) void WindowPos3ivARB(const int *p) void WindowPos3svARB(const short *p) ```

New Tokens

none

Errors

INVALID_OPERATION is generated if WindowPosARB is called betweeen Begin and End.

New State

None.

New Implementation Dependent State

None.