Bläddra i källkod

Fix erroneous reuse of the backbuffer depth buffer when multisampling is used. Closes #1625.

Lasse Öörni 9 år sedan
förälder
incheckning
fa42bc6a8f
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      Source/Urho3D/Graphics/Renderer.cpp

+ 2 - 1
Source/Urho3D/Graphics/Renderer.cpp

@@ -1097,7 +1097,8 @@ RenderSurface* Renderer::GetDepthStencil(int width, int height, int multiSample,
 {
     // Return the default depth-stencil surface if applicable
     // (when using OpenGL Graphics will allocate right size surfaces on demand to emulate Direct3D9)
-    if (width == graphics_->GetWidth() && height == graphics_->GetHeight() && graphics_->GetMultiSample() <= 1)
+    if (width == graphics_->GetWidth() && height == graphics_->GetHeight() && multiSample == 1 &&
+        graphics_->GetMultiSample() == multiSample)
         return 0;
     else
     {