(newctx->gl_color_writemask + i)[3]))
}
}
+ if STATES_COMPARE(gl_color_writemask_for_glColorMask, 4 * sizeof(GLboolean)) {
+ CHECK_GL_ERROR(_orig_fastpath_glColorMask(newctx->gl_color_writemask_for_glColorMask[0],
+ newctx->gl_color_writemask_for_glColorMask[1],
+ newctx->gl_color_writemask_for_glColorMask[2],
+ newctx->gl_color_writemask_for_glColorMask[3]))
+ }
if STATES_COMPARE(gl_depth_range, 2 * sizeof(GLclampf)) {
CHECK_GL_ERROR(_orig_fastpath_glDepthRangef(newctx->gl_depth_range[0],
newctx->gl_depth_range[1]))
DEFINE_FASTPAH_GL_FUNC();
_COREGL_FASTPATH_FUNC_BEGIN();
INIT_FASTPATH_GL_FUNC();
- GLint index;
- GLboolean changed = GL_FALSE;
- for (index = 0; index < current_ctx->gl_color_writemask_num[0]; index++) {
- if (CURR_STATE_COMPARE(gl_color_writemask, 0 + 4 * index, red) ||
- CURR_STATE_COMPARE(gl_color_writemask, 1 + 4 * index, green) ||
- CURR_STATE_COMPARE(gl_color_writemask, 2 + 4 * index, blue) ||
- CURR_STATE_COMPARE(gl_color_writemask, 3 + 4 * index, alpha))
- changed = GL_TRUE;
- }
-
- if (changed) {
+ if (CURR_STATE_COMPARE(gl_color_writemask_for_glColorMask, 0, red) ||
+ CURR_STATE_COMPARE(gl_color_writemask_for_glColorMask, 1, green) ||
+ CURR_STATE_COMPARE(gl_color_writemask_for_glColorMask, 2, blue) ||
+ CURR_STATE_COMPARE(gl_color_writemask_for_glColorMask, 3, alpha)) {
IF_GL_SUCCESS(_orig_fastpath_glColorMask(red, green, blue, alpha)) {
- current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_color_writemask;
- for (index = 0; index < current_ctx->gl_color_writemask_num[0]; index++) {
- CURR_STATE_UPDATE(gl_color_writemask, 0 + 4 * index, red)
- CURR_STATE_UPDATE(gl_color_writemask, 1 + 4 * index, green)
- CURR_STATE_UPDATE(gl_color_writemask, 2 + 4 * index, blue)
- CURR_STATE_UPDATE(gl_color_writemask, 3 + 4 * index, alpha)
- }
+ current_ctx->_clear_flag2 |= _CLEAR_FLAG2_BIT_gl_color_writemask_for_glColorMask;
+ CURR_STATE_UPDATE(gl_color_writemask_for_glColorMask, 0, red)
+ CURR_STATE_UPDATE(gl_color_writemask_for_glColorMask, 1, green)
+ CURR_STATE_UPDATE(gl_color_writemask_for_glColorMask, 2, blue)
+ CURR_STATE_UPDATE(gl_color_writemask_for_glColorMask, 3, alpha)
}
}
goto finish;
4 * INITIAL_CTX->gl_color_writemask_num[0],
SET_N(4 * INITIAL_CTX->gl_color_writemask_num[0], 1, SET_1(GL_TRUE)),
_sym_glGetBooleanv(GL_COLOR_WRITEMASK, (GLboolean *)value);)
+
+GLUE_STATE(GLboolean, gl_color_writemask_for_glColorMask, 4, 4, SET_4(GL_TRUE, GL_TRUE, GL_TRUE,
+ GL_TRUE), _sym_glGetBooleanv(GL_COLOR_WRITEMASK, (GLboolean *)value);)
+
GLUE_STATE(GLclampf, gl_depth_range, 2, 2, SET_2(0.0f, 1.0f),
_sym_glGetFloatv(GL_DEPTH_RANGE, (GLfloat *)value);)
GLUE_STATE(GLclampf, gl_depth_clear_value, 1, 1, SET_1(1.0f),