|
@@ -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)
|