mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
opengl: fix clearing the depth buffer.
This commit is contained in:
@@ -101,8 +101,8 @@ OpenGL::CleanClearState::CleanClearState(GLbitfield clearFlags)
|
||||
if ((clearFlags & GL_COLOR_BUFFER_BIT) != 0 && colorWriteMask != LOVE_UINT32_MAX)
|
||||
gl.setColorWriteMask(LOVE_UINT32_MAX);
|
||||
|
||||
if ((clearFlags & GL_DEPTH_BUFFER_BIT) != 0 && depthWrites)
|
||||
gl.setDepthWrites(false);
|
||||
if ((clearFlags & GL_DEPTH_BUFFER_BIT) != 0 && !depthWrites)
|
||||
gl.setDepthWrites(true);
|
||||
|
||||
if ((clearFlags & GL_STENCIL_BUFFER_BIT) != 0 && (stencilWriteMask & 0xFF) != 0xFF)
|
||||
gl.setStencilWriteMask(LOVE_UINT32_MAX);
|
||||
@@ -116,7 +116,7 @@ OpenGL::CleanClearState::~CleanClearState()
|
||||
if ((clearFlags & GL_COLOR_BUFFER_BIT) != 0 && colorWriteMask != LOVE_UINT32_MAX)
|
||||
gl.setColorWriteMask(colorWriteMask);
|
||||
|
||||
if ((clearFlags & GL_DEPTH_BUFFER_BIT) != 0 && depthWrites)
|
||||
if ((clearFlags & GL_DEPTH_BUFFER_BIT) != 0 && !depthWrites)
|
||||
gl.setDepthWrites(depthWrites);
|
||||
|
||||
if ((clearFlags & GL_STENCIL_BUFFER_BIT) != 0 && (stencilWriteMask & 0xFF) != 0xFF)
|
||||
|
||||
Reference in New Issue
Block a user