I have an event-based app. I want to swap the buffer any time the window gets covered up by another window. Nothing has changed. If I continually swap the buffers, the screen goes gray. Is there a way to refresh the front buffer without clearing the back buffer, so I can just keep refreshing it without having to redraw?
Instead of this:
Render
Swap
Repeat
Just this:
Swap
Repeat