aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorGravatar tfarley <tfarleygithub@gmail.com>2015-05-28 21:41:37 -0400
committerGravatar tfarley <tfarleygithub@gmail.com>2015-06-08 19:18:17 -0400
commitd42275f11cc53000fead76b7c695fb370d19e56d (patch)
tree351cd273da23c232bde19e49ca2f389dc1cb4dd0 /src/video_core/renderer_opengl/gl_state.cpp
parentb1cb0a3f2c0ed47ea2a926a8ff04720a91c1b80b (diff)
Implemented glColorMask
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 9c5f38f9..2305fb2c 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -16,6 +16,11 @@ OpenGLState::OpenGLState() {
depth.test_func = GL_LESS;
depth.write_mask = GL_TRUE;
+ color_mask.red_enabled = GL_TRUE;
+ color_mask.green_enabled = GL_TRUE;
+ color_mask.blue_enabled = GL_TRUE;
+ color_mask.alpha_enabled = GL_TRUE;
+
stencil.test_enabled = false;
stencil.test_func = GL_ALWAYS;
stencil.test_ref = 0;
@@ -77,6 +82,14 @@ void OpenGLState::Apply() {
glDepthMask(depth.write_mask);
}
+ // Color mask
+ if (color_mask.red_enabled != cur_state.color_mask.red_enabled ||
+ color_mask.green_enabled != cur_state.color_mask.green_enabled ||
+ color_mask.blue_enabled != cur_state.color_mask.blue_enabled ||
+ color_mask.alpha_enabled != cur_state.color_mask.alpha_enabled) {
+ glColorMask(color_mask.red_enabled, color_mask.green_enabled, color_mask.blue_enabled, color_mask.alpha_enabled);
+ }
+
// Stencil test
if (stencil.test_enabled != cur_state.stencil.test_enabled) {
if (stencil.test_enabled) {