PDA

View Full Version : Want to use back buffer as a texture, but size isn't 2^n



12-19-2004, 04:47 PM
I am wanting to create a 'TV' object that will capture the current buffer from a gluLookAt position and display it, via a texture mapping over a quad. However the framebuffer isn't a 64,128,256,512 etc format. How would I attempt to do this?

MikeC
12-19-2004, 05:19 PM
Render the TV camera view to a viewport with power-of-two dimensions, grab the contents of that viewport into a texture with glCopyTexSubImage2d, switch back to a full-screen viewport, render scene including TV.

Alternatively there are extensions that allow non-power-of-two textures, but they aren't supported everywhere and have some limitations.

12-19-2004, 06:15 PM
Wow you are very nice to reply so quickly!

I will try this. Thanks!