gfx/skia/trunk/src/gpu/gl/GrGLDefines.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/gpu/gl/GrGLDefines.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,886 @@
     1.4 +/*
     1.5 + * Copyright 2011 Google Inc.
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +
    1.11 +
    1.12 +
    1.13 +#ifndef GrGLDefines_DEFINED
    1.14 +#define GrGLDefines_DEFINED
    1.15 +
    1.16 +/* Profiles */
    1.17 +#define GR_GL_CONTEXT_PROFILE_MASK              0x9126
    1.18 +#define GR_GL_CONTEXT_CORE_PROFILE_BIT          0x00000001
    1.19 +#define GR_GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
    1.20 +
    1.21 +// The following constants consist of the intersection of GL constants
    1.22 +// exported by GLES 1.0, GLES 2.0, and desktop GL required by the system.
    1.23 +
    1.24 +#define GR_GL_DEPTH_BUFFER_BIT               0x00000100
    1.25 +#define GR_GL_STENCIL_BUFFER_BIT             0x00000400
    1.26 +#define GR_GL_COLOR_BUFFER_BIT               0x00004000
    1.27 +
    1.28 +/* Boolean */
    1.29 +#define GR_GL_FALSE                          0
    1.30 +#define GR_GL_TRUE                           1
    1.31 +
    1.32 +/* BeginMode */
    1.33 +#define GR_GL_POINTS                         0x0000
    1.34 +#define GR_GL_LINES                          0x0001
    1.35 +#define GR_GL_LINE_LOOP                      0x0002
    1.36 +#define GR_GL_LINE_STRIP                     0x0003
    1.37 +#define GR_GL_TRIANGLES                      0x0004
    1.38 +#define GR_GL_TRIANGLE_STRIP                 0x0005
    1.39 +#define GR_GL_TRIANGLE_FAN                   0x0006
    1.40 +
    1.41 +/* AlphaFunction (not supported in ES20) */
    1.42 +/*      GL_NEVER */
    1.43 +/*      GL_LESS */
    1.44 +/*      GL_EQUAL */
    1.45 +/*      GL_LEQUAL */
    1.46 +/*      GL_GREATER */
    1.47 +/*      GL_NOTEQUAL */
    1.48 +/*      GL_GEQUAL */
    1.49 +/*      GL_ALWAYS */
    1.50 +
    1.51 +/* BlendingFactorDest */
    1.52 +#define GR_GL_ZERO                           0
    1.53 +#define GR_GL_ONE                            1
    1.54 +#define GR_GL_SRC_COLOR                      0x0300
    1.55 +#define GR_GL_ONE_MINUS_SRC_COLOR            0x0301
    1.56 +#define GR_GL_SRC_ALPHA                      0x0302
    1.57 +#define GR_GL_ONE_MINUS_SRC_ALPHA            0x0303
    1.58 +#define GR_GL_DST_ALPHA                      0x0304
    1.59 +#define GR_GL_ONE_MINUS_DST_ALPHA            0x0305
    1.60 +
    1.61 +/* BlendingFactorSrc */
    1.62 +/*      GL_ZERO */
    1.63 +/*      GL_ONE */
    1.64 +#define GR_GL_DST_COLOR                      0x0306
    1.65 +#define GR_GL_ONE_MINUS_DST_COLOR            0x0307
    1.66 +#define GR_GL_SRC_ALPHA_SATURATE             0x0308
    1.67 +/*      GL_SRC_ALPHA */
    1.68 +/*      GL_ONE_MINUS_SRC_ALPHA */
    1.69 +/*      GL_DST_ALPHA */
    1.70 +/*      GL_ONE_MINUS_DST_ALPHA */
    1.71 +
    1.72 +/* ExtendedBlendFactors */
    1.73 +#define GR_GL_SRC1_COLOR                     0x88F9
    1.74 +#define GR_GL_ONE_MINUS_SRC1_COLOR           0x88FA
    1.75 +/*      GL_SRC1_ALPHA */
    1.76 +#define GR_GL_ONE_MINUS_SRC1_ALPHA           0x88FB
    1.77 +
    1.78 +/* Separate Blend Functions */
    1.79 +#define GR_GL_BLEND_DST_RGB                  0x80C8
    1.80 +#define GR_GL_BLEND_SRC_RGB                  0x80C9
    1.81 +#define GR_GL_BLEND_DST_ALPHA                0x80CA
    1.82 +#define GR_GL_BLEND_SRC_ALPHA                0x80CB
    1.83 +#define GR_GL_CONSTANT_COLOR                 0x8001
    1.84 +#define GR_GL_ONE_MINUS_CONSTANT_COLOR       0x8002
    1.85 +#define GR_GL_CONSTANT_ALPHA                 0x8003
    1.86 +#define GR_GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
    1.87 +#define GR_GL_BLEND_COLOR                    0x8005
    1.88 +
    1.89 +/* Buffer Objects */
    1.90 +#define GR_GL_ARRAY_BUFFER                   0x8892
    1.91 +#define GR_GL_ELEMENT_ARRAY_BUFFER           0x8893
    1.92 +#define GR_GL_ARRAY_BUFFER_BINDING           0x8894
    1.93 +#define GR_GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
    1.94 +
    1.95 +#define GR_GL_STREAM_DRAW                    0x88E0
    1.96 +#define GR_GL_STATIC_DRAW                    0x88E4
    1.97 +#define GR_GL_DYNAMIC_DRAW                   0x88E8
    1.98 +
    1.99 +#define GR_GL_BUFFER_SIZE                    0x8764
   1.100 +#define GR_GL_BUFFER_USAGE                   0x8765
   1.101 +
   1.102 +#define GR_GL_CURRENT_VERTEX_ATTRIB          0x8626
   1.103 +
   1.104 +/* CullFaceMode */
   1.105 +#define GR_GL_FRONT                          0x0404
   1.106 +#define GR_GL_BACK                           0x0405
   1.107 +#define GR_GL_FRONT_AND_BACK                 0x0408
   1.108 +
   1.109 +/* DepthFunction */
   1.110 +/*      GL_NEVER */
   1.111 +/*      GL_LESS */
   1.112 +/*      GL_EQUAL */
   1.113 +/*      GL_LEQUAL */
   1.114 +/*      GL_GREATER */
   1.115 +/*      GL_NOTEQUAL */
   1.116 +/*      GL_GEQUAL */
   1.117 +/*      GL_ALWAYS */
   1.118 +
   1.119 +/* EnableCap */
   1.120 +#define GR_GL_TEXTURE_2D                     0x0DE1
   1.121 +#define GR_GL_CULL_FACE                      0x0B44
   1.122 +#define GR_GL_BLEND                          0x0BE2
   1.123 +#define GR_GL_DITHER                         0x0BD0
   1.124 +#define GR_GL_STENCIL_TEST                   0x0B90
   1.125 +#define GR_GL_DEPTH_TEST                     0x0B71
   1.126 +#define GR_GL_SCISSOR_TEST                   0x0C11
   1.127 +#define GR_GL_POLYGON_OFFSET_FILL            0x8037
   1.128 +#define GR_GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
   1.129 +#define GR_GL_SAMPLE_COVERAGE                0x80A0
   1.130 +#define GR_GL_POLYGON_OFFSET_FILL            0x8037
   1.131 +#define GR_GL_POLYGON_SMOOTH                 0x0B41
   1.132 +#define GR_GL_POLYGON_STIPPLE                0x0B42
   1.133 +#define GR_GL_COLOR_LOGIC_OP                 0x0BF2
   1.134 +#define GR_GL_COLOR_TABLE                    0x80D0
   1.135 +#define GR_GL_INDEX_LOGIC_OP                 0x0BF1
   1.136 +#define GR_GL_VERTEX_PROGRAM_POINT_SIZE      0x8642
   1.137 +#define GR_GL_LINE_STIPPLE                   0x0B24
   1.138 +
   1.139 +/* ErrorCode */
   1.140 +#define GR_GL_NO_ERROR                       0
   1.141 +#define GR_GL_INVALID_ENUM                   0x0500
   1.142 +#define GR_GL_INVALID_VALUE                  0x0501
   1.143 +#define GR_GL_INVALID_OPERATION              0x0502
   1.144 +#define GR_GL_OUT_OF_MEMORY                  0x0505
   1.145 +#define GR_GL_CONTEXT_LOST                   0x300E  // TODO(gman): What value?
   1.146 +
   1.147 +/* FrontFaceDirection */
   1.148 +#define GR_GL_CW                             0x0900
   1.149 +#define GR_GL_CCW                            0x0901
   1.150 +
   1.151 +/* GetPName */
   1.152 +#define GR_GL_LINE_WIDTH                     0x0B21
   1.153 +#define GR_GL_ALIASED_POINT_SIZE_RANGE       0x846D
   1.154 +#define GR_GL_ALIASED_LINE_WIDTH_RANGE       0x846E
   1.155 +#define GR_GL_CULL_FACE_MODE                 0x0B45
   1.156 +#define GR_GL_FRONT_FACE                     0x0B46
   1.157 +#define GR_GL_DEPTH_RANGE                    0x0B70
   1.158 +#define GR_GL_DEPTH_WRITEMASK                0x0B72
   1.159 +#define GR_GL_DEPTH_CLEAR_VALUE              0x0B73
   1.160 +#define GR_GL_DEPTH_FUNC                     0x0B74
   1.161 +#define GR_GL_STENCIL_CLEAR_VALUE            0x0B91
   1.162 +#define GR_GL_STENCIL_FUNC                   0x0B92
   1.163 +#define GR_GL_STENCIL_FAIL                   0x0B94
   1.164 +#define GR_GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
   1.165 +#define GR_GL_STENCIL_PASS_DEPTH_PASS        0x0B96
   1.166 +#define GR_GL_STENCIL_REF                    0x0B97
   1.167 +#define GR_GL_STENCIL_VALUE_MASK             0x0B93
   1.168 +#define GR_GL_STENCIL_WRITEMASK              0x0B98
   1.169 +#define GR_GL_STENCIL_BACK_FUNC              0x8800
   1.170 +#define GR_GL_STENCIL_BACK_FAIL              0x8801
   1.171 +#define GR_GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
   1.172 +#define GR_GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
   1.173 +#define GR_GL_STENCIL_BACK_REF               0x8CA3
   1.174 +#define GR_GL_STENCIL_BACK_VALUE_MASK        0x8CA4
   1.175 +#define GR_GL_STENCIL_BACK_WRITEMASK         0x8CA5
   1.176 +#define GR_GL_VIEWPORT                       0x0BA2
   1.177 +#define GR_GL_SCISSOR_BOX                    0x0C10
   1.178 +/*      GL_SCISSOR_TEST */
   1.179 +#define GR_GL_COLOR_CLEAR_VALUE              0x0C22
   1.180 +#define GR_GL_COLOR_WRITEMASK                0x0C23
   1.181 +#define GR_GL_UNPACK_ALIGNMENT               0x0CF5
   1.182 +#define GR_GL_UNPACK_FLIP_Y                  0x9240
   1.183 +#define GR_GL_PACK_ALIGNMENT                 0x0D05
   1.184 +#define GR_GL_PACK_REVERSE_ROW_ORDER         0x93A4
   1.185 +#define GR_GL_MAX_TEXTURE_SIZE               0x0D33
   1.186 +#define GR_GL_MAX_VIEWPORT_DIMS              0x0D3A
   1.187 +#define GR_GL_SUBPIXEL_BITS                  0x0D50
   1.188 +#define GR_GL_RED_BITS                       0x0D52
   1.189 +#define GR_GL_GREEN_BITS                     0x0D53
   1.190 +#define GR_GL_BLUE_BITS                      0x0D54
   1.191 +#define GR_GL_ALPHA_BITS                     0x0D55
   1.192 +#define GR_GL_DEPTH_BITS                     0x0D56
   1.193 +#define GR_GL_STENCIL_BITS                   0x0D57
   1.194 +#define GR_GL_POLYGON_OFFSET_UNITS           0x2A00
   1.195 +/*      GL_POLYGON_OFFSET_FILL */
   1.196 +#define GR_GL_POLYGON_OFFSET_FACTOR          0x8038
   1.197 +#define GR_GL_TEXTURE_BINDING_2D             0x8069
   1.198 +#define GR_GL_SAMPLE_BUFFERS                 0x80A8
   1.199 +#define GR_GL_SAMPLES                        0x80A9
   1.200 +#define GR_GL_SAMPLE_COVERAGE_VALUE          0x80AA
   1.201 +#define GR_GL_SAMPLE_COVERAGE_INVERT         0x80AB
   1.202 +#define GR_GL_RENDERBUFFER_COVERAGE_SAMPLES  0x8CAB
   1.203 +#define GR_GL_RENDERBUFFER_COLOR_SAMPLES     0x8E10
   1.204 +#define GR_GL_MAX_MULTISAMPLE_COVERAGE_MODES 0x8E11
   1.205 +#define GR_GL_MULTISAMPLE_COVERAGE_MODES     0x8E12
   1.206 +
   1.207 +/* GetTextureParameter */
   1.208 +/*      GL_TEXTURE_MAG_FILTER */
   1.209 +/*      GL_TEXTURE_MIN_FILTER */
   1.210 +/*      GL_TEXTURE_WRAP_S */
   1.211 +/*      GL_TEXTURE_WRAP_T */
   1.212 +
   1.213 +#define GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
   1.214 +#define GR_GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
   1.215 +
   1.216 +/* HintMode */
   1.217 +#define GR_GL_DONT_CARE                      0x1100
   1.218 +#define GR_GL_FASTEST                        0x1101
   1.219 +#define GR_GL_NICEST                         0x1102
   1.220 +
   1.221 +/* HintTarget */
   1.222 +#define GR_GL_GENERATE_MIPMAP_HINT            0x8192
   1.223 +
   1.224 +/* DataType */
   1.225 +#define GR_GL_BYTE                           0x1400
   1.226 +#define GR_GL_UNSIGNED_BYTE                  0x1401
   1.227 +#define GR_GL_SHORT                          0x1402
   1.228 +#define GR_GL_UNSIGNED_SHORT                 0x1403
   1.229 +#define GR_GL_INT                            0x1404
   1.230 +#define GR_GL_UNSIGNED_INT                   0x1405
   1.231 +#define GR_GL_FLOAT                          0x1406
   1.232 +#define GR_GL_FIXED                          0x140C
   1.233 +
   1.234 +/* Lighting */
   1.235 +#define GR_GL_LIGHTING                       0x0B50
   1.236 +#define GR_GL_LIGHT0                         0x4000
   1.237 +#define GR_GL_LIGHT1                         0x4001
   1.238 +#define GR_GL_LIGHT2                         0x4002
   1.239 +#define GR_GL_LIGHT3                         0x4003
   1.240 +#define GR_GL_LIGHT4                         0x4004
   1.241 +#define GR_GL_LIGHT5                         0x4005
   1.242 +#define GR_GL_LIGHT6                         0x4006
   1.243 +#define GR_GL_LIGHT7                         0x4007
   1.244 +#define GR_GL_SPOT_EXPONENT                  0x1205
   1.245 +#define GR_GL_SPOT_CUTOFF                    0x1206
   1.246 +#define GR_GL_CONSTANT_ATTENUATION           0x1207
   1.247 +#define GR_GL_LINEAR_ATTENUATION             0x1208
   1.248 +#define GR_GL_QUADRATIC_ATTENUATION          0x1209
   1.249 +#define GR_GL_AMBIENT                        0x1200
   1.250 +#define GR_GL_DIFFUSE                        0x1201
   1.251 +#define GR_GL_SPECULAR                       0x1202
   1.252 +#define GR_GL_SHININESS                      0x1601
   1.253 +#define GR_GL_EMISSION                       0x1600
   1.254 +#define GR_GL_POSITION                       0x1203
   1.255 +#define GR_GL_SPOT_DIRECTION                 0x1204
   1.256 +#define GR_GL_AMBIENT_AND_DIFFUSE            0x1602
   1.257 +#define GR_GL_COLOR_INDEXES                  0x1603
   1.258 +#define GR_GL_LIGHT_MODEL_TWO_SIDE           0x0B52
   1.259 +#define GR_GL_LIGHT_MODEL_LOCAL_VIEWER       0x0B51
   1.260 +#define GR_GL_LIGHT_MODEL_AMBIENT            0x0B53
   1.261 +#define GR_GL_FRONT_AND_BACK                 0x0408
   1.262 +#define GR_GL_SHADE_MODEL                    0x0B54
   1.263 +#define GR_GL_FLAT                           0x1D00
   1.264 +#define GR_GL_SMOOTH                         0x1D01
   1.265 +#define GR_GL_COLOR_MATERIAL                 0x0B57
   1.266 +#define GR_GL_COLOR_MATERIAL_FACE            0x0B55
   1.267 +#define GR_GL_COLOR_MATERIAL_PARAMETER       0x0B56
   1.268 +#define GR_GL_NORMALIZE                      0x0BA1
   1.269 +
   1.270 +/* Matrix Mode */
   1.271 +#define GR_GL_MATRIX_MODE                    0x0BA0
   1.272 +#define GR_GL_MODELVIEW                      0x1700
   1.273 +#define GR_GL_PROJECTION                     0x1701
   1.274 +#define GR_GL_TEXTURE                        0x1702
   1.275 +
   1.276 +/* multisample */
   1.277 +#define GR_GL_MULTISAMPLE                    0x809D
   1.278 +
   1.279 +/* Points */
   1.280 +#define GR_GL_POINT_SMOOTH                   0x0B10
   1.281 +#define GR_GL_POINT_SIZE                     0x0B11
   1.282 +#define GR_GL_POINT_SIZE_GRANULARITY         0x0B13
   1.283 +#define GR_GL_POINT_SIZE_RANGE               0x0B12
   1.284 +
   1.285 +/* Lines */
   1.286 +#define GR_GL_LINE_SMOOTH                    0x0B20
   1.287 +#define GR_GL_LINE_STIPPLE                   0x0B24
   1.288 +#define GR_GL_LINE_STIPPLE_PATTERN           0x0B25
   1.289 +#define GR_GL_LINE_STIPPLE_REPEAT            0x0B26
   1.290 +#define GR_GL_LINE_WIDTH                     0x0B21
   1.291 +#define GR_GL_LINE_WIDTH_GRANULARITY         0x0B23
   1.292 +#define GR_GL_LINE_WIDTH_RANGE               0x0B22
   1.293 +
   1.294 +/* PixelFormat */
   1.295 +#define GR_GL_DEPTH_COMPONENT                0x1902
   1.296 +#define GR_GL_RED                            0x1903
   1.297 +#define GR_GL_GREEN                          0x1904
   1.298 +#define GR_GL_BLUE                           0x1905
   1.299 +#define GR_GL_ALPHA                          0x1906
   1.300 +#define GR_GL_RGB                            0x1907
   1.301 +#define GR_GL_RGBA                           0x1908
   1.302 +#define GR_GL_BGRA                           0x80E1
   1.303 +#define GR_GL_LUMINANCE                      0x1909
   1.304 +#define GR_GL_LUMINANCE_ALPHA                0x190A
   1.305 +#define GR_GL_PALETTE8_RGBA8                 0x8B96
   1.306 +#define GR_GL_ALPHA8                         0x803C
   1.307 +
   1.308 +#define GR_GL_R8                             0x8229
   1.309 +
   1.310 +/* PixelType */
   1.311 +/*      GL_UNSIGNED_BYTE */
   1.312 +#define GR_GL_UNSIGNED_SHORT_4_4_4_4         0x8033
   1.313 +#define GR_GL_UNSIGNED_SHORT_5_5_5_1         0x8034
   1.314 +#define GR_GL_UNSIGNED_SHORT_5_6_5           0x8363
   1.315 +
   1.316 +/* Shaders */
   1.317 +#define GR_GL_FRAGMENT_SHADER                  0x8B30
   1.318 +#define GR_GL_VERTEX_SHADER                    0x8B31
   1.319 +#define GR_GL_GEOMETRY_SHADER                  0x8DD9
   1.320 +#define GR_GL_MAX_VERTEX_ATTRIBS               0x8869
   1.321 +#define GR_GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
   1.322 +#define GR_GL_MAX_VARYING_VECTORS              0x8DFC
   1.323 +#define GR_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
   1.324 +#define GR_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
   1.325 +#define GR_GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
   1.326 +#define GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
   1.327 +#define GR_GL_SHADER_TYPE                      0x8B4F
   1.328 +#define GR_GL_DELETE_STATUS                    0x8B80
   1.329 +#define GR_GL_LINK_STATUS                      0x8B82
   1.330 +#define GR_GL_VALIDATE_STATUS                  0x8B83
   1.331 +#define GR_GL_ATTACHED_SHADERS                 0x8B85
   1.332 +#define GR_GL_ACTIVE_UNIFORMS                  0x8B86
   1.333 +#define GR_GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
   1.334 +#define GR_GL_ACTIVE_ATTRIBUTES                0x8B89
   1.335 +#define GR_GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
   1.336 +#define GR_GL_SHADING_LANGUAGE_VERSION         0x8B8C
   1.337 +#define GR_GL_CURRENT_PROGRAM                  0x8B8D
   1.338 +#define GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS  0x8B49
   1.339 +#define GR_GL_MAX_VERTEX_UNIFORM_COMPONENTS    0x8B4A
   1.340 +
   1.341 +/* StencilFunction */
   1.342 +#define GR_GL_NEVER                          0x0200
   1.343 +#define GR_GL_LESS                           0x0201
   1.344 +#define GR_GL_EQUAL                          0x0202
   1.345 +#define GR_GL_LEQUAL                         0x0203
   1.346 +#define GR_GL_GREATER                        0x0204
   1.347 +#define GR_GL_NOTEQUAL                       0x0205
   1.348 +#define GR_GL_GEQUAL                         0x0206
   1.349 +#define GR_GL_ALWAYS                         0x0207
   1.350 +
   1.351 +/* StencilOp */
   1.352 +/*      GL_ZERO */
   1.353 +#define GR_GL_KEEP                           0x1E00
   1.354 +#define GR_GL_REPLACE                        0x1E01
   1.355 +#define GR_GL_INCR                           0x1E02
   1.356 +#define GR_GL_DECR                           0x1E03
   1.357 +#define GR_GL_INVERT                         0x150A
   1.358 +#define GR_GL_INCR_WRAP                      0x8507
   1.359 +#define GR_GL_DECR_WRAP                      0x8508
   1.360 +
   1.361 +/* StringName */
   1.362 +#define GR_GL_VENDOR                         0x1F00
   1.363 +#define GR_GL_RENDERER                       0x1F01
   1.364 +#define GR_GL_VERSION                        0x1F02
   1.365 +#define GR_GL_EXTENSIONS                     0x1F03
   1.366 +
   1.367 +/* StringCounts */
   1.368 +#define GR_GL_NUM_EXTENSIONS                 0x821D
   1.369 +
   1.370 +/* Pixel Mode / Transfer */
   1.371 +#define GR_GL_UNPACK_ROW_LENGTH              0x0CF2
   1.372 +#define GR_GL_PACK_ROW_LENGTH                0x0D02
   1.373 +
   1.374 +
   1.375 +/* TextureMagFilter */
   1.376 +#define GR_GL_NEAREST                        0x2600
   1.377 +#define GR_GL_LINEAR                         0x2601
   1.378 +
   1.379 +/* TextureMinFilter */
   1.380 +/*      GL_NEAREST */
   1.381 +/*      GL_LINEAR */
   1.382 +#define GR_GL_NEAREST_MIPMAP_NEAREST         0x2700
   1.383 +#define GR_GL_LINEAR_MIPMAP_NEAREST          0x2701
   1.384 +#define GR_GL_NEAREST_MIPMAP_LINEAR          0x2702
   1.385 +#define GR_GL_LINEAR_MIPMAP_LINEAR           0x2703
   1.386 +
   1.387 +/* TextureUsage */
   1.388 +#define GR_GL_FRAMEBUFFER_ATTACHMENT         0x93A3
   1.389 +
   1.390 +/* TextureParameterName */
   1.391 +#define GR_GL_TEXTURE_MAG_FILTER             0x2800
   1.392 +#define GR_GL_TEXTURE_MIN_FILTER             0x2801
   1.393 +#define GR_GL_TEXTURE_WRAP_S                 0x2802
   1.394 +#define GR_GL_TEXTURE_WRAP_T                 0x2803
   1.395 +#define GR_GL_TEXTURE_USAGE                  0x93A2
   1.396 +
   1.397 +/* TextureTarget */
   1.398 +/*      GL_TEXTURE_2D */
   1.399 +#define GR_GL_TEXTURE                        0x1702
   1.400 +#define GR_GL_TEXTURE_CUBE_MAP               0x8513
   1.401 +#define GR_GL_TEXTURE_BINDING_CUBE_MAP       0x8514
   1.402 +#define GR_GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
   1.403 +#define GR_GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
   1.404 +#define GR_GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
   1.405 +#define GR_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
   1.406 +#define GR_GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
   1.407 +#define GR_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
   1.408 +#define GR_GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
   1.409 +
   1.410 +/* TextureUnit */
   1.411 +#define GR_GL_TEXTURE0                       0x84C0
   1.412 +#define GR_GL_TEXTURE1                       0x84C1
   1.413 +#define GR_GL_TEXTURE2                       0x84C2
   1.414 +#define GR_GL_TEXTURE3                       0x84C3
   1.415 +#define GR_GL_TEXTURE4                       0x84C4
   1.416 +#define GR_GL_TEXTURE5                       0x84C5
   1.417 +#define GR_GL_TEXTURE6                       0x84C6
   1.418 +#define GR_GL_TEXTURE7                       0x84C7
   1.419 +#define GR_GL_TEXTURE8                       0x84C8
   1.420 +#define GR_GL_TEXTURE9                       0x84C9
   1.421 +#define GR_GL_TEXTURE10                      0x84CA
   1.422 +#define GR_GL_TEXTURE11                      0x84CB
   1.423 +#define GR_GL_TEXTURE12                      0x84CC
   1.424 +#define GR_GL_TEXTURE13                      0x84CD
   1.425 +#define GR_GL_TEXTURE14                      0x84CE
   1.426 +#define GR_GL_TEXTURE15                      0x84CF
   1.427 +#define GR_GL_TEXTURE16                      0x84D0
   1.428 +#define GR_GL_TEXTURE17                      0x84D1
   1.429 +#define GR_GL_TEXTURE18                      0x84D2
   1.430 +#define GR_GL_TEXTURE19                      0x84D3
   1.431 +#define GR_GL_TEXTURE20                      0x84D4
   1.432 +#define GR_GL_TEXTURE21                      0x84D5
   1.433 +#define GR_GL_TEXTURE22                      0x84D6
   1.434 +#define GR_GL_TEXTURE23                      0x84D7
   1.435 +#define GR_GL_TEXTURE24                      0x84D8
   1.436 +#define GR_GL_TEXTURE25                      0x84D9
   1.437 +#define GR_GL_TEXTURE26                      0x84DA
   1.438 +#define GR_GL_TEXTURE27                      0x84DB
   1.439 +#define GR_GL_TEXTURE28                      0x84DC
   1.440 +#define GR_GL_TEXTURE29                      0x84DD
   1.441 +#define GR_GL_TEXTURE30                      0x84DE
   1.442 +#define GR_GL_TEXTURE31                      0x84DF
   1.443 +#define GR_GL_ACTIVE_TEXTURE                 0x84E0
   1.444 +#define GR_GL_MAX_TEXTURE_UNITS              0x84E2
   1.445 +#define GR_GL_MAX_TEXTURE_COORDS             0x8871
   1.446 +
   1.447 +/* TextureWrapMode */
   1.448 +#define GR_GL_REPEAT                         0x2901
   1.449 +#define GR_GL_CLAMP_TO_EDGE                  0x812F
   1.450 +#define GR_GL_MIRRORED_REPEAT                0x8370
   1.451 +
   1.452 +/* Texture Swizzle */
   1.453 +#define GR_GL_TEXTURE_SWIZZLE_R              0x8E42
   1.454 +#define GR_GL_TEXTURE_SWIZZLE_G              0x8E43
   1.455 +#define GR_GL_TEXTURE_SWIZZLE_B              0x8E44
   1.456 +#define GR_GL_TEXTURE_SWIZZLE_A              0x8E45
   1.457 +#define GR_GL_TEXTURE_SWIZZLE_RGBA           0x8E46
   1.458 +
   1.459 +/* Texture mapping */
   1.460 +#define GR_GL_TEXTURE_ENV                    0x2300
   1.461 +#define GR_GL_TEXTURE_ENV_MODE               0x2200
   1.462 +#define GR_GL_TEXTURE_1D                     0x0DE0
   1.463 +/* GL_TEXTURE_2D */
   1.464 +/* GL_TEXTURE_WRAP_S */
   1.465 +/* GL_TEXTURE_WRAP_T */
   1.466 +/* GL_TEXTURE_MAG_FILTER */
   1.467 +/* GL_TEXTURE_MIN_FILTER */
   1.468 +#define GR_GL_TEXTURE_ENV_COLOR             0x2201
   1.469 +#define GR_GL_TEXTURE_GEN_S                 0x0C60
   1.470 +#define GR_GL_TEXTURE_GEN_T                 0x0C61
   1.471 +#define GR_GL_TEXTURE_GEN_R                 0x0C62
   1.472 +#define GR_GL_TEXTURE_GEN_Q                 0x0C63
   1.473 +#define GR_GL_TEXTURE_GEN_MODE              0x2500
   1.474 +#define GR_GL_TEXTURE_BORDER_COLOR          0x1004
   1.475 +#define GR_GL_TEXTURE_WIDTH                 0x1000
   1.476 +#define GR_GL_TEXTURE_HEIGHT                0x1001
   1.477 +#define GR_GL_TEXTURE_BORDER                0x1005
   1.478 +#define GR_GL_TEXTURE_COMPONENTS            0x1003
   1.479 +#define GR_GL_TEXTURE_RED_SIZE              0x805C
   1.480 +#define GR_GL_TEXTURE_GREEN_SIZE            0x805D
   1.481 +#define GR_GL_TEXTURE_BLUE_SIZE             0x805E
   1.482 +#define GR_GL_TEXTURE_ALPHA_SIZE            0x805F
   1.483 +#define GR_GL_TEXTURE_LUMINANCE_SIZE        0x8060
   1.484 +#define GR_GL_TEXTURE_INTENSITY_SIZE        0x8061
   1.485 +#define GR_GL_TEXTURE_INTERNAL_FORMAT       0x1003
   1.486 +/* GL_NEAREST_MIPMAP_NEAREST */
   1.487 +/* GL_NEAREST_MIPMAP_LINEAR */
   1.488 +/* GL_LINEAR_MIPMAP_NEAREST */
   1.489 +/* GL_LINEAR_MIPMAP_LINEAR */
   1.490 +#define GR_GL_OBJECT_LINEAR                 0x2401
   1.491 +#define GR_GL_OBJECT_PLANE                  0x2501
   1.492 +#define GR_GL_EYE_LINEAR                    0x2400
   1.493 +#define GR_GL_EYE_PLANE                     0x2502
   1.494 +#define GR_GL_SPHERE_MAP                    0x2402
   1.495 +#define GR_GL_DECAL                         0x2101
   1.496 +#define GR_GL_MODULATE                      0x2100
   1.497 +/* GL_NEAREST */
   1.498 +/* GL_REPEAT */
   1.499 +#define GR_GL_CLAMP                         0x2900
   1.500 +#define GR_GL_S                             0x2000
   1.501 +#define GR_GL_T                             0x2001
   1.502 +#define GR_GL_R                             0x2002
   1.503 +#define GR_GL_Q                             0x2003
   1.504 +#define GR_GL_TEXTURE_GEN_R                 0x0C62
   1.505 +#define GR_GL_TEXTURE_GEN_Q                 0x0C63
   1.506 +
   1.507 +/* texture_env_combine */
   1.508 +#define GR_GL_COMBINE                       0x8570
   1.509 +#define GR_GL_COMBINE_RGB                   0x8571
   1.510 +#define GR_GL_COMBINE_ALPHA                 0x8572
   1.511 +#define GR_GL_SOURCE0_RGB                   0x8580
   1.512 +#define GR_GL_SOURCE1_RGB                   0x8581
   1.513 +#define GR_GL_SOURCE2_RGB                   0x8582
   1.514 +#define GR_GL_SOURCE0_ALPHA                 0x8588
   1.515 +#define GR_GL_SOURCE1_ALPHA                 0x8589
   1.516 +#define GR_GL_SOURCE2_ALPHA                 0x858A
   1.517 +#define GR_GL_OPERAND0_RGB                  0x8590
   1.518 +#define GR_GL_OPERAND1_RGB                  0x8591
   1.519 +#define GR_GL_OPERAND2_RGB                  0x8592
   1.520 +#define GR_GL_OPERAND0_ALPHA                0x8598
   1.521 +#define GR_GL_OPERAND1_ALPHA                0x8599
   1.522 +#define GR_GL_OPERAND2_ALPHA                0x859A
   1.523 +#define GR_GL_RGB_SCALE                     0x8573
   1.524 +#define GR_GL_ADD_SIGNED                    0x8574
   1.525 +#define GR_GL_INTERPOLATE                   0x8575
   1.526 +#define GR_GL_SUBTRACT                      0x84E7
   1.527 +#define GR_GL_CONSTANT                      0x8576
   1.528 +#define GR_GL_PRIMARY_COLOR                 0x8577
   1.529 +#define GR_GL_PREVIOUS                      0x8578
   1.530 +#define GR_GL_SRC0_RGB                      0x8580
   1.531 +#define GR_GL_SRC1_RGB                      0x8581
   1.532 +#define GR_GL_SRC2_RGB                      0x8582
   1.533 +#define GR_GL_SRC0_ALPHA                    0x8588
   1.534 +#define GR_GL_SRC1_ALPHA                    0x8589
   1.535 +#define GR_GL_SRC2_ALPHA                    0x858A
   1.536 +
   1.537 +/* Uniform Types */
   1.538 +#define GR_GL_FLOAT_VEC2                     0x8B50
   1.539 +#define GR_GL_FLOAT_VEC3                     0x8B51
   1.540 +#define GR_GL_FLOAT_VEC4                     0x8B52
   1.541 +#define GR_GL_INT_VEC2                       0x8B53
   1.542 +#define GR_GL_INT_VEC3                       0x8B54
   1.543 +#define GR_GL_INT_VEC4                       0x8B55
   1.544 +#define GR_GL_BOOL                           0x8B56
   1.545 +#define GR_GL_BOOL_VEC2                      0x8B57
   1.546 +#define GR_GL_BOOL_VEC3                      0x8B58
   1.547 +#define GR_GL_BOOL_VEC4                      0x8B59
   1.548 +#define GR_GL_FLOAT_MAT2                     0x8B5A
   1.549 +#define GR_GL_FLOAT_MAT3                     0x8B5B
   1.550 +#define GR_GL_FLOAT_MAT4                     0x8B5C
   1.551 +#define GR_GL_SAMPLER_2D                     0x8B5E
   1.552 +#define GR_GL_SAMPLER_CUBE                   0x8B60
   1.553 +
   1.554 +/* Vertex Arrays */
   1.555 +#define GR_GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
   1.556 +#define GR_GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
   1.557 +#define GR_GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
   1.558 +#define GR_GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
   1.559 +#define GR_GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
   1.560 +#define GR_GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
   1.561 +#define GR_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
   1.562 +#define GR_GL_VERTEX_ARRAY                       0x8074
   1.563 +#define GR_GL_NORMAL_ARRAY                       0x8075
   1.564 +#define GR_GL_COLOR_ARRAY                        0x8076
   1.565 +#define GR_GL_SECONDARY_COLOR_ARRAY              0x845E
   1.566 +#define GR_GL_INDEX_ARRAY                        0x8077
   1.567 +#define GR_GL_TEXTURE_COORD_ARRAY                0x8078
   1.568 +#define GR_GL_EDGE_FLAG_ARRAY                    0x8079
   1.569 +#define GR_GL_VERTEX_ARRAY_SIZE                  0x807A
   1.570 +#define GR_GL_VERTEX_ARRAY_TYPE                  0x807B
   1.571 +#define GR_GL_VERTEX_ARRAY_STRIDE                0x807C
   1.572 +#define GR_GL_NORMAL_ARRAY_TYPE                  0x807E
   1.573 +#define GR_GL_NORMAL_ARRAY_STRIDE                0x807F
   1.574 +#define GR_GL_COLOR_ARRAY_SIZE                   0x8081
   1.575 +#define GR_GL_COLOR_ARRAY_TYPE                   0x8082
   1.576 +#define GR_GL_COLOR_ARRAY_STRIDE                 0x8083
   1.577 +#define GR_GL_INDEX_ARRAY_TYPE                   0x8085
   1.578 +#define GR_GL_INDEX_ARRAY_STRIDE                 0x8086
   1.579 +#define GR_GL_TEXTURE_COORD_ARRAY_SIZE           0x8088
   1.580 +#define GR_GL_TEXTURE_COORD_ARRAY_TYPE           0x8089
   1.581 +#define GR_GL_TEXTURE_COORD_ARRAY_STRIDE         0x808A
   1.582 +#define GR_GL_EDGE_FLAG_ARRAY_STRIDE             0x808C
   1.583 +#define GR_GL_VERTEX_ARRAY_POINTER               0x808E
   1.584 +#define GR_GL_NORMAL_ARRAY_POINTER               0x808F
   1.585 +#define GR_GL_COLOR_ARRAY_POINTER                0x8090
   1.586 +#define GR_GL_INDEX_ARRAY_POINTER                0x8091
   1.587 +#define GR_GL_TEXTURE_COORD_ARRAY_POINTER        0x8092
   1.588 +#define GR_GL_EDGE_FLAG_ARRAY_POINTER            0x8093
   1.589 +#define GR_GL_V2F                                0x2A20
   1.590 +#define GR_GL_V3F                                0x2A21
   1.591 +#define GR_GL_C4UB_V2F                           0x2A22
   1.592 +#define GR_GL_C4UB_V3F                           0x2A23
   1.593 +#define GR_GL_C3F_V3F                            0x2A24
   1.594 +#define GR_GL_N3F_V3F                            0x2A25
   1.595 +#define GR_GL_C4F_N3F_V3F                        0x2A26
   1.596 +#define GR_GL_T2F_V3F                            0x2A27
   1.597 +#define GR_GL_T4F_V4F                            0x2A28
   1.598 +#define GR_GL_T2F_C4UB_V3F                       0x2A29
   1.599 +#define GR_GL_T2F_C3F_V3F                        0x2A2A
   1.600 +#define GR_GL_T2F_N3F_V3F                        0x2A2B
   1.601 +#define GR_GL_T2F_C4F_N3F_V3F                    0x2A2C
   1.602 +#define GR_GL_T4F_C4F_N3F_V4F                    0x2A2D
   1.603 +
   1.604 +/* Vertex Buffer Object */
   1.605 +#define GR_GL_WRITE_ONLY                         0x88B9
   1.606 +#define GR_GL_BUFFER_MAPPED                      0x88BC
   1.607 +/* Read Format */
   1.608 +#define GR_GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
   1.609 +#define GR_GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
   1.610 +
   1.611 +/* Shader Source */
   1.612 +#define GR_GL_COMPILE_STATUS                 0x8B81
   1.613 +#define GR_GL_INFO_LOG_LENGTH                0x8B84
   1.614 +#define GR_GL_SHADER_SOURCE_LENGTH           0x8B88
   1.615 +#define GR_GL_SHADER_COMPILER                0x8DFA
   1.616 +
   1.617 +/* Shader Binary */
   1.618 +#define GR_GL_SHADER_BINARY_FORMATS          0x8DF8
   1.619 +#define GR_GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
   1.620 +
   1.621 +/* Shader Precision-Specified Types */
   1.622 +#define GR_GL_LOW_FLOAT                      0x8DF0
   1.623 +#define GR_GL_MEDIUM_FLOAT                   0x8DF1
   1.624 +#define GR_GL_HIGH_FLOAT                     0x8DF2
   1.625 +#define GR_GL_LOW_INT                        0x8DF3
   1.626 +#define GR_GL_MEDIUM_INT                     0x8DF4
   1.627 +#define GR_GL_HIGH_INT                       0x8DF5
   1.628 +
   1.629 +/* Queries */
   1.630 +#define GR_GL_QUERY_COUNTER_BITS             0x8864
   1.631 +#define GR_GL_CURRENT_QUERY                  0x8865
   1.632 +#define GR_GL_QUERY_RESULT                   0x8866
   1.633 +#define GR_GL_QUERY_RESULT_AVAILABLE         0x8867
   1.634 +#define GR_GL_SAMPLES_PASSED                 0x8914
   1.635 +#define GR_GL_ANY_SAMPLES_PASSED             0x8C2F
   1.636 +#define GR_GL_TIME_ELAPSED                   0x88BF
   1.637 +#define GR_GL_TIMESTAMP                      0x8E28
   1.638 +#define GR_GL_PRIMITIVES_GENERATED           0x8C87
   1.639 +#define GR_GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
   1.640 +
   1.641 +
   1.642 +/* Framebuffer Object. */
   1.643 +#define GR_GL_FRAMEBUFFER                    0x8D40
   1.644 +#define GR_GL_READ_FRAMEBUFFER               0x8CA8
   1.645 +#define GR_GL_DRAW_FRAMEBUFFER               0x8CA9
   1.646 +
   1.647 +#define GR_GL_RENDERBUFFER                   0x8D41
   1.648 +
   1.649 +#define GR_GL_RGBA4                          0x8056
   1.650 +#define GR_GL_RGB5_A1                        0x8057
   1.651 +#define GR_GL_RGB565                         0x8D62
   1.652 +#define GR_GL_RGBA8                          0x8058
   1.653 +#define GR_GL_RGB8                           0x8051
   1.654 +#define GR_GL_BGRA8                          0x93A1
   1.655 +#define GR_GL_SRGB                           0x8C40
   1.656 +#define GR_GL_SRGB8                          0x8C41
   1.657 +#define GR_GL_SRGB_ALPHA                     0x8C42
   1.658 +#define GR_GL_SRGB8_ALPHA8                   0x8C43
   1.659 +#define GR_GL_DEPTH_COMPONENT16              0x81A5
   1.660 +#define GR_GL_STENCIL_INDEX                  0x1901
   1.661 +#define GR_GL_STENCIL_INDEX4                 0x8D47
   1.662 +#define GR_GL_STENCIL_INDEX8                 0x8D48
   1.663 +#define GR_GL_STENCIL_INDEX16                0x8D49
   1.664 +#define GR_GL_DEPTH_STENCIL                  0x84F9
   1.665 +#define GR_GL_DEPTH24_STENCIL8               0x88F0
   1.666 +
   1.667 +#define GR_GL_MAX_SAMPLES                    0x8D57
   1.668 +// GL_IMG_multisampled_render_to_texture uses a different value for GL_MAX_SAMPLES
   1.669 +#define GR_GL_MAX_SAMPLES_IMG                0x9135
   1.670 +
   1.671 +#define GR_GL_RENDERBUFFER_WIDTH             0x8D42
   1.672 +#define GR_GL_RENDERBUFFER_HEIGHT            0x8D43
   1.673 +#define GR_GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
   1.674 +#define GR_GL_RENDERBUFFER_RED_SIZE          0x8D50
   1.675 +#define GR_GL_RENDERBUFFER_GREEN_SIZE        0x8D51
   1.676 +#define GR_GL_RENDERBUFFER_BLUE_SIZE         0x8D52
   1.677 +#define GR_GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
   1.678 +#define GR_GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
   1.679 +#define GR_GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
   1.680 +
   1.681 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
   1.682 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
   1.683 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
   1.684 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
   1.685 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER         0x8CD4
   1.686 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE              0x8212
   1.687 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE            0x8213
   1.688 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE             0x8214
   1.689 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE            0x8215
   1.690 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE            0x8216
   1.691 +#define GR_GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE          0x8217
   1.692 +
   1.693 +#define GR_GL_COLOR_ATTACHMENT0              0x8CE0
   1.694 +#define GR_GL_DEPTH_ATTACHMENT               0x8D00
   1.695 +#define GR_GL_STENCIL_ATTACHMENT             0x8D20
   1.696 +
   1.697 +#define GR_GL_NONE                           0
   1.698 +
   1.699 +#define GR_GL_FRAMEBUFFER_COMPLETE                      0x8CD5
   1.700 +#define GR_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
   1.701 +#define GR_GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
   1.702 +#define GR_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
   1.703 +#define GR_GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
   1.704 +
   1.705 +#define GR_GL_FRAMEBUFFER_BINDING            0x8CA6
   1.706 +#define GR_GL_RENDERBUFFER_BINDING           0x8CA7
   1.707 +#define GR_GL_MAX_RENDERBUFFER_SIZE          0x84E8
   1.708 +
   1.709 +#define GR_GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
   1.710 +
   1.711 +/* Path Rendering */
   1.712 +// commands
   1.713 +#define GR_GL_CLOSE_PATH                                    0x00
   1.714 +#define GR_GL_MOVE_TO                                       0x02
   1.715 +#define GR_GL_RELATIVE_MOVE_TO                              0x03
   1.716 +#define GR_GL_LINE_TO                                       0x04
   1.717 +#define GR_GL_RELATIVE_LINE_TO                              0x05
   1.718 +#define GR_GL_HORIZONTAL_LINE_TO                            0x06
   1.719 +#define GR_GL_RELATIVE_HORIZONTAL_LINE_TO                   0x07
   1.720 +#define GR_GL_VERTICAL_LINE_TO                              0x08
   1.721 +#define GR_GL_RELATIVE_VERTICAL_LINE_TO                     0x09
   1.722 +#define GR_GL_QUADRATIC_CURVE_TO                            0x0A
   1.723 +#define GR_GL_RELATIVE_QUADRATIC_CURVE_TO                   0x0B
   1.724 +#define GR_GL_CUBIC_CURVE_TO                                0x0C
   1.725 +#define GR_GL_RELATIVE_CUBIC_CURVE_TO                       0x0D
   1.726 +#define GR_GL_SMOOTH_QUADRATIC_CURVE_TO                     0x0E
   1.727 +#define GR_GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO            0x0F
   1.728 +#define GR_GL_SMOOTH_CUBIC_CURVE_TO                         0x10
   1.729 +#define GR_GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO                0x11
   1.730 +#define GR_GL_SMALL_CCW_ARC_TO                              0x12
   1.731 +#define GR_GL_RELATIVE_SMALL_CCW_ARC_TO                     0x13
   1.732 +#define GR_GL_SMALL_CW_ARC_TO                               0x14
   1.733 +#define GR_GL_RELATIVE_SMALL_CW_ARC_TO                      0x15
   1.734 +#define GR_GL_LARGE_CCW_ARC_TO                              0x16
   1.735 +#define GR_GL_RELATIVE_LARGE_CCW_ARC_TO                     0x17
   1.736 +#define GR_GL_LARGE_CW_ARC_TO                               0x18
   1.737 +#define GR_GL_RELATIVE_LARGE_CW_ARC_TO                      0x19
   1.738 +#define GR_GL_CIRCULAR_CCW_ARC_TO                           0xF8
   1.739 +#define GR_GL_CIRCULAR_CW_ARC_TO                            0xFA
   1.740 +#define GR_GL_CIRCULAR_TANGENT_ARC_TO                       0xFC
   1.741 +#define GR_GL_ARC_TO                                        0xFE
   1.742 +#define GR_GL_RELATIVE_ARC_TO                               0xFF
   1.743 +
   1.744 +// path string formats
   1.745 +#define GR_GL_PATH_FORMAT_SVG                               0x9070
   1.746 +#define GR_GL_PATH_FORMAT_PS                                0x9071
   1.747 +
   1.748 +// font targets
   1.749 +#define GR_GL_STANDARD_FONT_NAME                            0x9072
   1.750 +#define GR_GL_SYSTEM_FONT_NAME                              0x9073
   1.751 +#define GR_GL_FILE_NAME                                     0x9074
   1.752 +
   1.753 +// handle missing glyphs
   1.754 +#define GR_GL_SKIP_MISSING_GLYPH                            0x90A9
   1.755 +#define GR_GL_USE_MISSING_GLYPH                             0x90AA
   1.756 +
   1.757 +// path parameters
   1.758 +#define GR_GL_PATH_STROKE_WIDTH                             0x9075
   1.759 +#define GR_GL_PATH_INITIAL_END_CAP                          0x9077
   1.760 +#define GR_GL_PATH_TERMINAL_END_CAP                         0x9078
   1.761 +#define GR_GL_PATH_JOIN_STYLE                               0x9079
   1.762 +#define GR_GL_PATH_MITER_LIMIT                              0x907A
   1.763 +#define GR_GL_PATH_INITIAL_DASH_CAP                         0x907C
   1.764 +#define GR_GL_PATH_TERMINAL_DASH_CAP                        0x907D
   1.765 +#define GR_GL_PATH_DASH_OFFSET                              0x907E
   1.766 +#define GR_GL_PATH_CLIENT_LENGTH                            0x907F
   1.767 +#define GR_GL_PATH_DASH_OFFSET_RESET                        0x90B4
   1.768 +#define GR_GL_PATH_FILL_MODE                                0x9080
   1.769 +#define GR_GL_PATH_FILL_MASK                                0x9081
   1.770 +#define GR_GL_PATH_FILL_COVER_MODE                          0x9082
   1.771 +#define GR_GL_PATH_STROKE_COVER_MODE                        0x9083
   1.772 +#define GR_GL_PATH_STROKE_MASK                              0x9084
   1.773 +#define GR_GL_PATH_END_CAPS                                 0x9076
   1.774 +#define GR_GL_PATH_DASH_CAPS                                0x907B
   1.775 +#define GR_GL_PATH_COMMAND_COUNT                            0x909D
   1.776 +#define GR_GL_PATH_COORD_COUNT                              0x909E
   1.777 +#define GR_GL_PATH_DASH_ARRAY_COUNT                         0x909F
   1.778 +#define GR_GL_PATH_FILL_BOUNDING_BOX                        0x90A1
   1.779 +#define GR_GL_PATH_STROKE_BOUNDING_BOX                      0x90A2
   1.780 +
   1.781 +// fill modes
   1.782 +/*      GL_INVERT */
   1.783 +#define GR_GL_COUNT_UP                                      0x9088
   1.784 +#define GR_GL_COUNT_DOWN                                    0x9089
   1.785 +/*      GL_PATH_FILL_MODE_NV */
   1.786 +
   1.787 +// path color gen
   1.788 +/*      GL_PRIMARY_COLOR */
   1.789 +#define GR_GL_SECONDARY_COLOR                               0x852D
   1.790 +
   1.791 +// gen mode
   1.792 +/*      GL_NONE */
   1.793 +/*      GL_EYE_LINEAR */
   1.794 +/*      GL_OBJECT_LINEAR */
   1.795 +#define GR_GL_PATH_OBJECT_BOUNDING_BOX                      0x908A
   1.796 +
   1.797 +// cover mode
   1.798 +#define GR_GL_CONVEX_HULL                                   0x908B
   1.799 +#define GR_GL_BOUNDING_BOX                                  0x908D
   1.800 +#define GR_GL_BOUNDING_BOX_OF_BOUNDING_BOXES                0x909C
   1.801 +/*      GL_PATH_FILL_COVER_MODE_NV */
   1.802 +
   1.803 +// transform type
   1.804 +/*      GL_NONE */
   1.805 +#define GR_GL_TRANSLATE_X                                   0x908E
   1.806 +#define GR_GL_TRANSLATE_Y                                   0x908F
   1.807 +#define GR_GL_TRANSLATE_2D                                  0x9090
   1.808 +#define GR_GL_TRANSLATE_3D                                  0x9091
   1.809 +#define GR_GL_AFFINE_2D                                     0x9092
   1.810 +#define GR_GL_AFFINE_3D                                     0x9094
   1.811 +#define GR_GL_TRANSPOSE_AFFINE_2D                           0x9096
   1.812 +#define GR_GL_TRANSPOSE_AFFINE_3D                           0x9098
   1.813 +
   1.814 +// path string types
   1.815 +#define GR_GL_UTF8                                          0x909A
   1.816 +#define GR_GL_UTF16                                         0x909B
   1.817 +
   1.818 +#define GR_GL_PATH_COMPUTED_LENGTH                          0x90A0
   1.819 +
   1.820 +// cap/dash values
   1.821 +/*      GL_FLAT */
   1.822 +#define GR_GL_SQUARE                                        0x90A3
   1.823 +#define GR_GL_ROUND                                         0x90A4
   1.824 +#define GR_GL_TRIANGULAR                                    0x90A5
   1.825 +
   1.826 +// join values
   1.827 +/*      GL_NONE */
   1.828 +/*      GL_ROUND_NV  */
   1.829 +#define GR_GL_BEVEL                                         0x90A6
   1.830 +#define GR_GL_MITER_REVERT                                  0x90A7
   1.831 +#define GR_GL_MITER_TRUNCATE                                0x90A8
   1.832 +
   1.833 +// path dash reset values
   1.834 +#define GR_GL_MOVE_TO_RESETS                                0x90B5
   1.835 +#define GR_GL_MOVE_TO_CONTINUES                             0x90B6
   1.836 +
   1.837 +// font styles
   1.838 +/*      GL_NONE */
   1.839 +#define GR_GL_BOLD_BIT                                      0x01
   1.840 +#define GR_GL_ITALIC_BIT                                    0x02
   1.841 +
   1.842 +// pnames for glGet
   1.843 +#define GR_GL_PATH_ERROR_POSITION                           0x90AB
   1.844 +#define GR_GL_PATH_FOG_GEN_MODE                             0x90AC
   1.845 +#define GR_GL_PATH_STENCIL_FUNC                             0x90B7
   1.846 +#define GR_GL_PATH_STENCIL_REF                              0x90B8
   1.847 +#define GR_GL_PATH_STENCIL_VALUE_MASK                       0x90B9
   1.848 +#define GR_GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR              0x90BD
   1.849 +#define GR_GL_PATH_STENCIL_DEPTH_OFFSET_UNITS               0x90BE
   1.850 +#define GR_GL_PATH_COVER_DEPTH_FUNC                         0x90BF
   1.851 +
   1.852 +// per-glyph metrics bits in metric mask query
   1.853 +#define GR_GL_GLYPH_WIDTH_BIT                               0x01
   1.854 +#define GR_GL_GLYPH_HEIGHT_BIT                              0x02
   1.855 +#define GR_GL_GLYPH_HORIZONTAL_BEARING_X_BIT                0x04
   1.856 +#define GR_GL_GLYPH_HORIZONTAL_BEARING_Y_BIT                0x08
   1.857 +#define GR_GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT          0x10
   1.858 +#define GR_GL_GLYPH_VERTICAL_BEARING_X_BIT                  0x20
   1.859 +#define GR_GL_GLYPH_VERTICAL_BEARING_Y_BIT                  0x40
   1.860 +#define GR_GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT            0x80
   1.861 +#define GR_GL_GLYPH_HAS_KERNING                             0x100
   1.862 +
   1.863 +// per-font face metrics in metric mask query
   1.864 +#define GR_GL_FONT_X_MIN_BOUNDS                             0x00010000
   1.865 +#define GR_GL_FONT_Y_MIN_BOUNDS                             0x00020000
   1.866 +#define GR_GL_FONT_X_MAX_BOUNDS                             0x00040000
   1.867 +#define GR_GL_FONT_Y_MAX_BOUNDS                             0x00080000
   1.868 +#define GR_GL_FONT_UNITS_PER_EM                             0x00100000
   1.869 +#define GR_GL_FONT_ASCENDER                                 0x00200000
   1.870 +#define GR_GL_FONT_DESCENDER                                0x00400000
   1.871 +#define GR_GL_FONT_HEIGHT                                   0x00800000
   1.872 +#define GR_GL_FONT_MAX_ADVANCE_WIDTH                        0x01000000
   1.873 +#define GR_GL_FONT_MAX_ADVANCE_HEIGHT                       0x02000000
   1.874 +#define GR_GL_FONT_UNDERLINE_POSITION                       0x04000000
   1.875 +#define GR_GL_FONT_UNDERLINE_THICKNESS                      0x08000000
   1.876 +#define GR_GL_FONT_HAS_KERNING                              0x10000000
   1.877 +
   1.878 +// path list modes (glGetPathSpacing)
   1.879 +#define GR_GL_ACCUM_ADJACENT_PAIRS                          0x90AD
   1.880 +#define GR_GL_ADJACENT_PAIRS                                0x90AE
   1.881 +#define GR_GL_FIRST_TO_REST                                 0x90AF
   1.882 +
   1.883 +//path gen modes
   1.884 +#define GR_GL_PATH_GEN_MODE                                 0x90B0
   1.885 +#define GR_GL_PATH_GEN_COEFF                                0x90B1
   1.886 +#define GR_GL_PATH_GEN_COLOR_FORMAT                         0x90B2
   1.887 +#define GR_GL_PATH_GEN_COMPONENTS                           0x90B3
   1.888 +
   1.889 +#endif

mercurial