Jump to content
  • Advertisement
Sign in to follow this  
Lode

OpenGL Remembering the screen

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

How can I, with OpenGL, do something like this? First a complex scene is drawn on the screen. Then, let OpenGL remember this screen. Then, draw something else on top of this screen (a window, for example). Then, bring back the scene it remembered (without the window on top of it). Is there a FAST way to do this, without having to redraw the scene polygon by polygon? I want somehow to be able to save the current screen and draw it back quickly at any time, without doing something like checking every pixel or polygon. Something like saving the current screen to a texture and then drawing that texture maybe, but I don't know how to do that and if it's the best way. I'm using OpenGL combined with SDL by the way, I don't know whether or not that's relevant.

Share this post


Link to post
Share on other sites
Advertisement
Without re-drawing the scene, you'll probably just have to copy your current screen buffer to an offscreen buffer, render your window on top and then copy the offscreen buffer back. You may even be able to limit the amount of copying by specifying a viewport the same size and position as the window you intend to draw.

Share this post


Link to post
Share on other sites
How to copy the screenbuffer and draw it again? Is there some way to let this all happen inside the videocard?

Share this post


Link to post
Share on other sites
U can use the glReadPixels command to copy parts of your FRAME BUFFER into an array. C if that works out .. .This copy will not be stored on Video Memory however .. I really dunno what sort application u are making .. .specyfying that may help

Share this post


Link to post
Share on other sites
as well as rendering to a texture there is an extension
buffer_region (or someit)
it lets u store the screen (color+depth) in an offscreen buffer to be drawn back quickly when u want

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!