summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/renderer_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/renderer_gl.cpp')
-rw-r--r--3rdparty/bgfx/src/renderer_gl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp
index 86c67ac4246..68e4b952cd9 100644
--- a/3rdparty/bgfx/src/renderer_gl.cpp
+++ b/3rdparty/bgfx/src/renderer_gl.cpp
@@ -6198,7 +6198,15 @@ namespace bgfx { namespace gl
}
else
{
- GL_CHECK(glDisable(GL_DEPTH_TEST) );
+ if (BGFX_STATE_DEPTH_WRITE & newFlags)
+ {
+ GL_CHECK(glEnable(GL_DEPTH_TEST) );
+ GL_CHECK(glDepthFunc(GL_ALWAYS) );
+ }
+ else
+ {
+ GL_CHECK(glDisable(GL_DEPTH_TEST) );
+ }
}
}