[OpenGL] Same for depth mask

This commit is contained in:
wheremyfoodat 2023-07-05 18:54:09 +03:00
parent d80785cbb5
commit 7307bd270b
4 changed files with 18 additions and 5 deletions

View file

@ -22,8 +22,9 @@ struct GLStateManager {
bool depthEnabled;
bool scissorEnabled;
// Colour mask
// Colour/depth masks
bool redMask, greenMask, blueMask, alphaMask;
bool depthMask;
GLuint boundVAO;
GLuint boundVBO;
@ -108,7 +109,14 @@ struct GLStateManager {
b = blueMask;
a = alphaMask;
glColorMask(r, g, b, a);
OpenGL::setColourMask(r, g, b, a);
}
}
void setDepthMask(bool mask) {
if (depthMask != mask) {
depthMask = mask;
OpenGL::setDepthMask(mask);
}
}