View Full Version : glRasterPos2f moves Backbuffer?!?

04-04-2015, 08:23 AM

I have a 2D image. I want to output text to a certain position with glRasterPos2f and glBitmap. Fortunately the text is painted on the right position in the backbuffer. Unfortunately the whole content of the backbuffer is moved when I use swapbuffers. The cause seems to be glRasterPos2f. I tried this but it doesn't work:

VAR OldPosition:ARRAY[0..3]OF Single;
glGetFloatv(GL_CURRENT_RASTER_POSITION,@OldPositio n); //remember old RasterPos?!?
glRasterPos2f(CharX,CharY); //Move to char position
glBitmap(8,8,0,0,Feed,0,@CharBitmap); //Print the char
glRasterPos3fv(@OldPosition); //Try to undo the movement

Thanks for any hint and best regards, Bernd

04-04-2015, 12:07 PM
Ah, I saw that those coordinates differ. So glGetFloatV(GL_CURRENT_RASTER_POSITION,@OldPositio n) returns window coordinates. Whereas glRasterPos will translate the given coords. Very confusing.