View Full Version : glRasterPos
08-06-2001, 05:25 AM
By default glRasterPos() is supposed to go to 0,0 window coordinates. Now I've got a program that never calls glRasterPos() so everything should be drawing in the lower left corner of the window. Problem is that it doesn't.
Does anyone know of anything that would change a window so that the lower left corner is no longer 0,0 in window coordinates?
08-06-2001, 05:46 AM
The raster position is treated as a object as well. So a simple glTranslatef() will make the leftlower corner no longer (0, 0).
08-06-2001, 06:06 AM
But that's only if you make a call to glRasterPos. Like I said the app I'm looking at never calls glRasterPos. We should just be using the default window coordinates of 0,0. So why would a glCopyPixel() not start at the lower left corner?
08-06-2001, 06:13 AM
I don't think so.
You can try glTranslatef(10, 10, -100),
then use glRasterPos2i(0, 0), and then
draw an object by rastering. I am pretty
sure that object will not be display at
the left-lower corner.
08-06-2001, 06:17 AM
I understand what you mean.
Yes, you didn't call glRasterPos(). But you must have call glTranslatef, I think. It is glTranslatef modify the raster position. So you got your object not displaying at left-lower corner even though you never called glRasterPos().
08-06-2001, 06:38 AM
Yup. If I put in a glRasterPos() everything works fine (ie the way I expect and as you explained).
It's only when I don't call glRasterPos() which I think should mean use the lower left corner, but it doesn't.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.