[OpenGL] Same for depth mask
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -528,6 +528,8 @@ namespace OpenGL {
|
||||
static void disableClipPlane(GLuint index) { glDisable(GL_CLIP_DISTANCE0 + index); }
|
||||
|
||||
static void setDepthFunc(DepthFunc func) { glDepthFunc(static_cast<GLenum>(func)); }
|
||||
static void setColourMask(GLboolean r, GLboolean g, GLboolean b, GLboolean a) { glColorMask(r, g, b, a); }
|
||||
static void setDepthMask(GLboolean mask) { glDepthMask(mask); }
|
||||
|
||||
enum Primitives {
|
||||
Triangle = GL_TRIANGLES,
|
||||
|
||||
Reference in New Issue
Block a user