Tuesday, July 17, 2007

Camera, Input, GUI (II)

Raster Position
The OpenGL raster position refers to the drawing position relative to window coordinates for pixel and bitmap write operations. The raster position can be specified by using the function glRasterPos2d() (or glRasterPos2f(), glRasterPos2i(), glRasterPos2s(), etc. for that matter).

The glRasterPos2d function takes in 2 parameters (x,y).
This specifies the raster position.

Thus, by calling 'glRasterPos2d(200,100)', any bitmap or pixel drawings will be position at the point (200,100).


The function glWindowPos() accomplishes the same thing as glRasterPos2d(). However, it's values are neither transformed by the current modelview and projection matrices, nor by the viewport-to-window transform.

The modified project can be found: http://www.brankenonline.com/gdev_spacesimulator.zip

No comments: