summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get_gen.py
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-29 16:17:14 -0700
committerBrian Paul <[email protected]>2009-12-29 16:17:14 -0700
commitfd5511d27fc44096117c47ab503fb5b47f993061 (patch)
treece5b1a3152d1c7ec495403f43e222c421b6e99d0 /src/mesa/main/get_gen.py
parent126b35bd3acbf486471879531cd2e6f446b14497 (diff)
mesa: implement per-buffer color masking
This is part of the GL_EXT_draw_buffers2 extension and part of GL 3.0. The ctx->Color.ColorMask field is now a 2-D array. Until drivers are modified to support per-buffer color masking, they can just look at the 0th color mask. The new _mesa_ColorMaskIndexed() function will be called by glColorMaskIndexedEXT() or glColorMaski().
Diffstat (limited to 'src/mesa/main/get_gen.py')
-rw-r--r--src/mesa/main/get_gen.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index 8b6500fae17..18708be2603 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -126,10 +126,10 @@ StateVars = [
( "GL_COLOR_MATERIAL_PARAMETER", GLenum,
["ctx->Light.ColorMaterialMode"], "", None ),
( "GL_COLOR_WRITEMASK", GLint,
- [ "ctx->Color.ColorMask[RCOMP] ? 1 : 0",
- "ctx->Color.ColorMask[GCOMP] ? 1 : 0",
- "ctx->Color.ColorMask[BCOMP] ? 1 : 0",
- "ctx->Color.ColorMask[ACOMP] ? 1 : 0" ], "", None ),
+ [ "ctx->Color.ColorMask[0][RCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[0][GCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[0][BCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[0][ACOMP] ? 1 : 0" ], "", None ),
( "GL_CULL_FACE", GLboolean, ["ctx->Polygon.CullFlag"], "", None ),
( "GL_CULL_FACE_MODE", GLenum, ["ctx->Polygon.CullFaceMode"], "", None ),
( "GL_CURRENT_COLOR", GLfloatN,
@@ -1035,7 +1035,14 @@ StateVars = [
# These are queried via glGetIntegetIndexdvEXT() or glGetIntegeri_v()
IndexedStateVars = [
- ( "GL_BLEND", GLint, ["((ctx->Color.BlendEnabled >> index) & 1)"], "MAX_DRAW_BUFFERS", None ),
+ ( "GL_BLEND", GLint, ["((ctx->Color.BlendEnabled >> index) & 1)"],
+ "ctx->Const.MaxDrawBuffers", None ),
+ ( "GL_COLOR_WRITEMASK", GLint,
+ [ "ctx->Color.ColorMask[index][RCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[index][GCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[index][BCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[index][ACOMP] ? 1 : 0" ],
+ "ctx->Const.MaxDrawBuffers", None ),
# XXX more to come...
]