static void r200FrontFace( struct gl_context *ctx, GLenum mode ) { r200ContextPtr rmesa = R200_CONTEXT(ctx); R200_STATECHANGE( rmesa, set ); rmesa->hw.set.cmd[SET_SE_CNTL] &= ~R200_FFACE_CULL_DIR_MASK; R200_STATECHANGE( rmesa, tcl ); rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~R200_CULL_FRONT_IS_CCW; switch ( mode ) { case GL_CW: if (ctx->DrawBuffer && _mesa_is_user_fbo(ctx->DrawBuffer)) { rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_FFACE_CULL_CCW; rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= R200_CULL_FRONT_IS_CW; } else { rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_FFACE_CULL_CW; } break; case GL_CCW: if (ctx->DrawBuffer && _mesa_is_user_fbo(ctx->DrawBuffer)) { rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_FFACE_CULL_CW; rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= R200_CULL_FRONT_IS_CCW; } else { rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_FFACE_CULL_CCW; rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= R200_CULL_FRONT_IS_CCW; } break; } }