Hey,
I want to optimize some code, and wanted to only redraw the parts of the scene that need redrawing (2d graphics only, so i can break it into regions easily). Due to the SwapBuffers, this seems to break. What would be the best way to implement this?
Only Redraw if updated
You can probably swap, then blit the front framebuffer to the back framebuffer and then draw on top of that.
Maybe something like this, haven't tested it though.
glSwapBuffers();
glReadBuffer(GL_FRONT);
glDrawBuffer(GL_BACK);
glBlitFramebuffer(...);
Maybe something like this, haven't tested it though.
glSwapBuffers();
glReadBuffer(GL_FRONT);
glDrawBuffer(GL_BACK);
glBlitFramebuffer(...);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement