texture to stay within the window?

I have a bmp texture on the window, I’m translating (panning) and zooming the image using the keys.

I would like the texture (image) to stay within the window, even if the size of the texture is larger than the window size.

Could someone advise please?

Are you recalculating new texture coordinates and or a texture matrix?

I’m not sure, I’m just updating the value of gltranslatef() and glscalef() to pan and zoom. and redisplaying it.

Sounds like you want to render a
http://www.opengl.org/wiki/FAQ#Fullscreen_quad