Jump to content
  • Advertisement
Sign in to follow this  
inbgche

[OpenGL]Save frame buffer and use that later.

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

In my game, camera doesn't move around at some state. It means that 3D scene doesn't change except some 2D UI. So, I think if I can save the 3D scene's frame buffer data, and render the saved 2D scene instead of full 3D scene, it will be faster Yes, surely, I should update 2D UI, but I do not render full 3D background. In OpenGL, Is it possible? some say, you can use glCopyTexImages(), or some say glCopyPixels()... But, Can I use those functions with updating 2D UI. I mean background image is save 2D scene, and at the same time, 2D UI should be updated and drawn on the scene. And the save 2D scene is captured when the state is started not every frame. Any comments will be helpful. : )

Share this post


Link to post
Share on other sites
Advertisement
If your video card supports multitexturing, you can use glActiveTexture to set a texture for render-to-texture. Then you just render to that texture and use it for whatever.

Keep in mind that this is not supported by default under Windows' GL implementation so you'll have to obtain the function pointer to it first at program init (google for PFNGLACTIVETEXTUREPROC to find the code you'll need for this, I don't have it on hand).

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!