Browse Source

Clean up OpenGL frame buffers when window size changes.

Lasse Öörni 10 years ago
parent
commit
dae17d375c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp

+ 2 - 1
Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp

@@ -2116,7 +2116,8 @@ void Graphics::WindowResized()
     width_ = newWidth;
     height_ = newHeight;
     
-    // Reset rendertargets and viewport for the new screen size
+    // Reset rendertargets and viewport for the new screen size. Also clean up any FBO's, as they may be screen size dependent
+    CleanupFramebuffers();
     ResetRenderTargets();
     
     LOGDEBUGF("Window was resized to %dx%d", width_, height_);