Browse Source

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

Lasse Öörni 14 năm trước cách đây
mục cha
commit
961f65b467
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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