Parcourir la source

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

Lasse Öörni il y a 14 ans
Parent
commit
961f65b467
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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)
     if (!surface)
         return;
         return;
     
     
+    // Flush pending FBO changes first if any
+    CommitFramebuffer();
+    
     unsigned currentFbo = impl_->boundFbo_;
     unsigned currentFbo = impl_->boundFbo_;
     
     
     // Go through all FBOs and clean up the surface from them
     // Go through all FBOs and clean up the surface from them