Browse Source

Re-enable OpenGL depth test in the beginning of frame in case of third party overlay programs such MSI Afterburner having modified it. Closes #1089.

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

+ 4 - 0
Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp

@@ -642,6 +642,10 @@ bool Graphics::BeginFrame()
             SetMode(width, height);
     }
 
+    // Re-enable depth test and depth func in case a third party program has modified it
+    glEnable(GL_DEPTH_TEST);
+    glDepthFunc(glCmpFunc[depthTestMode_]);
+
     // Set default rendertarget and depth buffer
     ResetRenderTargets();