Blit framebuf contents when resizing.
This avoids a blink when sizing up.
This commit is contained in:
parent
32439bc006
commit
d03397f056
1 changed files with 6 additions and 0 deletions
|
@ -879,6 +879,12 @@ void FramebufferManager::DoSetRenderFrameBuffer() {
|
|||
vfb->fbo = fbo_create(vfb->renderWidth, vfb->renderHeight, 1, true, vfb->colorDepth);
|
||||
if (vfb->fbo) {
|
||||
fbo_bind_as_render_target(vfb->fbo);
|
||||
|
||||
if (destroyVfb) {
|
||||
// Copy over the contents of the framebuffer we're replacing.
|
||||
BlitFramebuffer_(vfb, 0, 0, destroyVfb, 0, 0, vfb->width, vfb->height, 0);
|
||||
fbo_bind_as_render_target(vfb->fbo);
|
||||
}
|
||||
} else {
|
||||
ERROR_LOG(SCEGE, "Error creating FBO! %i x %i", vfb->renderWidth, vfb->renderHeight);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue