From 94476fd1f0e402a237f1b4cf5d77347a7ec4f682 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 4 Apr 2018 21:46:01 +0200 Subject: [PATCH] glgsg: fix invalid operation error with multisample FBO Panda is forgetting to reset the current FBO when resolving multisamples. --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 43f3dbd809..35daa0b225 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -1767,6 +1767,7 @@ resolve_multisamples() { } glgsg->_glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, fbo); glgsg->_glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, _fbo_multisample); + glgsg->_current_fbo = fbo; // If the depth buffer is shared, resolve it only on the last to render FBO. bool do_depth_blit = false;