Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | # Mesa 3-D graphics library |
| 4 | # |
Brian Paul | fd2e402 | 2006-09-13 21:02:32 +0000 | [diff] [blame] | 5 | # Copyright (C) 1999-2006 Brian Paul All Rights Reserved. |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 6 | # |
| 7 | # Permission is hereby granted, free of charge, to any person obtaining a |
| 8 | # copy of this software and associated documentation files (the "Software"), |
| 9 | # to deal in the Software without restriction, including without limitation |
| 10 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 11 | # and/or sell copies of the Software, and to permit persons to whom the |
| 12 | # Software is furnished to do so, subject to the following conditions: |
| 13 | # |
| 14 | # The above copyright notice and this permission notice shall be included |
| 15 | # in all copies or substantial portions of the Software. |
| 16 | # |
| 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 18 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 20 | # BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
| 21 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 22 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 23 | |
| 24 | |
| 25 | # This script is used to generate the get.c file: |
| 26 | # python get_gen.py > get.c |
| 27 | |
| 28 | |
| 29 | import string |
| 30 | |
| 31 | |
| 32 | GLint = 1 |
| 33 | GLenum = 2 |
| 34 | GLfloat = 3 |
| 35 | GLdouble = 4 |
| 36 | GLboolean = 5 |
| 37 | GLfloatN = 6 # A normalized value, such as a color or depth range |
| 38 | |
| 39 | |
| 40 | TypeStrings = { |
| 41 | GLint : "GLint", |
| 42 | GLenum : "GLenum", |
| 43 | GLfloat : "GLfloat", |
| 44 | GLdouble : "GLdouble", |
| 45 | GLboolean : "GLboolean" |
| 46 | } |
| 47 | |
| 48 | |
| 49 | # Each entry is a tuple of: |
| 50 | # - the GL state name, such as GL_CURRENT_COLOR |
| 51 | # - the state datatype, one of GLint, GLfloat, GLboolean or GLenum |
| 52 | # - list of code fragments to get the state, such as ["ctx->Foo.Bar"] |
| 53 | # - optional extra code or empty string |
Roland Scheidegger | da16813 | 2006-03-02 12:06:57 +0000 | [diff] [blame] | 54 | # - optional extensions to check, or None |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 55 | # |
| 56 | StateVars = [ |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 57 | ( "GL_ACCUM_RED_BITS", GLint, ["ctx->DrawBuffer->Visual.accumRedBits"], |
| 58 | "", None ), |
| 59 | ( "GL_ACCUM_GREEN_BITS", GLint, ["ctx->DrawBuffer->Visual.accumGreenBits"], |
| 60 | "", None ), |
| 61 | ( "GL_ACCUM_BLUE_BITS", GLint, ["ctx->DrawBuffer->Visual.accumBlueBits"], |
| 62 | "", None ), |
| 63 | ( "GL_ACCUM_ALPHA_BITS", GLint, ["ctx->DrawBuffer->Visual.accumAlphaBits"], |
| 64 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 65 | ( "GL_ACCUM_CLEAR_VALUE", GLfloatN, |
| 66 | [ "ctx->Accum.ClearColor[0]", |
| 67 | "ctx->Accum.ClearColor[1]", |
| 68 | "ctx->Accum.ClearColor[2]", |
| 69 | "ctx->Accum.ClearColor[3]" ], |
| 70 | "", None ), |
| 71 | ( "GL_ALPHA_BIAS", GLfloat, ["ctx->Pixel.AlphaBias"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 72 | ( "GL_ALPHA_BITS", GLint, ["ctx->DrawBuffer->Visual.alphaBits"], |
| 73 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 74 | ( "GL_ALPHA_SCALE", GLfloat, ["ctx->Pixel.AlphaScale"], "", None ), |
| 75 | ( "GL_ALPHA_TEST", GLboolean, ["ctx->Color.AlphaEnabled"], "", None ), |
| 76 | ( "GL_ALPHA_TEST_FUNC", GLenum, ["ctx->Color.AlphaFunc"], "", None ), |
| 77 | ( "GL_ALPHA_TEST_REF", GLfloatN, ["ctx->Color.AlphaRef"], "", None ), |
| 78 | ( "GL_ATTRIB_STACK_DEPTH", GLint, ["ctx->AttribStackDepth"], "", None ), |
| 79 | ( "GL_AUTO_NORMAL", GLboolean, ["ctx->Eval.AutoNormal"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 80 | ( "GL_AUX_BUFFERS", GLint, ["ctx->DrawBuffer->Visual.numAuxBuffers"], |
| 81 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 82 | ( "GL_BLEND", GLboolean, ["ctx->Color.BlendEnabled"], "", None ), |
| 83 | ( "GL_BLEND_DST", GLenum, ["ctx->Color.BlendDstRGB"], "", None ), |
| 84 | ( "GL_BLEND_SRC", GLenum, ["ctx->Color.BlendSrcRGB"], "", None ), |
| 85 | ( "GL_BLEND_SRC_RGB_EXT", GLenum, ["ctx->Color.BlendSrcRGB"], "", None ), |
| 86 | ( "GL_BLEND_DST_RGB_EXT", GLenum, ["ctx->Color.BlendDstRGB"], "", None ), |
| 87 | ( "GL_BLEND_SRC_ALPHA_EXT", GLenum, ["ctx->Color.BlendSrcA"], "", None ), |
| 88 | ( "GL_BLEND_DST_ALPHA_EXT", GLenum, ["ctx->Color.BlendDstA"], "", None ), |
| 89 | ( "GL_BLEND_EQUATION", GLenum, ["ctx->Color.BlendEquationRGB "], "", None), |
| 90 | ( "GL_BLEND_EQUATION_ALPHA_EXT", GLenum, ["ctx->Color.BlendEquationA "], |
| 91 | "", None ), |
| 92 | ( "GL_BLEND_COLOR_EXT", GLfloatN, |
| 93 | [ "ctx->Color.BlendColor[0]", |
| 94 | "ctx->Color.BlendColor[1]", |
| 95 | "ctx->Color.BlendColor[2]", |
| 96 | "ctx->Color.BlendColor[3]"], "", None ), |
| 97 | ( "GL_BLUE_BIAS", GLfloat, ["ctx->Pixel.BlueBias"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 98 | ( "GL_BLUE_BITS", GLint, ["ctx->DrawBuffer->Visual.blueBits"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 99 | ( "GL_BLUE_SCALE", GLfloat, ["ctx->Pixel.BlueScale"], "", None ), |
| 100 | ( "GL_CLIENT_ATTRIB_STACK_DEPTH", GLint, |
| 101 | ["ctx->ClientAttribStackDepth"], "", None ), |
| 102 | ( "GL_CLIP_PLANE0", GLboolean, |
| 103 | [ "(ctx->Transform.ClipPlanesEnabled >> 0) & 1" ], "", None ), |
| 104 | ( "GL_CLIP_PLANE1", GLboolean, |
| 105 | [ "(ctx->Transform.ClipPlanesEnabled >> 1) & 1" ], "", None ), |
| 106 | ( "GL_CLIP_PLANE2", GLboolean, |
| 107 | [ "(ctx->Transform.ClipPlanesEnabled >> 2) & 1" ], "", None ), |
| 108 | ( "GL_CLIP_PLANE3", GLboolean, |
| 109 | [ "(ctx->Transform.ClipPlanesEnabled >> 3) & 1" ], "", None ), |
| 110 | ( "GL_CLIP_PLANE4", GLboolean, |
| 111 | [ "(ctx->Transform.ClipPlanesEnabled >> 4) & 1" ], "", None ), |
| 112 | ( "GL_CLIP_PLANE5", GLboolean, |
| 113 | [ "(ctx->Transform.ClipPlanesEnabled >> 5) & 1" ], "", None ), |
| 114 | ( "GL_COLOR_CLEAR_VALUE", GLfloatN, |
| 115 | [ "ctx->Color.ClearColor[0]", |
| 116 | "ctx->Color.ClearColor[1]", |
| 117 | "ctx->Color.ClearColor[2]", |
| 118 | "ctx->Color.ClearColor[3]" ], "", None ), |
| 119 | ( "GL_COLOR_MATERIAL", GLboolean, |
| 120 | ["ctx->Light.ColorMaterialEnabled"], "", None ), |
| 121 | ( "GL_COLOR_MATERIAL_FACE", GLenum, |
| 122 | ["ctx->Light.ColorMaterialFace"], "", None ), |
| 123 | ( "GL_COLOR_MATERIAL_PARAMETER", GLenum, |
| 124 | ["ctx->Light.ColorMaterialMode"], "", None ), |
| 125 | ( "GL_COLOR_WRITEMASK", GLint, |
| 126 | [ "ctx->Color.ColorMask[RCOMP] ? 1 : 0", |
| 127 | "ctx->Color.ColorMask[GCOMP] ? 1 : 0", |
| 128 | "ctx->Color.ColorMask[BCOMP] ? 1 : 0", |
| 129 | "ctx->Color.ColorMask[ACOMP] ? 1 : 0" ], "", None ), |
| 130 | ( "GL_CULL_FACE", GLboolean, ["ctx->Polygon.CullFlag"], "", None ), |
| 131 | ( "GL_CULL_FACE_MODE", GLenum, ["ctx->Polygon.CullFaceMode"], "", None ), |
| 132 | ( "GL_CURRENT_COLOR", GLfloatN, |
| 133 | [ "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]", |
| 134 | "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]", |
| 135 | "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]", |
| 136 | "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]" ], |
| 137 | "FLUSH_CURRENT(ctx, 0);", None ), |
Brian Paul | 94b30dc | 2006-04-25 00:53:25 +0000 | [diff] [blame] | 138 | ( "GL_CURRENT_INDEX", GLfloat, |
| 139 | [ "ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]" ], |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 140 | "FLUSH_CURRENT(ctx, 0);", None ), |
| 141 | ( "GL_CURRENT_NORMAL", GLfloatN, |
| 142 | [ "ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]", |
| 143 | "ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]", |
| 144 | "ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]"], |
| 145 | "FLUSH_CURRENT(ctx, 0);", None ), |
| 146 | ( "GL_CURRENT_RASTER_COLOR", GLfloatN, |
| 147 | ["ctx->Current.RasterColor[0]", |
| 148 | "ctx->Current.RasterColor[1]", |
| 149 | "ctx->Current.RasterColor[2]", |
| 150 | "ctx->Current.RasterColor[3]"], "", None ), |
| 151 | ( "GL_CURRENT_RASTER_DISTANCE", GLfloat, |
| 152 | ["ctx->Current.RasterDistance"], "", None ), |
| 153 | ( "GL_CURRENT_RASTER_INDEX", GLfloat, |
| 154 | ["ctx->Current.RasterIndex"], "", None ), |
| 155 | ( "GL_CURRENT_RASTER_POSITION", GLfloat, |
| 156 | ["ctx->Current.RasterPos[0]", |
| 157 | "ctx->Current.RasterPos[1]", |
| 158 | "ctx->Current.RasterPos[2]", |
| 159 | "ctx->Current.RasterPos[3]"], "", None ), |
Brian Paul | fd2e402 | 2006-09-13 21:02:32 +0000 | [diff] [blame] | 160 | ( "GL_CURRENT_RASTER_SECONDARY_COLOR", GLfloatN, |
| 161 | ["ctx->Current.RasterSecondaryColor[0]", |
| 162 | "ctx->Current.RasterSecondaryColor[1]", |
| 163 | "ctx->Current.RasterSecondaryColor[2]", |
| 164 | "ctx->Current.RasterSecondaryColor[3]"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 165 | ( "GL_CURRENT_RASTER_TEXTURE_COORDS", GLfloat, |
| 166 | ["ctx->Current.RasterTexCoords[texUnit][0]", |
| 167 | "ctx->Current.RasterTexCoords[texUnit][1]", |
| 168 | "ctx->Current.RasterTexCoords[texUnit][2]", |
| 169 | "ctx->Current.RasterTexCoords[texUnit][3]"], |
| 170 | "const GLuint texUnit = ctx->Texture.CurrentUnit;", None ), |
| 171 | ( "GL_CURRENT_RASTER_POSITION_VALID", GLboolean, |
| 172 | ["ctx->Current.RasterPosValid"], "", None ), |
| 173 | ( "GL_CURRENT_TEXTURE_COORDS", GLfloat, |
| 174 | ["ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]", |
| 175 | "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]", |
| 176 | "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]", |
| 177 | "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]"], |
| 178 | "const GLuint texUnit = ctx->Texture.CurrentUnit;", None ), |
| 179 | ( "GL_DEPTH_BIAS", GLfloat, ["ctx->Pixel.DepthBias"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 180 | ( "GL_DEPTH_BITS", GLint, ["ctx->DrawBuffer->Visual.depthBits"], |
| 181 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 182 | ( "GL_DEPTH_CLEAR_VALUE", GLfloat, ["ctx->Depth.Clear"], "", None ), |
| 183 | ( "GL_DEPTH_FUNC", GLenum, ["ctx->Depth.Func"], "", None ), |
| 184 | ( "GL_DEPTH_RANGE", GLfloatN, |
| 185 | [ "ctx->Viewport.Near", "ctx->Viewport.Far" ], "", None ), |
| 186 | ( "GL_DEPTH_SCALE", GLfloat, ["ctx->Pixel.DepthScale"], "", None ), |
| 187 | ( "GL_DEPTH_TEST", GLboolean, ["ctx->Depth.Test"], "", None ), |
| 188 | ( "GL_DEPTH_WRITEMASK", GLboolean, ["ctx->Depth.Mask"], "", None ), |
| 189 | ( "GL_DITHER", GLboolean, ["ctx->Color.DitherFlag"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 190 | ( "GL_DOUBLEBUFFER", GLboolean, |
| 191 | ["ctx->DrawBuffer->Visual.doubleBufferMode"], "", None ), |
Brian Paul | 21a4fb4 | 2006-03-19 00:10:22 +0000 | [diff] [blame] | 192 | ( "GL_DRAW_BUFFER", GLenum, ["ctx->DrawBuffer->ColorDrawBuffer[0]"], "", None ), |
Keith Whitwell | a1a8a2c | 2006-10-30 20:29:13 +0000 | [diff] [blame] | 193 | ( "GL_EDGE_FLAG", GLboolean, ["(ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0)"], |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 194 | "FLUSH_CURRENT(ctx, 0);", None ), |
| 195 | ( "GL_FEEDBACK_BUFFER_SIZE", GLint, ["ctx->Feedback.BufferSize"], "", None ), |
| 196 | ( "GL_FEEDBACK_BUFFER_TYPE", GLenum, ["ctx->Feedback.Type"], "", None ), |
| 197 | ( "GL_FOG", GLboolean, ["ctx->Fog.Enabled"], "", None ), |
| 198 | ( "GL_FOG_COLOR", GLfloatN, |
| 199 | [ "ctx->Fog.Color[0]", |
| 200 | "ctx->Fog.Color[1]", |
| 201 | "ctx->Fog.Color[2]", |
| 202 | "ctx->Fog.Color[3]" ], "", None ), |
| 203 | ( "GL_FOG_DENSITY", GLfloat, ["ctx->Fog.Density"], "", None ), |
| 204 | ( "GL_FOG_END", GLfloat, ["ctx->Fog.End"], "", None ), |
| 205 | ( "GL_FOG_HINT", GLenum, ["ctx->Hint.Fog"], "", None ), |
| 206 | ( "GL_FOG_INDEX", GLfloat, ["ctx->Fog.Index"], "", None ), |
| 207 | ( "GL_FOG_MODE", GLenum, ["ctx->Fog.Mode"], "", None ), |
| 208 | ( "GL_FOG_START", GLfloat, ["ctx->Fog.Start"], "", None ), |
| 209 | ( "GL_FRONT_FACE", GLenum, ["ctx->Polygon.FrontFace"], "", None ), |
| 210 | ( "GL_GREEN_BIAS", GLfloat, ["ctx->Pixel.GreenBias"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 211 | ( "GL_GREEN_BITS", GLint, ["ctx->DrawBuffer->Visual.greenBits"], |
| 212 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 213 | ( "GL_GREEN_SCALE", GLfloat, ["ctx->Pixel.GreenScale"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 214 | ( "GL_INDEX_BITS", GLint, ["ctx->DrawBuffer->Visual.indexBits"], |
| 215 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 216 | ( "GL_INDEX_CLEAR_VALUE", GLint, ["ctx->Color.ClearIndex"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 217 | ( "GL_INDEX_MODE", GLboolean, ["!ctx->DrawBuffer->Visual.rgbMode"], |
| 218 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 219 | ( "GL_INDEX_OFFSET", GLint, ["ctx->Pixel.IndexOffset"], "", None ), |
| 220 | ( "GL_INDEX_SHIFT", GLint, ["ctx->Pixel.IndexShift"], "", None ), |
| 221 | ( "GL_INDEX_WRITEMASK", GLint, ["ctx->Color.IndexMask"], "", None ), |
| 222 | ( "GL_LIGHT0", GLboolean, ["ctx->Light.Light[0].Enabled"], "", None ), |
| 223 | ( "GL_LIGHT1", GLboolean, ["ctx->Light.Light[1].Enabled"], "", None ), |
| 224 | ( "GL_LIGHT2", GLboolean, ["ctx->Light.Light[2].Enabled"], "", None ), |
| 225 | ( "GL_LIGHT3", GLboolean, ["ctx->Light.Light[3].Enabled"], "", None ), |
| 226 | ( "GL_LIGHT4", GLboolean, ["ctx->Light.Light[4].Enabled"], "", None ), |
| 227 | ( "GL_LIGHT5", GLboolean, ["ctx->Light.Light[5].Enabled"], "", None ), |
| 228 | ( "GL_LIGHT6", GLboolean, ["ctx->Light.Light[6].Enabled"], "", None ), |
| 229 | ( "GL_LIGHT7", GLboolean, ["ctx->Light.Light[7].Enabled"], "", None ), |
| 230 | ( "GL_LIGHTING", GLboolean, ["ctx->Light.Enabled"], "", None ), |
| 231 | ( "GL_LIGHT_MODEL_AMBIENT", GLfloatN, |
| 232 | ["ctx->Light.Model.Ambient[0]", |
| 233 | "ctx->Light.Model.Ambient[1]", |
| 234 | "ctx->Light.Model.Ambient[2]", |
| 235 | "ctx->Light.Model.Ambient[3]"], "", None ), |
| 236 | ( "GL_LIGHT_MODEL_COLOR_CONTROL", GLenum, |
| 237 | ["ctx->Light.Model.ColorControl"], "", None ), |
| 238 | ( "GL_LIGHT_MODEL_LOCAL_VIEWER", GLboolean, |
| 239 | ["ctx->Light.Model.LocalViewer"], "", None ), |
| 240 | ( "GL_LIGHT_MODEL_TWO_SIDE", GLboolean, ["ctx->Light.Model.TwoSide"], "", None ), |
| 241 | ( "GL_LINE_SMOOTH", GLboolean, ["ctx->Line.SmoothFlag"], "", None ), |
| 242 | ( "GL_LINE_SMOOTH_HINT", GLenum, ["ctx->Hint.LineSmooth"], "", None ), |
| 243 | ( "GL_LINE_STIPPLE", GLboolean, ["ctx->Line.StippleFlag"], "", None ), |
| 244 | ( "GL_LINE_STIPPLE_PATTERN", GLint, ["ctx->Line.StipplePattern"], "", None ), |
| 245 | ( "GL_LINE_STIPPLE_REPEAT", GLint, ["ctx->Line.StippleFactor"], "", None ), |
| 246 | ( "GL_LINE_WIDTH", GLfloat, ["ctx->Line.Width"], "", None ), |
| 247 | ( "GL_LINE_WIDTH_GRANULARITY", GLfloat, |
| 248 | ["ctx->Const.LineWidthGranularity"], "", None ), |
| 249 | ( "GL_LINE_WIDTH_RANGE", GLfloat, |
| 250 | ["ctx->Const.MinLineWidthAA", |
| 251 | "ctx->Const.MaxLineWidthAA"], "", None ), |
| 252 | ( "GL_ALIASED_LINE_WIDTH_RANGE", GLfloat, |
| 253 | ["ctx->Const.MinLineWidth", |
| 254 | "ctx->Const.MaxLineWidth"], "", None ), |
| 255 | ( "GL_LIST_BASE", GLint, ["ctx->List.ListBase"], "", None ), |
| 256 | ( "GL_LIST_INDEX", GLint, ["ctx->ListState.CurrentListNum"], "", None ), |
| 257 | ( "GL_LIST_MODE", GLenum, ["mode"], |
| 258 | """GLenum mode; |
| 259 | if (!ctx->CompileFlag) |
| 260 | mode = 0; |
| 261 | else if (ctx->ExecuteFlag) |
| 262 | mode = GL_COMPILE_AND_EXECUTE; |
| 263 | else |
| 264 | mode = GL_COMPILE;""", None ), |
| 265 | ( "GL_INDEX_LOGIC_OP", GLboolean, ["ctx->Color.IndexLogicOpEnabled"], "", None ), |
| 266 | ( "GL_COLOR_LOGIC_OP", GLboolean, ["ctx->Color.ColorLogicOpEnabled"], "", None ), |
| 267 | ( "GL_LOGIC_OP_MODE", GLenum, ["ctx->Color.LogicOp"], "", None ), |
| 268 | ( "GL_MAP1_COLOR_4", GLboolean, ["ctx->Eval.Map1Color4"], "", None ), |
| 269 | ( "GL_MAP1_GRID_DOMAIN", GLfloat, |
| 270 | ["ctx->Eval.MapGrid1u1", |
| 271 | "ctx->Eval.MapGrid1u2"], "", None ), |
| 272 | ( "GL_MAP1_GRID_SEGMENTS", GLint, ["ctx->Eval.MapGrid1un"], "", None ), |
| 273 | ( "GL_MAP1_INDEX", GLboolean, ["ctx->Eval.Map1Index"], "", None ), |
| 274 | ( "GL_MAP1_NORMAL", GLboolean, ["ctx->Eval.Map1Normal"], "", None ), |
| 275 | ( "GL_MAP1_TEXTURE_COORD_1", GLboolean, ["ctx->Eval.Map1TextureCoord1"], "", None ), |
| 276 | ( "GL_MAP1_TEXTURE_COORD_2", GLboolean, ["ctx->Eval.Map1TextureCoord2"], "", None ), |
| 277 | ( "GL_MAP1_TEXTURE_COORD_3", GLboolean, ["ctx->Eval.Map1TextureCoord3"], "", None ), |
| 278 | ( "GL_MAP1_TEXTURE_COORD_4", GLboolean, ["ctx->Eval.Map1TextureCoord4"], "", None ), |
| 279 | ( "GL_MAP1_VERTEX_3", GLboolean, ["ctx->Eval.Map1Vertex3"], "", None ), |
| 280 | ( "GL_MAP1_VERTEX_4", GLboolean, ["ctx->Eval.Map1Vertex4"], "", None ), |
| 281 | ( "GL_MAP2_COLOR_4", GLboolean, ["ctx->Eval.Map2Color4"], "", None ), |
| 282 | ( "GL_MAP2_GRID_DOMAIN", GLfloat, |
| 283 | ["ctx->Eval.MapGrid2u1", |
| 284 | "ctx->Eval.MapGrid2u2", |
| 285 | "ctx->Eval.MapGrid2v1", |
| 286 | "ctx->Eval.MapGrid2v2"], "", None ), |
| 287 | ( "GL_MAP2_GRID_SEGMENTS", GLint, |
| 288 | ["ctx->Eval.MapGrid2un", |
| 289 | "ctx->Eval.MapGrid2vn"], "", None ), |
| 290 | ( "GL_MAP2_INDEX", GLboolean, ["ctx->Eval.Map2Index"], "", None ), |
| 291 | ( "GL_MAP2_NORMAL", GLboolean, ["ctx->Eval.Map2Normal"], "", None ), |
| 292 | ( "GL_MAP2_TEXTURE_COORD_1", GLboolean, ["ctx->Eval.Map2TextureCoord1"], "", None ), |
| 293 | ( "GL_MAP2_TEXTURE_COORD_2", GLboolean, ["ctx->Eval.Map2TextureCoord2"], "", None ), |
| 294 | ( "GL_MAP2_TEXTURE_COORD_3", GLboolean, ["ctx->Eval.Map2TextureCoord3"], "", None ), |
| 295 | ( "GL_MAP2_TEXTURE_COORD_4", GLboolean, ["ctx->Eval.Map2TextureCoord4"], "", None ), |
| 296 | ( "GL_MAP2_VERTEX_3", GLboolean, ["ctx->Eval.Map2Vertex3"], "", None ), |
| 297 | ( "GL_MAP2_VERTEX_4", GLboolean, ["ctx->Eval.Map2Vertex4"], "", None ), |
| 298 | ( "GL_MAP_COLOR", GLboolean, ["ctx->Pixel.MapColorFlag"], "", None ), |
| 299 | ( "GL_MAP_STENCIL", GLboolean, ["ctx->Pixel.MapStencilFlag"], "", None ), |
| 300 | ( "GL_MATRIX_MODE", GLenum, ["ctx->Transform.MatrixMode"], "", None ), |
| 301 | |
| 302 | ( "GL_MAX_ATTRIB_STACK_DEPTH", GLint, ["MAX_ATTRIB_STACK_DEPTH"], "", None ), |
| 303 | ( "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH", GLint, ["MAX_CLIENT_ATTRIB_STACK_DEPTH"], "", None ), |
| 304 | ( "GL_MAX_CLIP_PLANES", GLint, ["ctx->Const.MaxClipPlanes"], "", None ), |
| 305 | ( "GL_MAX_ELEMENTS_VERTICES", GLint, ["ctx->Const.MaxArrayLockSize"], "", None ), |
| 306 | ( "GL_MAX_ELEMENTS_INDICES", GLint, ["ctx->Const.MaxArrayLockSize"], "", None ), |
| 307 | ( "GL_MAX_EVAL_ORDER", GLint, ["MAX_EVAL_ORDER"], "", None ), |
| 308 | ( "GL_MAX_LIGHTS", GLint, ["ctx->Const.MaxLights"], "", None ), |
| 309 | ( "GL_MAX_LIST_NESTING", GLint, ["MAX_LIST_NESTING"], "", None ), |
| 310 | ( "GL_MAX_MODELVIEW_STACK_DEPTH", GLint, ["MAX_MODELVIEW_STACK_DEPTH"], "", None ), |
| 311 | ( "GL_MAX_NAME_STACK_DEPTH", GLint, ["MAX_NAME_STACK_DEPTH"], "", None ), |
| 312 | ( "GL_MAX_PIXEL_MAP_TABLE", GLint, ["MAX_PIXEL_MAP_TABLE"], "", None ), |
| 313 | ( "GL_MAX_PROJECTION_STACK_DEPTH", GLint, ["MAX_PROJECTION_STACK_DEPTH"], "", None ), |
| 314 | ( "GL_MAX_TEXTURE_SIZE", GLint, ["1 << (ctx->Const.MaxTextureLevels - 1)"], "", None ), |
| 315 | ( "GL_MAX_3D_TEXTURE_SIZE", GLint, ["1 << (ctx->Const.Max3DTextureLevels - 1)"], "", None ), |
| 316 | ( "GL_MAX_TEXTURE_STACK_DEPTH", GLint, ["MAX_TEXTURE_STACK_DEPTH"], "", None ), |
Brian Paul | b551170 | 2005-01-30 17:18:08 +0000 | [diff] [blame] | 317 | ( "GL_MAX_VIEWPORT_DIMS", GLint, |
| 318 | ["ctx->Const.MaxViewportWidth", "ctx->Const.MaxViewportHeight"], |
| 319 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 320 | ( "GL_MODELVIEW_MATRIX", GLfloat, |
| 321 | [ "matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]", |
| 322 | "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]", |
| 323 | "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]", |
| 324 | "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ], |
| 325 | "const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;", None ), |
| 326 | ( "GL_MODELVIEW_STACK_DEPTH", GLint, ["ctx->ModelviewMatrixStack.Depth + 1"], "", None ), |
| 327 | ( "GL_NAME_STACK_DEPTH", GLint, ["ctx->Select.NameStackDepth"], "", None ), |
| 328 | ( "GL_NORMALIZE", GLboolean, ["ctx->Transform.Normalize"], "", None ), |
| 329 | ( "GL_PACK_ALIGNMENT", GLint, ["ctx->Pack.Alignment"], "", None ), |
| 330 | ( "GL_PACK_LSB_FIRST", GLboolean, ["ctx->Pack.LsbFirst"], "", None ), |
| 331 | ( "GL_PACK_ROW_LENGTH", GLint, ["ctx->Pack.RowLength"], "", None ), |
| 332 | ( "GL_PACK_SKIP_PIXELS", GLint, ["ctx->Pack.SkipPixels"], "", None ), |
| 333 | ( "GL_PACK_SKIP_ROWS", GLint, ["ctx->Pack.SkipRows"], "", None ), |
| 334 | ( "GL_PACK_SWAP_BYTES", GLboolean, ["ctx->Pack.SwapBytes"], "", None ), |
| 335 | ( "GL_PACK_SKIP_IMAGES_EXT", GLint, ["ctx->Pack.SkipImages"], "", None ), |
| 336 | ( "GL_PACK_IMAGE_HEIGHT_EXT", GLint, ["ctx->Pack.ImageHeight"], "", None ), |
| 337 | ( "GL_PACK_INVERT_MESA", GLboolean, ["ctx->Pack.Invert"], "", None ), |
| 338 | ( "GL_PERSPECTIVE_CORRECTION_HINT", GLenum, |
| 339 | ["ctx->Hint.PerspectiveCorrection"], "", None ), |
Brian | b6adf33 | 2007-03-14 14:33:46 -0600 | [diff] [blame] | 340 | ( "GL_PIXEL_MAP_A_TO_A_SIZE", GLint, ["ctx->PixelMaps.AtoA.Size"], "", None ), |
| 341 | ( "GL_PIXEL_MAP_B_TO_B_SIZE", GLint, ["ctx->PixelMaps.BtoB.Size"], "", None ), |
| 342 | ( "GL_PIXEL_MAP_G_TO_G_SIZE", GLint, ["ctx->PixelMaps.GtoG.Size"], "", None ), |
| 343 | ( "GL_PIXEL_MAP_I_TO_A_SIZE", GLint, ["ctx->PixelMaps.ItoA.Size"], "", None ), |
| 344 | ( "GL_PIXEL_MAP_I_TO_B_SIZE", GLint, ["ctx->PixelMaps.ItoB.Size"], "", None ), |
| 345 | ( "GL_PIXEL_MAP_I_TO_G_SIZE", GLint, ["ctx->PixelMaps.ItoG.Size"], "", None ), |
| 346 | ( "GL_PIXEL_MAP_I_TO_I_SIZE", GLint, ["ctx->PixelMaps.ItoI.Size"], "", None ), |
| 347 | ( "GL_PIXEL_MAP_I_TO_R_SIZE", GLint, ["ctx->PixelMaps.ItoR.Size"], "", None ), |
| 348 | ( "GL_PIXEL_MAP_R_TO_R_SIZE", GLint, ["ctx->PixelMaps.RtoR.Size"], "", None ), |
| 349 | ( "GL_PIXEL_MAP_S_TO_S_SIZE", GLint, ["ctx->PixelMaps.StoS.Size"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 350 | ( "GL_POINT_SIZE", GLfloat, ["ctx->Point.Size"], "", None ), |
| 351 | ( "GL_POINT_SIZE_GRANULARITY", GLfloat, |
| 352 | ["ctx->Const.PointSizeGranularity"], "", None ), |
| 353 | ( "GL_POINT_SIZE_RANGE", GLfloat, |
| 354 | ["ctx->Const.MinPointSizeAA", |
| 355 | "ctx->Const.MaxPointSizeAA"], "", None ), |
| 356 | ( "GL_ALIASED_POINT_SIZE_RANGE", GLfloat, |
| 357 | ["ctx->Const.MinPointSize", |
| 358 | "ctx->Const.MaxPointSize"], "", None ), |
| 359 | ( "GL_POINT_SMOOTH", GLboolean, ["ctx->Point.SmoothFlag"], "", None ), |
| 360 | ( "GL_POINT_SMOOTH_HINT", GLenum, ["ctx->Hint.PointSmooth"], "", None ), |
| 361 | ( "GL_POINT_SIZE_MIN_EXT", GLfloat, ["ctx->Point.MinSize"], "", None ), |
| 362 | ( "GL_POINT_SIZE_MAX_EXT", GLfloat, ["ctx->Point.MaxSize"], "", None ), |
| 363 | ( "GL_POINT_FADE_THRESHOLD_SIZE_EXT", GLfloat, |
| 364 | ["ctx->Point.Threshold"], "", None ), |
| 365 | ( "GL_DISTANCE_ATTENUATION_EXT", GLfloat, |
| 366 | ["ctx->Point.Params[0]", |
| 367 | "ctx->Point.Params[1]", |
| 368 | "ctx->Point.Params[2]"], "", None ), |
| 369 | ( "GL_POLYGON_MODE", GLenum, |
| 370 | ["ctx->Polygon.FrontMode", |
| 371 | "ctx->Polygon.BackMode"], "", None ), |
| 372 | ( "GL_POLYGON_OFFSET_BIAS_EXT", GLfloat, ["ctx->Polygon.OffsetUnits"], "", None ), |
| 373 | ( "GL_POLYGON_OFFSET_FACTOR", GLfloat, ["ctx->Polygon.OffsetFactor "], "", None ), |
| 374 | ( "GL_POLYGON_OFFSET_UNITS", GLfloat, ["ctx->Polygon.OffsetUnits "], "", None ), |
| 375 | ( "GL_POLYGON_SMOOTH", GLboolean, ["ctx->Polygon.SmoothFlag"], "", None ), |
| 376 | ( "GL_POLYGON_SMOOTH_HINT", GLenum, ["ctx->Hint.PolygonSmooth"], "", None ), |
| 377 | ( "GL_POLYGON_STIPPLE", GLboolean, ["ctx->Polygon.StippleFlag"], "", None ), |
| 378 | ( "GL_PROJECTION_MATRIX", GLfloat, |
| 379 | [ "matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]", |
| 380 | "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]", |
| 381 | "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]", |
| 382 | "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ], |
| 383 | "const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;", None ), |
| 384 | ( "GL_PROJECTION_STACK_DEPTH", GLint, |
| 385 | ["ctx->ProjectionMatrixStack.Depth + 1"], "", None ), |
Brian Paul | 21a4fb4 | 2006-03-19 00:10:22 +0000 | [diff] [blame] | 386 | ( "GL_READ_BUFFER", GLenum, ["ctx->ReadBuffer->ColorReadBuffer"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 387 | ( "GL_RED_BIAS", GLfloat, ["ctx->Pixel.RedBias"], "", None ), |
Brian Paul | 59e1f3d | 2006-10-24 13:45:08 +0000 | [diff] [blame] | 388 | ( "GL_RED_BITS", GLint, ["ctx->DrawBuffer->Visual.redBits"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 389 | ( "GL_RED_SCALE", GLfloat, ["ctx->Pixel.RedScale"], "", None ), |
| 390 | ( "GL_RENDER_MODE", GLenum, ["ctx->RenderMode"], "", None ), |
| 391 | ( "GL_RESCALE_NORMAL", GLboolean, |
| 392 | ["ctx->Transform.RescaleNormals"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 393 | ( "GL_RGBA_MODE", GLboolean, ["ctx->DrawBuffer->Visual.rgbMode"], |
| 394 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 395 | ( "GL_SCISSOR_BOX", GLint, |
| 396 | ["ctx->Scissor.X", |
| 397 | "ctx->Scissor.Y", |
| 398 | "ctx->Scissor.Width", |
| 399 | "ctx->Scissor.Height"], "", None ), |
| 400 | ( "GL_SCISSOR_TEST", GLboolean, ["ctx->Scissor.Enabled"], "", None ), |
| 401 | ( "GL_SELECTION_BUFFER_SIZE", GLint, ["ctx->Select.BufferSize"], "", None ), |
| 402 | ( "GL_SHADE_MODEL", GLenum, ["ctx->Light.ShadeModel"], "", None ), |
| 403 | ( "GL_SHARED_TEXTURE_PALETTE_EXT", GLboolean, |
| 404 | ["ctx->Texture.SharedPalette"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 405 | ( "GL_STENCIL_BITS", GLint, ["ctx->DrawBuffer->Visual.stencilBits"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 406 | ( "GL_STENCIL_CLEAR_VALUE", GLint, ["ctx->Stencil.Clear"], "", None ), |
| 407 | ( "GL_STENCIL_FAIL", GLenum, |
| 408 | ["ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]"], "", None ), |
| 409 | ( "GL_STENCIL_FUNC", GLenum, |
| 410 | ["ctx->Stencil.Function[ctx->Stencil.ActiveFace]"], "", None ), |
| 411 | ( "GL_STENCIL_PASS_DEPTH_FAIL", GLenum, |
| 412 | ["ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]"], "", None ), |
| 413 | ( "GL_STENCIL_PASS_DEPTH_PASS", GLenum, |
| 414 | ["ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]"], "", None ), |
| 415 | ( "GL_STENCIL_REF", GLint, |
| 416 | ["ctx->Stencil.Ref[ctx->Stencil.ActiveFace]"], "", None ), |
| 417 | ( "GL_STENCIL_TEST", GLboolean, ["ctx->Stencil.Enabled"], "", None ), |
| 418 | ( "GL_STENCIL_VALUE_MASK", GLint, |
| 419 | ["ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]"], "", None ), |
| 420 | ( "GL_STENCIL_WRITEMASK", GLint, |
| 421 | ["ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]"], "", None ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 422 | ( "GL_STEREO", GLboolean, ["ctx->DrawBuffer->Visual.stereoMode"], |
| 423 | "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 424 | ( "GL_SUBPIXEL_BITS", GLint, ["ctx->Const.SubPixelBits"], "", None ), |
| 425 | ( "GL_TEXTURE_1D", GLboolean, ["_mesa_IsEnabled(GL_TEXTURE_1D)"], "", None ), |
| 426 | ( "GL_TEXTURE_2D", GLboolean, ["_mesa_IsEnabled(GL_TEXTURE_2D)"], "", None ), |
| 427 | ( "GL_TEXTURE_3D", GLboolean, ["_mesa_IsEnabled(GL_TEXTURE_3D)"], "", None ), |
| 428 | ( "GL_TEXTURE_BINDING_1D", GLint, |
| 429 | ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name"], "", None ), |
| 430 | ( "GL_TEXTURE_BINDING_2D", GLint, |
| 431 | ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name"], "", None ), |
| 432 | ( "GL_TEXTURE_BINDING_3D", GLint, |
| 433 | ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name"], "", None ), |
| 434 | ( "GL_TEXTURE_ENV_COLOR", GLfloatN, |
| 435 | ["color[0]", "color[1]", "color[2]", "color[3]"], |
| 436 | "const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;", |
| 437 | None ), |
| 438 | ( "GL_TEXTURE_ENV_MODE", GLenum, |
| 439 | ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode"], "", None ), |
| 440 | ( "GL_TEXTURE_GEN_S", GLboolean, |
| 441 | ["((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0)"], "", None ), |
| 442 | ( "GL_TEXTURE_GEN_T", GLboolean, |
| 443 | ["((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0)"], "", None ), |
| 444 | ( "GL_TEXTURE_GEN_R", GLboolean, |
| 445 | ["((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0)"], "", None ), |
| 446 | ( "GL_TEXTURE_GEN_Q", GLboolean, |
| 447 | ["((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0)"], "", None ), |
| 448 | ( "GL_TEXTURE_MATRIX", GLfloat, |
| 449 | ["matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]", |
| 450 | "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]", |
| 451 | "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]", |
| 452 | "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ], |
| 453 | "const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;", None ), |
| 454 | ( "GL_TEXTURE_STACK_DEPTH", GLint, |
| 455 | ["ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1"], "", None ), |
| 456 | ( "GL_UNPACK_ALIGNMENT", GLint, ["ctx->Unpack.Alignment"], "", None ), |
| 457 | ( "GL_UNPACK_LSB_FIRST", GLboolean, ["ctx->Unpack.LsbFirst"], "", None ), |
| 458 | ( "GL_UNPACK_ROW_LENGTH", GLint, ["ctx->Unpack.RowLength"], "", None ), |
| 459 | ( "GL_UNPACK_SKIP_PIXELS", GLint, ["ctx->Unpack.SkipPixels"], "", None ), |
| 460 | ( "GL_UNPACK_SKIP_ROWS", GLint, ["ctx->Unpack.SkipRows"], "", None ), |
| 461 | ( "GL_UNPACK_SWAP_BYTES", GLboolean, ["ctx->Unpack.SwapBytes"], "", None ), |
| 462 | ( "GL_UNPACK_SKIP_IMAGES_EXT", GLint, ["ctx->Unpack.SkipImages"], "", None ), |
| 463 | ( "GL_UNPACK_IMAGE_HEIGHT_EXT", GLint, ["ctx->Unpack.ImageHeight"], "", None ), |
| 464 | ( "GL_UNPACK_CLIENT_STORAGE_APPLE", GLboolean, ["ctx->Unpack.ClientStorage"], "", None ), |
| 465 | ( "GL_VIEWPORT", GLint, [ "ctx->Viewport.X", "ctx->Viewport.Y", |
| 466 | "ctx->Viewport.Width", "ctx->Viewport.Height" ], "", None ), |
| 467 | ( "GL_ZOOM_X", GLfloat, ["ctx->Pixel.ZoomX"], "", None ), |
| 468 | ( "GL_ZOOM_Y", GLfloat, ["ctx->Pixel.ZoomY"], "", None ), |
| 469 | |
| 470 | # Vertex arrays |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 471 | ( "GL_VERTEX_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Vertex.Enabled"], "", None ), |
| 472 | ( "GL_VERTEX_ARRAY_SIZE", GLint, ["ctx->Array.ArrayObj->Vertex.Size"], "", None ), |
| 473 | ( "GL_VERTEX_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Vertex.Type"], "", None ), |
| 474 | ( "GL_VERTEX_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Vertex.Stride"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 475 | ( "GL_VERTEX_ARRAY_COUNT_EXT", GLint, ["0"], "", None ), |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 476 | ( "GL_NORMAL_ARRAY", GLenum, ["ctx->Array.ArrayObj->Normal.Enabled"], "", None ), |
| 477 | ( "GL_NORMAL_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Normal.Type"], "", None ), |
| 478 | ( "GL_NORMAL_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Normal.Stride"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 479 | ( "GL_NORMAL_ARRAY_COUNT_EXT", GLint, ["0"], "", None ), |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 480 | ( "GL_COLOR_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Color.Enabled"], "", None ), |
| 481 | ( "GL_COLOR_ARRAY_SIZE", GLint, ["ctx->Array.ArrayObj->Color.Size"], "", None ), |
| 482 | ( "GL_COLOR_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Color.Type"], "", None ), |
| 483 | ( "GL_COLOR_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Color.Stride"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 484 | ( "GL_COLOR_ARRAY_COUNT_EXT", GLint, ["0"], "", None ), |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 485 | ( "GL_INDEX_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Index.Enabled"], "", None ), |
| 486 | ( "GL_INDEX_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Index.Type"], "", None ), |
| 487 | ( "GL_INDEX_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Index.Stride"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 488 | ( "GL_INDEX_ARRAY_COUNT_EXT", GLint, ["0"], "", None ), |
| 489 | ( "GL_TEXTURE_COORD_ARRAY", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 490 | ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 491 | ( "GL_TEXTURE_COORD_ARRAY_SIZE", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 492 | ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 493 | ( "GL_TEXTURE_COORD_ARRAY_TYPE", GLenum, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 494 | ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 495 | ( "GL_TEXTURE_COORD_ARRAY_STRIDE", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 496 | ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 497 | ( "GL_TEXTURE_COORD_ARRAY_COUNT_EXT", GLint, ["0"], "", None ), |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 498 | ( "GL_EDGE_FLAG_ARRAY", GLboolean, ["ctx->Array.ArrayObj->EdgeFlag.Enabled"], "", None ), |
| 499 | ( "GL_EDGE_FLAG_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->EdgeFlag.Stride"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 500 | ( "GL_EDGE_FLAG_ARRAY_COUNT_EXT", GLint, ["0"], "", None ), |
| 501 | |
| 502 | # GL_ARB_multitexture |
| 503 | ( "GL_MAX_TEXTURE_UNITS_ARB", GLint, |
Brian Paul | da238ee | 2006-04-13 19:21:58 +0000 | [diff] [blame] | 504 | ["ctx->Const.MaxTextureUnits"], "", ["ARB_multitexture"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 505 | ( "GL_ACTIVE_TEXTURE_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 506 | [ "GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit"], "", ["ARB_multitexture"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 507 | ( "GL_CLIENT_ACTIVE_TEXTURE_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 508 | ["GL_TEXTURE0_ARB + ctx->Array.ActiveTexture"], "", ["ARB_multitexture"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 509 | |
| 510 | # GL_ARB_texture_cube_map |
| 511 | ( "GL_TEXTURE_CUBE_MAP_ARB", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 512 | ["_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB)"], "", ["ARB_texture_cube_map"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 513 | ( "GL_TEXTURE_BINDING_CUBE_MAP_ARB", GLint, |
| 514 | ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 515 | "", ["ARB_texture_cube_map"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 516 | ( "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB", GLint, |
| 517 | ["(1 << (ctx->Const.MaxCubeTextureLevels - 1))"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 518 | "", ["ARB_texture_cube_map"]), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 519 | |
| 520 | # GL_ARB_texture_compression */ |
| 521 | ( "GL_TEXTURE_COMPRESSION_HINT_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 522 | ["ctx->Hint.TextureCompression"], "", ["ARB_texture_compression"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 523 | ( "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB", GLint, |
Brian Paul | 008ed1d | 2006-05-09 13:51:17 +0000 | [diff] [blame] | 524 | ["_mesa_get_compressed_formats(ctx, NULL, GL_FALSE)"], |
| 525 | "", ["ARB_texture_compression"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 526 | ( "GL_COMPRESSED_TEXTURE_FORMATS_ARB", GLenum, |
| 527 | [], |
| 528 | """GLint formats[100]; |
Brian Paul | 008ed1d | 2006-05-09 13:51:17 +0000 | [diff] [blame] | 529 | GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE); |
Brian Paul | 1c54579 | 2005-04-30 18:30:16 +0000 | [diff] [blame] | 530 | ASSERT(n <= 100); |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 531 | for (i = 0; i < n; i++) |
Brian Paul | 1c54579 | 2005-04-30 18:30:16 +0000 | [diff] [blame] | 532 | params[i] = ENUM_TO_INT(formats[i]);""", |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 533 | ["ARB_texture_compression"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 534 | |
| 535 | # GL_EXT_compiled_vertex_array |
| 536 | ( "GL_ARRAY_ELEMENT_LOCK_FIRST_EXT", GLint, ["ctx->Array.LockFirst"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 537 | "", ["EXT_compiled_vertex_array"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 538 | ( "GL_ARRAY_ELEMENT_LOCK_COUNT_EXT", GLint, ["ctx->Array.LockCount"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 539 | "", ["EXT_compiled_vertex_array"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 540 | |
| 541 | # GL_ARB_transpose_matrix |
| 542 | ( "GL_TRANSPOSE_COLOR_MATRIX_ARB", GLfloat, |
| 543 | ["matrix[0]", "matrix[4]", "matrix[8]", "matrix[12]", |
| 544 | "matrix[1]", "matrix[5]", "matrix[9]", "matrix[13]", |
| 545 | "matrix[2]", "matrix[6]", "matrix[10]", "matrix[14]", |
| 546 | "matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"], |
| 547 | "const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;", None ), |
| 548 | ( "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB", GLfloat, |
| 549 | ["matrix[0]", "matrix[4]", "matrix[8]", "matrix[12]", |
| 550 | "matrix[1]", "matrix[5]", "matrix[9]", "matrix[13]", |
| 551 | "matrix[2]", "matrix[6]", "matrix[10]", "matrix[14]", |
| 552 | "matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"], |
| 553 | "const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;", None ), |
| 554 | ( "GL_TRANSPOSE_PROJECTION_MATRIX_ARB", GLfloat, |
| 555 | ["matrix[0]", "matrix[4]", "matrix[8]", "matrix[12]", |
| 556 | "matrix[1]", "matrix[5]", "matrix[9]", "matrix[13]", |
| 557 | "matrix[2]", "matrix[6]", "matrix[10]", "matrix[14]", |
| 558 | "matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"], |
| 559 | "const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;", None ), |
| 560 | ( "GL_TRANSPOSE_TEXTURE_MATRIX_ARB", GLfloat, |
| 561 | ["matrix[0]", "matrix[4]", "matrix[8]", "matrix[12]", |
| 562 | "matrix[1]", "matrix[5]", "matrix[9]", "matrix[13]", |
| 563 | "matrix[2]", "matrix[6]", "matrix[10]", "matrix[14]", |
| 564 | "matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"], |
| 565 | "const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;", None ), |
| 566 | |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 567 | # GL_SGI_color_matrix (also in 1.2 imaging) |
| 568 | ( "GL_COLOR_MATRIX_SGI", GLfloat, |
| 569 | ["matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]", |
| 570 | "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]", |
| 571 | "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]", |
| 572 | "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ], |
| 573 | "const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;", None ), |
| 574 | ( "GL_COLOR_MATRIX_STACK_DEPTH_SGI", GLint, |
| 575 | ["ctx->ColorMatrixStack.Depth + 1"], "", None ), |
| 576 | ( "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI", GLint, |
| 577 | ["MAX_COLOR_STACK_DEPTH"], "", None ), |
| 578 | ( "GL_POST_COLOR_MATRIX_RED_SCALE_SGI", GLfloat, |
| 579 | ["ctx->Pixel.PostColorMatrixScale[0]"], "", None ), |
| 580 | ( "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI", GLfloat, |
| 581 | ["ctx->Pixel.PostColorMatrixScale[1]"], "", None ), |
| 582 | ( "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI", GLfloat, |
| 583 | ["ctx->Pixel.PostColorMatrixScale[2]"], "", None ), |
| 584 | ( "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI", GLfloat, |
| 585 | ["ctx->Pixel.PostColorMatrixScale[3]"], "", None ), |
| 586 | ( "GL_POST_COLOR_MATRIX_RED_BIAS_SGI", GLfloat, |
| 587 | ["ctx->Pixel.PostColorMatrixBias[0]"], "", None ), |
| 588 | ( "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI", GLfloat, |
| 589 | ["ctx->Pixel.PostColorMatrixBias[1]"], "", None ), |
| 590 | ( "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI", GLfloat, |
| 591 | ["ctx->Pixel.PostColorMatrixBias[2]"], "", None ), |
| 592 | ( "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI", GLfloat, |
| 593 | ["ctx->Pixel.PostColorMatrixBias[3]"], "", None ), |
| 594 | |
| 595 | # GL_EXT_convolution (also in 1.2 imaging) |
| 596 | ( "GL_CONVOLUTION_1D_EXT", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 597 | ["ctx->Pixel.Convolution1DEnabled"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 598 | ( "GL_CONVOLUTION_2D_EXT", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 599 | ["ctx->Pixel.Convolution2DEnabled"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 600 | ( "GL_SEPARABLE_2D_EXT", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 601 | ["ctx->Pixel.Separable2DEnabled"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 602 | ( "GL_POST_CONVOLUTION_RED_SCALE_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 603 | ["ctx->Pixel.PostConvolutionScale[0]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 604 | ( "GL_POST_CONVOLUTION_GREEN_SCALE_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 605 | ["ctx->Pixel.PostConvolutionScale[1]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 606 | ( "GL_POST_CONVOLUTION_BLUE_SCALE_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 607 | ["ctx->Pixel.PostConvolutionScale[2]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 608 | ( "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 609 | ["ctx->Pixel.PostConvolutionScale[3]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 610 | ( "GL_POST_CONVOLUTION_RED_BIAS_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 611 | ["ctx->Pixel.PostConvolutionBias[0]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 612 | ( "GL_POST_CONVOLUTION_GREEN_BIAS_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 613 | ["ctx->Pixel.PostConvolutionBias[1]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 614 | ( "GL_POST_CONVOLUTION_BLUE_BIAS_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 615 | ["ctx->Pixel.PostConvolutionBias[2]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 616 | ( "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 617 | ["ctx->Pixel.PostConvolutionBias[3]"], "", ["EXT_convolution"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 618 | |
| 619 | # GL_EXT_histogram / GL_ARB_imaging |
| 620 | ( "GL_HISTOGRAM", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 621 | [ "ctx->Pixel.HistogramEnabled" ], "", ["EXT_histogram"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 622 | ( "GL_MINMAX", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 623 | [ "ctx->Pixel.MinMaxEnabled" ], "", ["EXT_histogram"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 624 | |
| 625 | # GL_SGI_color_table / GL_ARB_imaging |
| 626 | ( "GL_COLOR_TABLE_SGI", GLboolean, |
Brian | 7573b58 | 2007-03-16 09:36:12 -0600 | [diff] [blame] | 627 | ["ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]"], "", ["SGI_color_table"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 628 | ( "GL_POST_CONVOLUTION_COLOR_TABLE_SGI", GLboolean, |
Brian | 7573b58 | 2007-03-16 09:36:12 -0600 | [diff] [blame] | 629 | ["ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION]"], "", ["SGI_color_table"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 630 | ( "GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI", GLboolean, |
Brian | 7573b58 | 2007-03-16 09:36:12 -0600 | [diff] [blame] | 631 | ["ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]"], "", ["SGI_color_table"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 632 | |
| 633 | # GL_SGI_texture_color_table |
| 634 | ( "GL_TEXTURE_COLOR_TABLE_SGI", GLboolean, |
| 635 | ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 636 | "", ["SGI_texture_color_table"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 637 | |
| 638 | # GL_EXT_secondary_color |
| 639 | ( "GL_COLOR_SUM_EXT", GLboolean, |
Roland Scheidegger | da16813 | 2006-03-02 12:06:57 +0000 | [diff] [blame] | 640 | ["ctx->Fog.ColorSumEnabled"], "", |
| 641 | ["EXT_secondary_color", "ARB_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 642 | ( "GL_CURRENT_SECONDARY_COLOR_EXT", GLfloatN, |
| 643 | ["ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]", |
| 644 | "ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]", |
| 645 | "ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]", |
| 646 | "ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 647 | "FLUSH_CURRENT(ctx, 0);", ["EXT_secondary_color"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 648 | ( "GL_SECONDARY_COLOR_ARRAY_EXT", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 649 | ["ctx->Array.ArrayObj->SecondaryColor.Enabled"], "", ["EXT_secondary_color"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 650 | ( "GL_SECONDARY_COLOR_ARRAY_TYPE_EXT", GLenum, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 651 | ["ctx->Array.ArrayObj->SecondaryColor.Type"], "", ["EXT_secondary_color"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 652 | ( "GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 653 | ["ctx->Array.ArrayObj->SecondaryColor.Stride"], "", ["EXT_secondary_color"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 654 | ( "GL_SECONDARY_COLOR_ARRAY_SIZE_EXT", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 655 | ["ctx->Array.ArrayObj->SecondaryColor.Size"], "", ["EXT_secondary_color"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 656 | |
| 657 | # GL_EXT_fog_coord |
| 658 | ( "GL_CURRENT_FOG_COORDINATE_EXT", GLfloat, |
| 659 | ["ctx->Current.Attrib[VERT_ATTRIB_FOG][0]"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 660 | "FLUSH_CURRENT(ctx, 0);", ["EXT_fog_coord"] ), |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 661 | ( "GL_FOG_COORDINATE_ARRAY_EXT", GLboolean, ["ctx->Array.ArrayObj->FogCoord.Enabled"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 662 | "", ["EXT_fog_coord"] ), |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 663 | ( "GL_FOG_COORDINATE_ARRAY_TYPE_EXT", GLenum, ["ctx->Array.ArrayObj->FogCoord.Type"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 664 | "", ["EXT_fog_coord"] ), |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 665 | ( "GL_FOG_COORDINATE_ARRAY_STRIDE_EXT", GLint, ["ctx->Array.ArrayObj->FogCoord.Stride"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 666 | "", ["EXT_fog_coord"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 667 | ( "GL_FOG_COORDINATE_SOURCE_EXT", GLenum, ["ctx->Fog.FogCoordinateSource"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 668 | "", ["EXT_fog_coord"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 669 | |
| 670 | # GL_EXT_texture_lod_bias |
| 671 | ( "GL_MAX_TEXTURE_LOD_BIAS_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 672 | ["ctx->Const.MaxTextureLodBias"], "", ["EXT_texture_lod_bias"]), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 673 | |
| 674 | # GL_EXT_texture_filter_anisotropic |
| 675 | ( "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 676 | ["ctx->Const.MaxTextureMaxAnisotropy"], "", ["EXT_texture_filter_anisotropic"]), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 677 | |
| 678 | # GL_ARB_multisample |
| 679 | ( "GL_MULTISAMPLE_ARB", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 680 | ["ctx->Multisample.Enabled"], "", ["ARB_multisample"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 681 | ( "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 682 | ["ctx->Multisample.SampleAlphaToCoverage"], "", ["ARB_multisample"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 683 | ( "GL_SAMPLE_ALPHA_TO_ONE_ARB", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 684 | ["ctx->Multisample.SampleAlphaToOne"], "", ["ARB_multisample"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 685 | ( "GL_SAMPLE_COVERAGE_ARB", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 686 | ["ctx->Multisample.SampleCoverage"], "", ["ARB_multisample"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 687 | ( "GL_SAMPLE_COVERAGE_VALUE_ARB", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 688 | ["ctx->Multisample.SampleCoverageValue"], "", ["ARB_multisample"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 689 | ( "GL_SAMPLE_COVERAGE_INVERT_ARB", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 690 | ["ctx->Multisample.SampleCoverageInvert"], "", ["ARB_multisample"] ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 691 | ( "GL_SAMPLE_BUFFERS_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 692 | ["ctx->DrawBuffer->Visual.sampleBuffers"], "", ["ARB_multisample"] ), |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 693 | ( "GL_SAMPLES_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 694 | ["ctx->DrawBuffer->Visual.samples"], "", ["ARB_multisample"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 695 | |
| 696 | # GL_IBM_rasterpos_clip |
| 697 | ( "GL_RASTER_POSITION_UNCLIPPED_IBM", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 698 | ["ctx->Transform.RasterPositionUnclipped"], "", ["IBM_rasterpos_clip"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 699 | |
| 700 | # GL_NV_point_sprite |
Roland Scheidegger | da16813 | 2006-03-02 12:06:57 +0000 | [diff] [blame] | 701 | ( "GL_POINT_SPRITE_NV", GLboolean, ["ctx->Point.PointSprite"], # == GL_POINT_SPRITE_ARB |
| 702 | "", ["NV_point_sprite", "ARB_point_sprite"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 703 | ( "GL_POINT_SPRITE_R_MODE_NV", GLenum, ["ctx->Point.SpriteRMode"], |
Roland Scheidegger | da16813 | 2006-03-02 12:06:57 +0000 | [diff] [blame] | 704 | "", ["NV_point_sprite"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 705 | ( "GL_POINT_SPRITE_COORD_ORIGIN", GLenum, ["ctx->Point.SpriteOrigin"], |
Roland Scheidegger | da16813 | 2006-03-02 12:06:57 +0000 | [diff] [blame] | 706 | "", ["NV_point_sprite", "ARB_point_sprite"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 707 | |
| 708 | # GL_SGIS_generate_mipmap |
| 709 | ( "GL_GENERATE_MIPMAP_HINT_SGIS", GLenum, ["ctx->Hint.GenerateMipmap"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 710 | "", ["SGIS_generate_mipmap"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 711 | |
| 712 | # GL_NV_vertex_program |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 713 | ( "GL_VERTEX_PROGRAM_BINDING_NV", GLint, |
| 714 | ["(ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0)"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 715 | "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 716 | ( "GL_VERTEX_ATTRIB_ARRAY0_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 717 | ["ctx->Array.ArrayObj->VertexAttrib[0].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 718 | ( "GL_VERTEX_ATTRIB_ARRAY1_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 719 | ["ctx->Array.ArrayObj->VertexAttrib[1].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 720 | ( "GL_VERTEX_ATTRIB_ARRAY2_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 721 | ["ctx->Array.ArrayObj->VertexAttrib[2].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 722 | ( "GL_VERTEX_ATTRIB_ARRAY3_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 723 | ["ctx->Array.ArrayObj->VertexAttrib[3].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 724 | ( "GL_VERTEX_ATTRIB_ARRAY4_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 725 | ["ctx->Array.ArrayObj->VertexAttrib[4].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 726 | ( "GL_VERTEX_ATTRIB_ARRAY5_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 727 | ["ctx->Array.ArrayObj->VertexAttrib[5].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 728 | ( "GL_VERTEX_ATTRIB_ARRAY6_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 729 | ["ctx->Array.ArrayObj->VertexAttrib[6].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 730 | ( "GL_VERTEX_ATTRIB_ARRAY7_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 731 | ["ctx->Array.ArrayObj->VertexAttrib[7].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 732 | ( "GL_VERTEX_ATTRIB_ARRAY8_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 733 | ["ctx->Array.ArrayObj->VertexAttrib[8].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 734 | ( "GL_VERTEX_ATTRIB_ARRAY9_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 735 | ["ctx->Array.ArrayObj->VertexAttrib[9].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 736 | ( "GL_VERTEX_ATTRIB_ARRAY10_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 737 | ["ctx->Array.ArrayObj->VertexAttrib[10].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 738 | ( "GL_VERTEX_ATTRIB_ARRAY11_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 739 | ["ctx->Array.ArrayObj->VertexAttrib[11].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 740 | ( "GL_VERTEX_ATTRIB_ARRAY12_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 741 | ["ctx->Array.ArrayObj->VertexAttrib[12].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 742 | ( "GL_VERTEX_ATTRIB_ARRAY13_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 743 | ["ctx->Array.ArrayObj->VertexAttrib[13].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 744 | ( "GL_VERTEX_ATTRIB_ARRAY14_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 745 | ["ctx->Array.ArrayObj->VertexAttrib[14].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 746 | ( "GL_VERTEX_ATTRIB_ARRAY15_NV", GLboolean, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 747 | ["ctx->Array.ArrayObj->VertexAttrib[15].Enabled"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 748 | ( "GL_MAP1_VERTEX_ATTRIB0_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 749 | ["ctx->Eval.Map1Attrib[0]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 750 | ( "GL_MAP1_VERTEX_ATTRIB1_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 751 | ["ctx->Eval.Map1Attrib[1]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 752 | ( "GL_MAP1_VERTEX_ATTRIB2_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 753 | ["ctx->Eval.Map1Attrib[2]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 754 | ( "GL_MAP1_VERTEX_ATTRIB3_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 755 | ["ctx->Eval.Map1Attrib[3]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 756 | ( "GL_MAP1_VERTEX_ATTRIB4_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 757 | ["ctx->Eval.Map1Attrib[4]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 758 | ( "GL_MAP1_VERTEX_ATTRIB5_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 759 | ["ctx->Eval.Map1Attrib[5]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 760 | ( "GL_MAP1_VERTEX_ATTRIB6_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 761 | ["ctx->Eval.Map1Attrib[6]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 762 | ( "GL_MAP1_VERTEX_ATTRIB7_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 763 | ["ctx->Eval.Map1Attrib[7]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 764 | ( "GL_MAP1_VERTEX_ATTRIB8_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 765 | ["ctx->Eval.Map1Attrib[8]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 766 | ( "GL_MAP1_VERTEX_ATTRIB9_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 767 | ["ctx->Eval.Map1Attrib[9]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 768 | ( "GL_MAP1_VERTEX_ATTRIB10_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 769 | ["ctx->Eval.Map1Attrib[10]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 770 | ( "GL_MAP1_VERTEX_ATTRIB11_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 771 | ["ctx->Eval.Map1Attrib[11]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 772 | ( "GL_MAP1_VERTEX_ATTRIB12_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 773 | ["ctx->Eval.Map1Attrib[12]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 774 | ( "GL_MAP1_VERTEX_ATTRIB13_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 775 | ["ctx->Eval.Map1Attrib[13]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 776 | ( "GL_MAP1_VERTEX_ATTRIB14_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 777 | ["ctx->Eval.Map1Attrib[14]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 778 | ( "GL_MAP1_VERTEX_ATTRIB15_4_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 779 | ["ctx->Eval.Map1Attrib[15]"], "", ["NV_vertex_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 780 | |
| 781 | # GL_NV_fragment_program |
| 782 | ( "GL_FRAGMENT_PROGRAM_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 783 | ["ctx->FragmentProgram.Enabled"], "", ["NV_fragment_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 784 | ( "GL_FRAGMENT_PROGRAM_BINDING_NV", GLint, |
Brian Paul | 4f1f5e3 | 2005-02-09 18:46:16 +0000 | [diff] [blame] | 785 | ["ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 786 | "", ["NV_fragment_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 787 | ( "GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 788 | ["MAX_NV_FRAGMENT_PROGRAM_PARAMS"], "", ["NV_fragment_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 789 | |
| 790 | # GL_NV_texture_rectangle |
| 791 | ( "GL_TEXTURE_RECTANGLE_NV", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 792 | ["_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV)"], "", ["NV_texture_rectangle"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 793 | ( "GL_TEXTURE_BINDING_RECTANGLE_NV", GLint, |
| 794 | ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 795 | "", ["NV_texture_rectangle"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 796 | ( "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 797 | ["ctx->Const.MaxTextureRectSize"], "", ["NV_texture_rectangle"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 798 | |
| 799 | # GL_EXT_stencil_two_side |
| 800 | ( "GL_STENCIL_TEST_TWO_SIDE_EXT", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 801 | ["ctx->Stencil.TestTwoSide"], "", ["EXT_stencil_two_side"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 802 | ( "GL_ACTIVE_STENCIL_FACE_EXT", GLenum, |
| 803 | ["ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 804 | "", ["EXT_stencil_two_side"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 805 | |
| 806 | # GL_NV_light_max_exponent |
| 807 | ( "GL_MAX_SHININESS_NV", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 808 | ["ctx->Const.MaxShininess"], "", ["NV_light_max_exponent"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 809 | ( "GL_MAX_SPOT_EXPONENT_NV", GLfloat, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 810 | ["ctx->Const.MaxSpotExponent"], "", ["NV_light_max_exponent"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 811 | |
| 812 | # GL_ARB_vertex_buffer_object |
| 813 | ( "GL_ARRAY_BUFFER_BINDING_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 814 | ["ctx->Array.ArrayBufferObj->Name"], "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 815 | ( "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 816 | ["ctx->Array.ArrayObj->Vertex.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 817 | ( "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 818 | ["ctx->Array.ArrayObj->Normal.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 819 | ( "GL_COLOR_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 820 | ["ctx->Array.ArrayObj->Color.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 821 | ( "GL_INDEX_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 822 | ["ctx->Array.ArrayObj->Index.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 823 | ( "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 824 | ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 825 | "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 826 | ( "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 827 | ["ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 828 | ( "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 829 | ["ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 830 | "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 831 | ( "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB", GLint, |
Ian Romanick | ee34e6e | 2006-06-12 16:26:29 +0000 | [diff] [blame] | 832 | ["ctx->Array.ArrayObj->FogCoord.BufferObj->Name"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 833 | "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 834 | # GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB - not supported |
| 835 | ( "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 836 | ["ctx->Array.ElementArrayBufferObj->Name"], |
| 837 | "", ["ARB_vertex_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 838 | |
| 839 | # GL_EXT_pixel_buffer_object |
| 840 | ( "GL_PIXEL_PACK_BUFFER_BINDING_EXT", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 841 | ["ctx->Pack.BufferObj->Name"], "", ["EXT_pixel_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 842 | ( "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 843 | ["ctx->Unpack.BufferObj->Name"], "", ["EXT_pixel_buffer_object"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 844 | |
| 845 | # GL_ARB_vertex_program |
Roland Scheidegger | e1e03b3 | 2006-03-03 15:03:04 +0000 | [diff] [blame] | 846 | ( "GL_VERTEX_PROGRAM_ARB", GLboolean, # == GL_VERTEX_PROGRAM_NV |
| 847 | ["ctx->VertexProgram.Enabled"], "", |
| 848 | ["ARB_vertex_program", "NV_vertex_program"] ), |
| 849 | ( "GL_VERTEX_PROGRAM_POINT_SIZE_ARB", GLboolean, # == GL_VERTEX_PROGRAM_POINT_SIZE_NV |
| 850 | ["ctx->VertexProgram.PointSizeEnabled"], "", |
| 851 | ["ARB_vertex_program", "NV_vertex_program"] ), |
| 852 | ( "GL_VERTEX_PROGRAM_TWO_SIDE_ARB", GLboolean, # == GL_VERTEX_PROGRAM_TWO_SIDE_NV |
| 853 | ["ctx->VertexProgram.TwoSideEnabled"], "", |
| 854 | ["ARB_vertex_program", "NV_vertex_program"] ), |
| 855 | ( "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB", GLint, # == GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV |
| 856 | ["ctx->Const.MaxProgramMatrixStackDepth"], "", |
| 857 | ["ARB_vertex_program", "ARB_fragment_program", "NV_vertex_program"] ), |
| 858 | ( "GL_MAX_PROGRAM_MATRICES_ARB", GLint, # == GL_MAX_TRACK_MATRICES_NV |
| 859 | ["ctx->Const.MaxProgramMatrices"], "", |
| 860 | ["ARB_vertex_program", "ARB_fragment_program", "NV_vertex_program"] ), |
| 861 | ( "GL_CURRENT_MATRIX_STACK_DEPTH_ARB", GLboolean, # == GL_CURRENT_MATRIX_STACK_DEPTH_NV |
| 862 | ["ctx->CurrentStack->Depth + 1"], "", |
| 863 | ["ARB_vertex_program", "ARB_fragment_program", "NV_vertex_program"] ), |
| 864 | ( "GL_CURRENT_MATRIX_ARB", GLfloat, # == GL_CURRENT_MATRIX_NV |
| 865 | ["matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]", |
| 866 | "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]", |
| 867 | "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]", |
| 868 | "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ], |
| 869 | "const GLfloat *matrix = ctx->CurrentStack->Top->m;", |
| 870 | ["ARB_vertex_program", "ARB_fragment_program", "NV_fragment_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 871 | ( "GL_TRANSPOSE_CURRENT_MATRIX_ARB", GLfloat, |
| 872 | ["matrix[0]", "matrix[4]", "matrix[8]", "matrix[12]", |
| 873 | "matrix[1]", "matrix[5]", "matrix[9]", "matrix[13]", |
| 874 | "matrix[2]", "matrix[6]", "matrix[10]", "matrix[14]", |
| 875 | "matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 876 | "const GLfloat *matrix = ctx->CurrentStack->Top->m;", |
Roland Scheidegger | da16813 | 2006-03-02 12:06:57 +0000 | [diff] [blame] | 877 | ["ARB_vertex_program", "ARB_fragment_program"] ), |
Roland Scheidegger | e1e03b3 | 2006-03-03 15:03:04 +0000 | [diff] [blame] | 878 | ( "GL_MAX_VERTEX_ATTRIBS_ARB", GLint, |
| 879 | ["ctx->Const.VertexProgram.MaxAttribs"], "", ["ARB_vertex_program"] ), |
| 880 | ( "GL_PROGRAM_ERROR_POSITION_ARB", GLint, # == GL_PROGRAM_ERROR_POSITION_NV |
| 881 | ["ctx->Program.ErrorPos"], "", ["NV_vertex_program", |
| 882 | "ARB_vertex_program", "NV_fragment_program", "ARB_fragment_program"] ), |
Roland Scheidegger | da16813 | 2006-03-02 12:06:57 +0000 | [diff] [blame] | 883 | |
| 884 | # GL_ARB_fragment_program |
| 885 | ( "GL_FRAGMENT_PROGRAM_ARB", GLboolean, |
| 886 | ["ctx->FragmentProgram.Enabled"], "", ["ARB_fragment_program"] ), |
Roland Scheidegger | e1e03b3 | 2006-03-03 15:03:04 +0000 | [diff] [blame] | 887 | ( "GL_MAX_TEXTURE_COORDS_ARB", GLint, # == GL_MAX_TEXTURE_COORDS_NV |
| 888 | ["ctx->Const.MaxTextureCoordUnits"], "", |
| 889 | ["ARB_fragment_program", "NV_fragment_program"] ), |
| 890 | ( "GL_MAX_TEXTURE_IMAGE_UNITS_ARB", GLint, # == GL_MAX_TEXTURE_IMAGE_UNITS_NV |
| 891 | ["ctx->Const.MaxTextureImageUnits"], "", |
| 892 | ["ARB_fragment_program", "NV_fragment_program"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 893 | |
| 894 | # GL_EXT_depth_bounds_test |
| 895 | ( "GL_DEPTH_BOUNDS_TEST_EXT", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 896 | ["ctx->Depth.BoundsTest"], "", ["EXT_depth_bounds_test"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 897 | ( "GL_DEPTH_BOUNDS_EXT", GLfloat, |
| 898 | ["ctx->Depth.BoundsMin", "ctx->Depth.BoundsMax"], |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 899 | "", ["EXT_depth_bounds_test"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 900 | |
| 901 | # GL_MESA_program_debug |
| 902 | ( "GL_FRAGMENT_PROGRAM_CALLBACK_MESA", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 903 | ["ctx->FragmentProgram.CallbackEnabled"], "", ["MESA_program_debug"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 904 | ( "GL_VERTEX_PROGRAM_CALLBACK_MESA", GLboolean, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 905 | ["ctx->VertexProgram.CallbackEnabled"], "", ["MESA_program_debug"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 906 | ( "GL_FRAGMENT_PROGRAM_POSITION_MESA", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 907 | ["ctx->FragmentProgram.CurrentPosition"], "", ["MESA_program_debug"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 908 | ( "GL_VERTEX_PROGRAM_POSITION_MESA", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 909 | ["ctx->VertexProgram.CurrentPosition"], "", ["MESA_program_debug"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 910 | |
| 911 | # GL_ARB_draw_buffers |
| 912 | ( "GL_MAX_DRAW_BUFFERS_ARB", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 913 | ["ctx->Const.MaxDrawBuffers"], "", ["ARB_draw_buffers"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 914 | ( "GL_DRAW_BUFFER0_ARB", GLenum, |
Brian Paul | 21a4fb4 | 2006-03-19 00:10:22 +0000 | [diff] [blame] | 915 | ["ctx->DrawBuffer->ColorDrawBuffer[0]"], "", ["ARB_draw_buffers"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 916 | ( "GL_DRAW_BUFFER1_ARB", GLenum, |
| 917 | ["buffer"], |
| 918 | """GLenum buffer; |
| 919 | if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { |
| 920 | _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)"); |
| 921 | return; |
| 922 | } |
Brian Paul | 21a4fb4 | 2006-03-19 00:10:22 +0000 | [diff] [blame] | 923 | buffer = ctx->DrawBuffer->ColorDrawBuffer[1];""", ["ARB_draw_buffers"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 924 | ( "GL_DRAW_BUFFER2_ARB", GLenum, |
| 925 | ["buffer"], |
| 926 | """GLenum buffer; |
| 927 | if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { |
| 928 | _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)"); |
| 929 | return; |
| 930 | } |
Brian Paul | 21a4fb4 | 2006-03-19 00:10:22 +0000 | [diff] [blame] | 931 | buffer = ctx->DrawBuffer->ColorDrawBuffer[2];""", ["ARB_draw_buffers"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 932 | ( "GL_DRAW_BUFFER3_ARB", GLenum, |
| 933 | ["buffer"], |
| 934 | """GLenum buffer; |
| 935 | if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { |
| 936 | _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)"); |
| 937 | return; |
| 938 | } |
Brian Paul | 21a4fb4 | 2006-03-19 00:10:22 +0000 | [diff] [blame] | 939 | buffer = ctx->DrawBuffer->ColorDrawBuffer[3];""", ["ARB_draw_buffers"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 940 | # XXX Add more GL_DRAW_BUFFERn_ARB entries as needed in the future |
| 941 | |
| 942 | # GL_OES_read_format |
| 943 | ( "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 944 | ["ctx->Const.ColorReadType"], "", ["OES_read_format"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 945 | ( "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES", GLint, |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 946 | ["ctx->Const.ColorReadFormat"], "", ["OES_read_format"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 947 | |
| 948 | # GL_ATI_fragment_shader |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 949 | ( "GL_NUM_FRAGMENT_REGISTERS_ATI", GLint, ["6"], "", ["ATI_fragment_shader"] ), |
| 950 | ( "GL_NUM_FRAGMENT_CONSTANTS_ATI", GLint, ["8"], "", ["ATI_fragment_shader"] ), |
| 951 | ( "GL_NUM_PASSES_ATI", GLint, ["2"], "", ["ATI_fragment_shader"] ), |
| 952 | ( "GL_NUM_INSTRUCTIONS_PER_PASS_ATI", GLint, ["8"], "", ["ATI_fragment_shader"] ), |
| 953 | ( "GL_NUM_INSTRUCTIONS_TOTAL_ATI", GLint, ["16"], "", ["ATI_fragment_shader"] ), |
| 954 | ( "GL_COLOR_ALPHA_PAIRING_ATI", GLboolean, ["GL_TRUE"], "", ["ATI_fragment_shader"] ), |
| 955 | ( "GL_NUM_LOOPBACK_COMPONENTS_ATI", GLint, ["3"], "", ["ATI_fragment_shader"] ), |
| 956 | ( "GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI", GLint, ["3"], "", ["ATI_fragment_shader"] ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 957 | |
| 958 | # OpenGL 2.0 |
| 959 | ( "GL_STENCIL_BACK_FUNC", GLenum, ["ctx->Stencil.Function[1]"], "", None ), |
| 960 | ( "GL_STENCIL_BACK_VALUE_MASK", GLint, ["ctx->Stencil.ValueMask[1]"], "", None ), |
Brian Paul | e441427 | 2006-11-02 22:53:32 +0000 | [diff] [blame] | 961 | ( "GL_STENCIL_BACK_WRITEMASK", GLint, ["ctx->Stencil.WriteMask[1]"], "", None ), |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 962 | ( "GL_STENCIL_BACK_REF", GLint, ["ctx->Stencil.Ref[1]"], "", None ), |
| 963 | ( "GL_STENCIL_BACK_FAIL", GLenum, ["ctx->Stencil.FailFunc[1]"], "", None ), |
| 964 | ( "GL_STENCIL_BACK_PASS_DEPTH_FAIL", GLenum, ["ctx->Stencil.ZFailFunc[1]"], "", None ), |
| 965 | ( "GL_STENCIL_BACK_PASS_DEPTH_PASS", GLenum, ["ctx->Stencil.ZPassFunc[1]"], "", None ), |
| 966 | |
Brian Paul | 3deaa01 | 2005-02-07 05:08:24 +0000 | [diff] [blame] | 967 | # GL_EXT_framebuffer_object |
Brian Paul | e4b2356 | 2005-05-04 20:11:35 +0000 | [diff] [blame] | 968 | ( "GL_FRAMEBUFFER_BINDING_EXT", GLint, ["ctx->DrawBuffer->Name"], "", |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 969 | ["EXT_framebuffer_object"] ), |
Brian Paul | 3deaa01 | 2005-02-07 05:08:24 +0000 | [diff] [blame] | 970 | ( "GL_RENDERBUFFER_BINDING_EXT", GLint, |
| 971 | ["ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0"], "", |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 972 | ["EXT_framebuffer_object"] ), |
Brian Paul | 3deaa01 | 2005-02-07 05:08:24 +0000 | [diff] [blame] | 973 | ( "GL_MAX_COLOR_ATTACHMENTS_EXT", GLint, |
| 974 | ["ctx->Const.MaxColorAttachments"], "", |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 975 | ["EXT_framebuffer_object"] ), |
Brian Paul | 3deaa01 | 2005-02-07 05:08:24 +0000 | [diff] [blame] | 976 | ( "GL_MAX_RENDERBUFFER_SIZE_EXT", GLint, |
| 977 | ["ctx->Const.MaxRenderbufferSize"], "", |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 978 | ["EXT_framebuffer_object"] ), |
Michal Krol | 6372ea0 | 2005-04-14 10:27:19 +0000 | [diff] [blame] | 979 | |
| 980 | # GL_ARB_fragment_shader |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 981 | ( "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB", GLint, |
Brian Paul | 90fcf6c | 2006-11-01 00:12:41 +0000 | [diff] [blame] | 982 | ["ctx->Const.FragmentProgram.MaxUniformComponents"], "", |
| 983 | ["ARB_fragment_shader"] ), |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 984 | ( "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB", GLenum, |
| 985 | ["ctx->Hint.FragmentShaderDerivative"], "", ["ARB_fragment_shader"] ), |
| 986 | |
| 987 | # GL_ARB_vertex_shader |
| 988 | ( "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB", GLint, |
Brian Paul | 90fcf6c | 2006-11-01 00:12:41 +0000 | [diff] [blame] | 989 | ["ctx->Const.VertexProgram.MaxUniformComponents"], "", |
| 990 | ["ARB_vertex_shader"] ), |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 991 | ( "GL_MAX_VARYING_FLOATS_ARB", GLint, |
Brian | a90046f | 2006-12-15 10:07:26 -0700 | [diff] [blame] | 992 | ["ctx->Const.MaxVarying * 4"], "", ["ARB_vertex_shader"] ), |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 993 | ( "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB", GLint, |
Brian Paul | 90fcf6c | 2006-11-01 00:12:41 +0000 | [diff] [blame] | 994 | ["ctx->Const.MaxVertexTextureImageUnits"], "", ["ARB_vertex_shader"] ), |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 995 | ( "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB", GLint, |
Brian | b9ea936 | 2007-03-09 15:41:25 -0700 | [diff] [blame] | 996 | ["MAX_COMBINED_TEXTURE_IMAGE_UNITS"], "", ["ARB_vertex_shader"] ), |
| 997 | |
| 998 | # GL_ARB_shader_objects |
| 999 | # Actually, this token isn't part of GL_ARB_shader_objects, but is |
| 1000 | # close enough for now. |
| 1001 | ( "GL_CURRENT_PROGRAM", GLint, |
| 1002 | ["ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0"], |
| 1003 | "", ["ARB_shader_objects"] ) |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1004 | ] |
| 1005 | |
| 1006 | |
| 1007 | def ConversionFunc(fromType, toType): |
| 1008 | """Return the name of the macro to convert between two data types.""" |
| 1009 | if fromType == toType: |
| 1010 | return "" |
| 1011 | elif fromType == GLfloat and toType == GLint: |
| 1012 | return "IROUND" |
| 1013 | elif fromType == GLfloatN and toType == GLfloat: |
| 1014 | return "" |
| 1015 | elif fromType == GLint and toType == GLfloat: # but not GLfloatN! |
| 1016 | return "(GLfloat)" |
| 1017 | else: |
| 1018 | if fromType == GLfloatN: |
| 1019 | fromType = GLfloat |
| 1020 | fromStr = TypeStrings[fromType] |
| 1021 | fromStr = string.upper(fromStr[2:]) |
| 1022 | toStr = TypeStrings[toType] |
| 1023 | toStr = string.upper(toStr[2:]) |
| 1024 | return fromStr + "_TO_" + toStr |
| 1025 | |
| 1026 | |
| 1027 | def EmitGetFunction(stateVars, returnType): |
| 1028 | """Emit the code to implement glGetBooleanv, glGetIntegerv or glGetFloatv.""" |
| 1029 | assert (returnType == GLboolean or |
| 1030 | returnType == GLint or |
| 1031 | returnType == GLfloat) |
| 1032 | |
| 1033 | strType = TypeStrings[returnType] |
| 1034 | # Capitalize first letter of return type |
| 1035 | if returnType == GLint: |
| 1036 | function = "GetIntegerv" |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1037 | elif returnType == GLboolean: |
| 1038 | function = "GetBooleanv" |
| 1039 | elif returnType == GLfloat: |
| 1040 | function = "GetFloatv" |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1041 | else: |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1042 | abort() |
| 1043 | |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1044 | print "void GLAPIENTRY" |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1045 | print "_mesa_%s( GLenum pname, %s *params )" % (function, strType) |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1046 | print "{" |
| 1047 | print " GET_CURRENT_CONTEXT(ctx);" |
| 1048 | print " ASSERT_OUTSIDE_BEGIN_END(ctx);" |
| 1049 | print "" |
| 1050 | print " if (!params)" |
| 1051 | print " return;" |
| 1052 | print "" |
Brian Paul | 474f28e | 2005-10-08 14:41:17 +0000 | [diff] [blame] | 1053 | print " if (ctx->NewState)" |
| 1054 | print " _mesa_update_state(ctx);" |
| 1055 | print "" |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1056 | print " if (ctx->Driver.%s &&" % function |
| 1057 | print " ctx->Driver.%s(ctx, pname, params))" % function |
| 1058 | print " return;" |
| 1059 | print "" |
| 1060 | print " switch (pname) {" |
| 1061 | |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1062 | for (name, varType, state, optionalCode, extensions) in stateVars: |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1063 | print " case " + name + ":" |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1064 | if extensions: |
| 1065 | if len(extensions) == 1: |
| 1066 | print (' CHECK_EXT1(%s, "%s");' % |
| 1067 | (extensions[0], function)) |
Roland Scheidegger | 93da673 | 2006-03-01 23:11:14 +0000 | [diff] [blame] | 1068 | elif len(extensions) == 2: |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1069 | print (' CHECK_EXT2(%s, %s, "%s");' % |
| 1070 | (extensions[0], extensions[1], function)) |
Roland Scheidegger | 93da673 | 2006-03-01 23:11:14 +0000 | [diff] [blame] | 1071 | elif len(extensions) == 3: |
| 1072 | print (' CHECK_EXT3(%s, %s, %s, "%s");' % |
| 1073 | (extensions[0], extensions[1], extensions[2], function)) |
| 1074 | else: |
| 1075 | assert len(extensions) == 4 |
| 1076 | print (' CHECK_EXT4(%s, %s, %s, %s, "%s");' % |
| 1077 | (extensions[0], extensions[1], extensions[2], extensions[3], function)) |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1078 | if optionalCode: |
| 1079 | print " {" |
| 1080 | print " " + optionalCode |
| 1081 | conversion = ConversionFunc(varType, returnType) |
| 1082 | n = len(state) |
| 1083 | for i in range(n): |
| 1084 | if conversion: |
| 1085 | print " params[%d] = %s(%s);" % (i, conversion, state[i]) |
| 1086 | else: |
| 1087 | print " params[%d] = %s;" % (i, state[i]) |
| 1088 | if optionalCode: |
| 1089 | print " }" |
| 1090 | print " break;" |
| 1091 | |
| 1092 | print " default:" |
| 1093 | print ' _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(pname=0x%%x)", pname);' % function |
| 1094 | print " }" |
| 1095 | print "}" |
| 1096 | print "" |
| 1097 | return |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | def EmitHeader(): |
| 1102 | """Print the get.c file header.""" |
| 1103 | print """ |
| 1104 | /*** |
| 1105 | *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py |
| 1106 | ***/ |
| 1107 | |
| 1108 | #include "glheader.h" |
| 1109 | #include "context.h" |
| 1110 | #include "enable.h" |
| 1111 | #include "extensions.h" |
Brian Paul | 3deaa01 | 2005-02-07 05:08:24 +0000 | [diff] [blame] | 1112 | #include "fbobject.h" |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1113 | #include "get.h" |
| 1114 | #include "macros.h" |
| 1115 | #include "mtypes.h" |
Brian Paul | 474f28e | 2005-10-08 14:41:17 +0000 | [diff] [blame] | 1116 | #include "state.h" |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1117 | #include "texcompress.h" |
| 1118 | |
| 1119 | |
| 1120 | #define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE ) |
| 1121 | |
| 1122 | #define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE ) |
| 1123 | |
| 1124 | #define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE ) |
| 1125 | #define ENUM_TO_INT(E) ( (GLint) (E) ) |
| 1126 | #define ENUM_TO_FLOAT(E) ( (GLfloat) (E) ) |
| 1127 | |
| 1128 | #define BOOLEAN_TO_INT(B) ( (GLint) (B) ) |
| 1129 | #define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F ) |
| 1130 | |
| 1131 | |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1132 | /* |
| 1133 | * Check if named extension is enabled, if not generate error and return. |
| 1134 | */ |
| 1135 | #define CHECK_EXT1(EXT1, FUNC) \\ |
| 1136 | if (!ctx->Extensions.EXT1) { \\ |
Roland Scheidegger | 93da673 | 2006-03-01 23:11:14 +0000 | [diff] [blame] | 1137 | _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\ |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1138 | return; \\ |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1139 | } |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1140 | |
| 1141 | /* |
| 1142 | * Check if either of two extensions is enabled. |
| 1143 | */ |
| 1144 | #define CHECK_EXT2(EXT1, EXT2, FUNC) \\ |
| 1145 | if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \\ |
Roland Scheidegger | 93da673 | 2006-03-01 23:11:14 +0000 | [diff] [blame] | 1146 | _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\ |
Brian Paul | 147f509 | 2006-02-28 21:45:09 +0000 | [diff] [blame] | 1147 | return; \\ |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1148 | } |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1149 | |
Roland Scheidegger | 93da673 | 2006-03-01 23:11:14 +0000 | [diff] [blame] | 1150 | /* |
| 1151 | * Check if either of three extensions is enabled. |
| 1152 | */ |
| 1153 | #define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \\ |
| 1154 | if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \\ |
| 1155 | !ctx->Extensions.EXT3) { \\ |
| 1156 | _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\ |
| 1157 | return; \\ |
| 1158 | } |
| 1159 | |
| 1160 | /* |
| 1161 | * Check if either of four extensions is enabled. |
| 1162 | */ |
| 1163 | #define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \\ |
| 1164 | if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \\ |
| 1165 | !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \\ |
| 1166 | _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\ |
| 1167 | return; \\ |
| 1168 | } |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1169 | |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1170 | """ |
| 1171 | return |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | def EmitGetDoublev(): |
| 1176 | print """ |
| 1177 | void GLAPIENTRY |
| 1178 | _mesa_GetDoublev( GLenum pname, GLdouble *params ) |
| 1179 | { |
| 1180 | const GLfloat magic = -1234.5F; |
| 1181 | GLfloat values[16]; |
| 1182 | GLuint i; |
| 1183 | |
| 1184 | if (!params) |
| 1185 | return; |
| 1186 | |
| 1187 | /* Init temp array to magic numbers so we can figure out how many values |
| 1188 | * are returned by the GetFloatv() call. |
| 1189 | */ |
| 1190 | for (i = 0; i < 16; i++) |
| 1191 | values[i] = magic; |
| 1192 | |
| 1193 | _mesa_GetFloatv(pname, values); |
| 1194 | |
Brian Paul | 845f2a7 | 2005-06-26 20:08:23 +0000 | [diff] [blame] | 1195 | for (i = 0; i < 16 && values[i] != magic; i++) |
Brian Paul | 169a723 | 2005-01-16 19:39:10 +0000 | [diff] [blame] | 1196 | params[i] = (GLdouble) values[i]; |
| 1197 | } |
| 1198 | """ |
| 1199 | |
| 1200 | |
| 1201 | |
| 1202 | |
| 1203 | EmitHeader() |
| 1204 | # XXX Maybe sort the StateVars list |
| 1205 | EmitGetFunction(StateVars, GLboolean) |
| 1206 | EmitGetFunction(StateVars, GLfloat) |
| 1207 | EmitGetFunction(StateVars, GLint) |
| 1208 | EmitGetDoublev() |
| 1209 | |