PDA

View Full Version : location of a bitmap with windows coordinates



08-01-2001, 11:33 AM
Hi, hope someone can help me:

The problem I've got is when I try to draw a bitmap that always has to be shown in front of my 3d graphic, like a watermark.

I've used glDrawPixel, but when I use glRasterPos, the bitmap moves with my 3D coordinates.

If I use only glDrawPixel without glRasterPos the bitmap is placed on 0,0 window coordinate. My question is: Is there any other function that can help me to move what glDrawPixels draws to another window coordinate?

DFrey
08-01-2001, 12:35 PM
You can only use glRasterPos to set the location. However, you must also remember that the raster position is transformed like any other vertex, so you have to set the projection and modelview matrices. I figure the easiest way would be to set the projection matrix to an orthographic projection and set the modelview matrix to identity, and then set the raster position.
Of course you must reset your matrices afterward back to what they were.