PDA

View Full Version : texture to stay within the window?



Haroon
04-07-2012, 11:52 AM
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?

BionicBytes
04-07-2012, 12:38 PM
Are you recalculating new texture coordinates and or a texture matrix?

Haroon
04-07-2012, 12:50 PM
I'm not sure, I'm just updating the value of gltranslatef() and glscalef() to pan and zoom. and redisplaying it.

V-man
04-08-2012, 03:31 AM
Sounds like you want to render a
http://www.opengl.org/wiki/FAQ#Fullscreen_quad