Jump to content
  • Advertisement
Sign in to follow this  
anist

OpenGL render to texture problems

This topic is 4878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

when rendering to a texture using glCopyTexImage2D, the pixels obscured by other windows remain undefined. this is a problem when you have windows overlaying your OpenGL window as the boxes appear within your texture. does anyone know a way around this?

Share this post


Link to post
Share on other sites
Advertisement
Use invisible buffers (i.e pbuffers). Google "pbuffer".

http://www.codesampler.com/oglsrc.htm#Off-screen%20Rendering%20Using%20P-Buffers%20(WGL_ARB_pbuffer,%20WGL_ARB_pixel_format)

Check out the above link.

pbuffer aka pixel buffers are just like frame buffers with the exception that they are invisible. Since they are invisible they are not constrained to resolution of the screen or any other windows that are displayed on top of the OpenGL window.

Share this post


Link to post
Share on other sites
just a quick note, while they can be handy and might remain so in the future, dont get too attached to pbuffer, for most render-to-texture functionality you'll be wanting to swap to the framebuffer_object extensions which is completed and awaiting driver support (NV have a driver about with alpha support for it, but I wouldnt recommend it atm, ATI currently dont support it).

FBO removes alot of the problems you'll have with pbuffers and should be faster due to lack of a context switch.

Share this post


Link to post
Share on other sites
I have the NV 75.90a driver but did not install it. yes, I would wait for a more stable release but for the time being that all we got.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!