HElp with Panning

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

Originally posted by PG:
[b]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[/b]

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.