Jump to content
  • Advertisement
Sign in to follow this  
gleamest

OpenGL multiple layers in OpenGL?

This topic is 4389 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

I want to add rectangle selection to my application. I would like to draw a semi-transparent rectangle while mouse is moved but I do not want to render again all the scene objects. It's like to draw in one layer, letting intact the another layer. Is there any way to make it? I have heard something like aux_buffers, but I don't know how to use it. Could anybody help me, please??? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Never have made something like that myself, but the following things come to my mind:

Render the scene to a texture, render the texture window/screen filled, and render the selection above it. Rendering to a texture could be done in several ways. The slowest is to do a glReadPixels and making a texture manually from it. Next, there are some render-to-texture extensions out there. The best way nowadays may be to use PBO (pixel buffer objects). However, you don't have to extract the scene as a background for every frame, so also the less speedy ways may be sufficient.

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!