View Full Version : Can I use backbuffer as a texture? How to do?
02-27-2003, 11:31 PM
I want to use part of my render image as a texture to simulate mirror effect, what shall I do.
Have a look at glCopyTex(Sub)Image2D.
02-28-2003, 04:41 AM
(will give performanec problems on some cards)
03-02-2003, 10:23 AM
If you are sure that your window won't be obscured by menus or dialog boxes,during the rendering of the scene you wish to grab, you'll be able to use the backbuffer as a source for you texture using glCopyTexSubImage2D. If however there is the potential for menus/dialogs obscuring portions of the display then depending upon the OpenGL driver you could suffer from pixel ownership problems, and thus cannot rely on the contents of the backbuffer not having "holes" where the dialogs are.
Your best bet would probably be to use PBuffers, or render to texture if they are supported, Or make sure that the dialogs/menus don't obscure your canvas.
03-03-2003, 06:23 AM
Thanks, but glCopyTex(Sub)Image2D and render to texture can't deal with 1024x768 image, it only support 1024,512,256...
03-03-2003, 06:34 AM
Then either use WGL_NV_render_texture_rectangle or use a 1024x1024 texture and adjust your texture coordinates appropriately to only use 1024x768.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.