• Advertisement
Sign in to follow this  

Double Buffering Implementation

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

Is the implementation of double buffering somehow defined (Swapping vs. copying buffers) ? (I only want to redraw things on the screen that have changed.)

Share this post


Link to post
Share on other sites
Advertisement
Not that I am aware of. But instead you can choose to directly do that:
Don't clear the whole screen each frame - just clear the area you wish to redraw then redraw it before swapping.
(so just cut of the glClear(GL_COLOR_BUFFER_BIT) & clear the area you wish to redraw manually & just redraw that bit)
Be aware, though, that the surrounding area will continue to flip between the last 2 frames so you'll have to make 2 frames identical before deciding to leave that area drawn for a while while you update specific areas of the screen.
Also you may still have to redraw the whole thing if the os obscures the view of the window. not sure

Share this post


Link to post
Share on other sites
> Be aware, though, that the surrounding area will continue to flip between the
> last 2 frames so you'll have to make 2 frames identical before deciding to leave
> that area drawn for a while while you update specific areas of the screen.

This was my problem. Obviously the solution is that easy. *duh*

Thanks. :)

Share this post


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

  • Advertisement