PDA

View Full Version : HElp with Panning



PG
09-23-2001, 08:08 PM
Hi
I was wondering if someone could help me with a panning function that i need to write.
Does anyone have any idea of how to write a panning function in openGL? I think it should not be too hard but the touble is with the raster position. If the raster position (which tells gl where to draw the pic) is not on the screen, then the pic is not drawn at all. But, if you want to pan, then it seems that you WANT to move the pic (and thus raster pos) around. Does anyone have any ideas?

Thanks

chrisATI
09-24-2001, 05:50 PM
Originally posted by PG:
Hi
I was wondering if someone could help me with a panning function that i need to write.
Does anyone have any idea of how to write a panning function in openGL? I think it should not be too hard but the touble is with the raster position. If the raster position (which tells gl where to draw the pic) is not on the screen, then the pic is not drawn at all. But, if you want to pan, then it seems that you WANT to move the pic (and thus raster pos) around. Does anyone have any ideas?

Thanks

I'm not sure if I completely understand your question but if you are trying to pan the camera around your scene then you must transform all the scene geometry. For example, if you'd like your scene to move past the camera you would translate the scene geometry using glTranslate.