Sign in to follow this  

[OpenGL]Save frame buffer and use that later.

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

This topic is 4228 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this