Browse Source

Flush changes to the current FBO first before cleaning up a rendersurface from other FBOs.

Lasse Öörni 14 years ago
parent
commit
961f65b467
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Engine/Graphics/OpenGL/OGLGraphics.cpp

+ 3 - 0
Engine/Graphics/OpenGL/OGLGraphics.cpp

@@ -1764,6 +1764,9 @@ void Graphics::CleanupRenderSurface(RenderSurface* surface)
     if (!surface)
         return;
     
+    // Flush pending FBO changes first if any
+    CommitFramebuffer();
+    
     unsigned currentFbo = impl_->boundFbo_;
     
     // Go through all FBOs and clean up the surface from them