blob: c08c582b71c1c4cba079f1670607c1850d288d4a [file] [log] [blame]
twiz@google.com0f31ca72011-03-18 17:38:11 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
twiz@google.com0f31ca72011-03-18 17:38:11 +00006 */
7
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
twiz@google.com0f31ca72011-03-18 17:38:11 +000010#ifndef GrGLDefines_DEFINED
11#define GrGLDefines_DEFINED
12
bsalomon@google.com1744f972013-02-26 21:46:32 +000013/* Profiles */
14#define GR_GL_CONTEXT_PROFILE_MASK 0x9126
15#define GR_GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
16#define GR_GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
17
twiz@google.com0f31ca72011-03-18 17:38:11 +000018// The following constants consist of the intersection of GL constants
19// exported by GLES 1.0, GLES 2.0, and desktop GL required by the system.
20
21#define GR_GL_DEPTH_BUFFER_BIT 0x00000100
22#define GR_GL_STENCIL_BUFFER_BIT 0x00000400
23#define GR_GL_COLOR_BUFFER_BIT 0x00004000
24
25/* Boolean */
26#define GR_GL_FALSE 0
27#define GR_GL_TRUE 1
28
29/* BeginMode */
30#define GR_GL_POINTS 0x0000
31#define GR_GL_LINES 0x0001
32#define GR_GL_LINE_LOOP 0x0002
33#define GR_GL_LINE_STRIP 0x0003
34#define GR_GL_TRIANGLES 0x0004
35#define GR_GL_TRIANGLE_STRIP 0x0005
36#define GR_GL_TRIANGLE_FAN 0x0006
37
38/* AlphaFunction (not supported in ES20) */
39/* GL_NEVER */
40/* GL_LESS */
41/* GL_EQUAL */
42/* GL_LEQUAL */
43/* GL_GREATER */
44/* GL_NOTEQUAL */
45/* GL_GEQUAL */
46/* GL_ALWAYS */
47
cdaltonbae6f6c2015-04-22 10:39:03 -070048/* Basic OpenGL blend equations */
49#define GR_GL_FUNC_ADD 0x8006
50#define GR_GL_FUNC_SUBTRACT 0x800A
51#define GR_GL_FUNC_REVERSE_SUBTRACT 0x800B
52
53/* GL_KHR_blend_equation_advanced */
54#define GR_GL_SCREEN 0x9295
55#define GR_GL_OVERLAY 0x9296
56#define GR_GL_DARKEN 0x9297
57#define GR_GL_LIGHTEN 0x9298
58#define GR_GL_COLORDODGE 0x9299
59#define GR_GL_COLORBURN 0x929A
60#define GR_GL_HARDLIGHT 0x929B
61#define GR_GL_SOFTLIGHT 0x929C
62#define GR_GL_DIFFERENCE 0x929E
63#define GR_GL_EXCLUSION 0x92A0
64#define GR_GL_MULTIPLY 0x9294
65#define GR_GL_HSL_HUE 0x92AD
66#define GR_GL_HSL_SATURATION 0x92AE
67#define GR_GL_HSL_COLOR 0x92AF
68#define GR_GL_HSL_LUMINOSITY 0x92B0
69
twiz@google.com0f31ca72011-03-18 17:38:11 +000070/* BlendingFactorDest */
71#define GR_GL_ZERO 0
72#define GR_GL_ONE 1
73#define GR_GL_SRC_COLOR 0x0300
74#define GR_GL_ONE_MINUS_SRC_COLOR 0x0301
75#define GR_GL_SRC_ALPHA 0x0302
76#define GR_GL_ONE_MINUS_SRC_ALPHA 0x0303
77#define GR_GL_DST_ALPHA 0x0304
78#define GR_GL_ONE_MINUS_DST_ALPHA 0x0305
79
80/* BlendingFactorSrc */
81/* GL_ZERO */
82/* GL_ONE */
83#define GR_GL_DST_COLOR 0x0306
84#define GR_GL_ONE_MINUS_DST_COLOR 0x0307
85#define GR_GL_SRC_ALPHA_SATURATE 0x0308
86/* GL_SRC_ALPHA */
87/* GL_ONE_MINUS_SRC_ALPHA */
88/* GL_DST_ALPHA */
89/* GL_ONE_MINUS_DST_ALPHA */
90
bsalomon@google.com271cffc2011-05-20 14:13:56 +000091/* ExtendedBlendFactors */
92#define GR_GL_SRC1_COLOR 0x88F9
93#define GR_GL_ONE_MINUS_SRC1_COLOR 0x88FA
94/* GL_SRC1_ALPHA */
95#define GR_GL_ONE_MINUS_SRC1_ALPHA 0x88FB
96
twiz@google.com0f31ca72011-03-18 17:38:11 +000097/* Separate Blend Functions */
98#define GR_GL_BLEND_DST_RGB 0x80C8
99#define GR_GL_BLEND_SRC_RGB 0x80C9
100#define GR_GL_BLEND_DST_ALPHA 0x80CA
101#define GR_GL_BLEND_SRC_ALPHA 0x80CB
102#define GR_GL_CONSTANT_COLOR 0x8001
103#define GR_GL_ONE_MINUS_CONSTANT_COLOR 0x8002
104#define GR_GL_CONSTANT_ALPHA 0x8003
105#define GR_GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
106#define GR_GL_BLEND_COLOR 0x8005
107
108/* Buffer Objects */
109#define GR_GL_ARRAY_BUFFER 0x8892
110#define GR_GL_ELEMENT_ARRAY_BUFFER 0x8893
111#define GR_GL_ARRAY_BUFFER_BINDING 0x8894
112#define GR_GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
113
114#define GR_GL_STREAM_DRAW 0x88E0
115#define GR_GL_STATIC_DRAW 0x88E4
116#define GR_GL_DYNAMIC_DRAW 0x88E8
117
118#define GR_GL_BUFFER_SIZE 0x8764
119#define GR_GL_BUFFER_USAGE 0x8765
120
121#define GR_GL_CURRENT_VERTEX_ATTRIB 0x8626
122
123/* CullFaceMode */
124#define GR_GL_FRONT 0x0404
125#define GR_GL_BACK 0x0405
126#define GR_GL_FRONT_AND_BACK 0x0408
127
128/* DepthFunction */
129/* GL_NEVER */
130/* GL_LESS */
131/* GL_EQUAL */
132/* GL_LEQUAL */
133/* GL_GREATER */
134/* GL_NOTEQUAL */
135/* GL_GEQUAL */
136/* GL_ALWAYS */
137
138/* EnableCap */
139#define GR_GL_TEXTURE_2D 0x0DE1
140#define GR_GL_CULL_FACE 0x0B44
141#define GR_GL_BLEND 0x0BE2
142#define GR_GL_DITHER 0x0BD0
143#define GR_GL_STENCIL_TEST 0x0B90
144#define GR_GL_DEPTH_TEST 0x0B71
145#define GR_GL_SCISSOR_TEST 0x0C11
146#define GR_GL_POLYGON_OFFSET_FILL 0x8037
147#define GR_GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
148#define GR_GL_SAMPLE_COVERAGE 0x80A0
bsalomon@google.com469d0dd2012-05-21 20:14:29 +0000149#define GR_GL_POLYGON_OFFSET_FILL 0x8037
150#define GR_GL_POLYGON_SMOOTH 0x0B41
151#define GR_GL_POLYGON_STIPPLE 0x0B42
152#define GR_GL_COLOR_LOGIC_OP 0x0BF2
153#define GR_GL_COLOR_TABLE 0x80D0
154#define GR_GL_INDEX_LOGIC_OP 0x0BF1
155#define GR_GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
156#define GR_GL_LINE_STIPPLE 0x0B24
jvanverth99babf22015-05-22 06:06:40 -0700157#define GR_GL_FRAMEBUFFER_SRGB 0x8DB9
twiz@google.com0f31ca72011-03-18 17:38:11 +0000158
159/* ErrorCode */
160#define GR_GL_NO_ERROR 0
161#define GR_GL_INVALID_ENUM 0x0500
162#define GR_GL_INVALID_VALUE 0x0501
163#define GR_GL_INVALID_OPERATION 0x0502
164#define GR_GL_OUT_OF_MEMORY 0x0505
165#define GR_GL_CONTEXT_LOST 0x300E // TODO(gman): What value?
166
167/* FrontFaceDirection */
168#define GR_GL_CW 0x0900
169#define GR_GL_CCW 0x0901
170
171/* GetPName */
172#define GR_GL_LINE_WIDTH 0x0B21
173#define GR_GL_ALIASED_POINT_SIZE_RANGE 0x846D
174#define GR_GL_ALIASED_LINE_WIDTH_RANGE 0x846E
175#define GR_GL_CULL_FACE_MODE 0x0B45
176#define GR_GL_FRONT_FACE 0x0B46
177#define GR_GL_DEPTH_RANGE 0x0B70
178#define GR_GL_DEPTH_WRITEMASK 0x0B72
179#define GR_GL_DEPTH_CLEAR_VALUE 0x0B73
180#define GR_GL_DEPTH_FUNC 0x0B74
181#define GR_GL_STENCIL_CLEAR_VALUE 0x0B91
182#define GR_GL_STENCIL_FUNC 0x0B92
183#define GR_GL_STENCIL_FAIL 0x0B94
184#define GR_GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
185#define GR_GL_STENCIL_PASS_DEPTH_PASS 0x0B96
186#define GR_GL_STENCIL_REF 0x0B97
187#define GR_GL_STENCIL_VALUE_MASK 0x0B93
188#define GR_GL_STENCIL_WRITEMASK 0x0B98
189#define GR_GL_STENCIL_BACK_FUNC 0x8800
190#define GR_GL_STENCIL_BACK_FAIL 0x8801
191#define GR_GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
192#define GR_GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
193#define GR_GL_STENCIL_BACK_REF 0x8CA3
194#define GR_GL_STENCIL_BACK_VALUE_MASK 0x8CA4
195#define GR_GL_STENCIL_BACK_WRITEMASK 0x8CA5
196#define GR_GL_VIEWPORT 0x0BA2
197#define GR_GL_SCISSOR_BOX 0x0C10
198/* GL_SCISSOR_TEST */
199#define GR_GL_COLOR_CLEAR_VALUE 0x0C22
200#define GR_GL_COLOR_WRITEMASK 0x0C23
201#define GR_GL_UNPACK_ALIGNMENT 0x0CF5
bsalomon@google.com8ef3fd02011-11-21 15:53:13 +0000202#define GR_GL_UNPACK_FLIP_Y 0x9240
twiz@google.com0f31ca72011-03-18 17:38:11 +0000203#define GR_GL_PACK_ALIGNMENT 0x0D05
bsalomon@google.com56d11e02011-11-30 19:59:08 +0000204#define GR_GL_PACK_REVERSE_ROW_ORDER 0x93A4
twiz@google.com0f31ca72011-03-18 17:38:11 +0000205#define GR_GL_MAX_TEXTURE_SIZE 0x0D33
206#define GR_GL_MAX_VIEWPORT_DIMS 0x0D3A
207#define GR_GL_SUBPIXEL_BITS 0x0D50
208#define GR_GL_RED_BITS 0x0D52
209#define GR_GL_GREEN_BITS 0x0D53
210#define GR_GL_BLUE_BITS 0x0D54
211#define GR_GL_ALPHA_BITS 0x0D55
212#define GR_GL_DEPTH_BITS 0x0D56
213#define GR_GL_STENCIL_BITS 0x0D57
214#define GR_GL_POLYGON_OFFSET_UNITS 0x2A00
215/* GL_POLYGON_OFFSET_FILL */
216#define GR_GL_POLYGON_OFFSET_FACTOR 0x8038
217#define GR_GL_TEXTURE_BINDING_2D 0x8069
218#define GR_GL_SAMPLE_BUFFERS 0x80A8
219#define GR_GL_SAMPLES 0x80A9
220#define GR_GL_SAMPLE_COVERAGE_VALUE 0x80AA
221#define GR_GL_SAMPLE_COVERAGE_INVERT 0x80AB
bsalomon@google.comc9668ec2012-04-11 18:16:41 +0000222#define GR_GL_RENDERBUFFER_COVERAGE_SAMPLES 0x8CAB
223#define GR_GL_RENDERBUFFER_COLOR_SAMPLES 0x8E10
224#define GR_GL_MAX_MULTISAMPLE_COVERAGE_MODES 0x8E11
225#define GR_GL_MULTISAMPLE_COVERAGE_MODES 0x8E12
twiz@google.com0f31ca72011-03-18 17:38:11 +0000226
227/* GetTextureParameter */
228/* GL_TEXTURE_MAG_FILTER */
229/* GL_TEXTURE_MIN_FILTER */
230/* GL_TEXTURE_WRAP_S */
231/* GL_TEXTURE_WRAP_T */
232
233#define GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
234#define GR_GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
235
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000236/* Compressed Texture Formats */
egdanield588c012015-03-27 12:22:10 -0700237#define GR_GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
238#define GR_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
239#define GR_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
240#define GR_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000241
egdanield588c012015-03-27 12:22:10 -0700242#define GR_GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
243#define GR_GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
244#define GR_GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
245#define GR_GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000246
egdanield588c012015-03-27 12:22:10 -0700247#define GR_GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
248#define GR_GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000249
egdanield588c012015-03-27 12:22:10 -0700250#define GR_GL_COMPRESSED_ETC1_RGB8 0x8D64
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000251
egdanield588c012015-03-27 12:22:10 -0700252#define GR_GL_COMPRESSED_R11_EAC 0x9270
253#define GR_GL_COMPRESSED_SIGNED_R11_EAC 0x9271
254#define GR_GL_COMPRESSED_RG11_EAC 0x9272
255#define GR_GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000256
egdanield588c012015-03-27 12:22:10 -0700257#define GR_GL_COMPRESSED_RGB8_ETC2 0x9274
258#define GR_GL_COMPRESSED_SRGB8 0x9275
259#define GR_GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1 0x9276
260#define GR_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1 0x9277
261#define GR_GL_COMPRESSED_RGBA8_ETC2 0x9278
262#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ETC2 0x9279
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000263
egdanield588c012015-03-27 12:22:10 -0700264#define GR_GL_COMPRESSED_LUMINANCE_LATC1 0x8C70
265#define GR_GL_COMPRESSED_SIGNED_LUMINANCE_LATC1 0x8C71
266#define GR_GL_COMPRESSED_LUMINANCE_ALPHA_LATC2 0x8C72
267#define GR_GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2 0x8C73
commit-bot@chromium.org6e7ddaa2014-05-30 13:55:58 +0000268
egdanield588c012015-03-27 12:22:10 -0700269#define GR_GL_COMPRESSED_RED_RGTC1 0x8DBB
270#define GR_GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
271#define GR_GL_COMPRESSED_RED_GREEN_RGTC2 0x8DBD
272#define GR_GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2 0x8DBE
commit-bot@chromium.org6e7ddaa2014-05-30 13:55:58 +0000273
egdanield588c012015-03-27 12:22:10 -0700274#define GR_GL_COMPRESSED_3DC_X 0x87F9
275#define GR_GL_COMPRESSED_3DC_XY 0x87FA
commit-bot@chromium.org6e7ddaa2014-05-30 13:55:58 +0000276
egdanield588c012015-03-27 12:22:10 -0700277#define GR_GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
278#define GR_GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
279#define GR_GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
280#define GR_GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000281
egdanield588c012015-03-27 12:22:10 -0700282#define GR_GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
283#define GR_GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
284#define GR_GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
285#define GR_GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
286#define GR_GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
287#define GR_GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
288#define GR_GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
289#define GR_GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
290#define GR_GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
291#define GR_GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
292#define GR_GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
293#define GR_GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
294#define GR_GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
295#define GR_GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000296
egdanield588c012015-03-27 12:22:10 -0700297#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
298#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
299#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
300#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
301#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
302#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
303#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
304#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
305#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
306#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
307#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
308#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
309#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
310#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
commit-bot@chromium.orgc2dbbb62014-05-27 14:35:25 +0000311
twiz@google.com0f31ca72011-03-18 17:38:11 +0000312/* HintMode */
313#define GR_GL_DONT_CARE 0x1100
314#define GR_GL_FASTEST 0x1101
315#define GR_GL_NICEST 0x1102
316
317/* HintTarget */
318#define GR_GL_GENERATE_MIPMAP_HINT 0x8192
319
320/* DataType */
321#define GR_GL_BYTE 0x1400
322#define GR_GL_UNSIGNED_BYTE 0x1401
323#define GR_GL_SHORT 0x1402
324#define GR_GL_UNSIGNED_SHORT 0x1403
325#define GR_GL_INT 0x1404
326#define GR_GL_UNSIGNED_INT 0x1405
327#define GR_GL_FLOAT 0x1406
jvanverth28f9c602014-12-05 13:06:35 -0800328#define GR_GL_HALF_FLOAT 0x140B
twiz@google.com0f31ca72011-03-18 17:38:11 +0000329#define GR_GL_FIXED 0x140C
jvanverth28f9c602014-12-05 13:06:35 -0800330#define GR_GL_HALF_FLOAT_OES 0x8D61
twiz@google.com0f31ca72011-03-18 17:38:11 +0000331
332/* Lighting */
333#define GR_GL_LIGHTING 0x0B50
334#define GR_GL_LIGHT0 0x4000
335#define GR_GL_LIGHT1 0x4001
336#define GR_GL_LIGHT2 0x4002
337#define GR_GL_LIGHT3 0x4003
338#define GR_GL_LIGHT4 0x4004
339#define GR_GL_LIGHT5 0x4005
340#define GR_GL_LIGHT6 0x4006
341#define GR_GL_LIGHT7 0x4007
342#define GR_GL_SPOT_EXPONENT 0x1205
343#define GR_GL_SPOT_CUTOFF 0x1206
344#define GR_GL_CONSTANT_ATTENUATION 0x1207
345#define GR_GL_LINEAR_ATTENUATION 0x1208
346#define GR_GL_QUADRATIC_ATTENUATION 0x1209
347#define GR_GL_AMBIENT 0x1200
348#define GR_GL_DIFFUSE 0x1201
349#define GR_GL_SPECULAR 0x1202
350#define GR_GL_SHININESS 0x1601
351#define GR_GL_EMISSION 0x1600
352#define GR_GL_POSITION 0x1203
353#define GR_GL_SPOT_DIRECTION 0x1204
354#define GR_GL_AMBIENT_AND_DIFFUSE 0x1602
355#define GR_GL_COLOR_INDEXES 0x1603
356#define GR_GL_LIGHT_MODEL_TWO_SIDE 0x0B52
357#define GR_GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
358#define GR_GL_LIGHT_MODEL_AMBIENT 0x0B53
359#define GR_GL_FRONT_AND_BACK 0x0408
360#define GR_GL_SHADE_MODEL 0x0B54
361#define GR_GL_FLAT 0x1D00
362#define GR_GL_SMOOTH 0x1D01
363#define GR_GL_COLOR_MATERIAL 0x0B57
364#define GR_GL_COLOR_MATERIAL_FACE 0x0B55
365#define GR_GL_COLOR_MATERIAL_PARAMETER 0x0B56
366#define GR_GL_NORMALIZE 0x0BA1
367
368/* Matrix Mode */
369#define GR_GL_MATRIX_MODE 0x0BA0
370#define GR_GL_MODELVIEW 0x1700
371#define GR_GL_PROJECTION 0x1701
372#define GR_GL_TEXTURE 0x1702
373
374/* multisample */
375#define GR_GL_MULTISAMPLE 0x809D
376
377/* Points */
378#define GR_GL_POINT_SMOOTH 0x0B10
379#define GR_GL_POINT_SIZE 0x0B11
380#define GR_GL_POINT_SIZE_GRANULARITY 0x0B13
381#define GR_GL_POINT_SIZE_RANGE 0x0B12
382
383/* Lines */
384#define GR_GL_LINE_SMOOTH 0x0B20
385#define GR_GL_LINE_STIPPLE 0x0B24
386#define GR_GL_LINE_STIPPLE_PATTERN 0x0B25
387#define GR_GL_LINE_STIPPLE_REPEAT 0x0B26
388#define GR_GL_LINE_WIDTH 0x0B21
389#define GR_GL_LINE_WIDTH_GRANULARITY 0x0B23
390#define GR_GL_LINE_WIDTH_RANGE 0x0B22
391
392/* PixelFormat */
393#define GR_GL_DEPTH_COMPONENT 0x1902
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000394#define GR_GL_RED 0x1903
395#define GR_GL_GREEN 0x1904
396#define GR_GL_BLUE 0x1905
twiz@google.com0f31ca72011-03-18 17:38:11 +0000397#define GR_GL_ALPHA 0x1906
398#define GR_GL_RGB 0x1907
399#define GR_GL_RGBA 0x1908
bsalomon@google.comc312bf92011-03-21 21:10:33 +0000400#define GR_GL_BGRA 0x80E1
twiz@google.com0f31ca72011-03-18 17:38:11 +0000401#define GR_GL_LUMINANCE 0x1909
402#define GR_GL_LUMINANCE_ALPHA 0x190A
bsalomon@google.comc312bf92011-03-21 21:10:33 +0000403#define GR_GL_PALETTE8_RGBA8 0x8B96
bsalomon@google.com280e99f2012-01-05 16:17:38 +0000404#define GR_GL_ALPHA8 0x803C
twiz@google.com0f31ca72011-03-18 17:38:11 +0000405
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000406#define GR_GL_R8 0x8229
jvanverth28f9c602014-12-05 13:06:35 -0800407#define GR_GL_R16F 0x822D
jvanverthfb5df432015-05-21 08:12:27 -0700408#define GR_GL_RGBA16F 0x881A
jvanverth28f9c602014-12-05 13:06:35 -0800409#define GR_GL_ALPHA16F 0x881C
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000410
twiz@google.com0f31ca72011-03-18 17:38:11 +0000411/* PixelType */
412/* GL_UNSIGNED_BYTE */
413#define GR_GL_UNSIGNED_SHORT_4_4_4_4 0x8033
414#define GR_GL_UNSIGNED_SHORT_5_5_5_1 0x8034
415#define GR_GL_UNSIGNED_SHORT_5_6_5 0x8363
416
417/* Shaders */
418#define GR_GL_FRAGMENT_SHADER 0x8B30
419#define GR_GL_VERTEX_SHADER 0x8B31
bsalomon@google.comedfe1aa2011-09-29 14:40:26 +0000420#define GR_GL_GEOMETRY_SHADER 0x8DD9
twiz@google.com0f31ca72011-03-18 17:38:11 +0000421#define GR_GL_MAX_VERTEX_ATTRIBS 0x8869
422#define GR_GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
423#define GR_GL_MAX_VARYING_VECTORS 0x8DFC
424#define GR_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
425#define GR_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
426#define GR_GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
427#define GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
428#define GR_GL_SHADER_TYPE 0x8B4F
429#define GR_GL_DELETE_STATUS 0x8B80
430#define GR_GL_LINK_STATUS 0x8B82
431#define GR_GL_VALIDATE_STATUS 0x8B83
432#define GR_GL_ATTACHED_SHADERS 0x8B85
433#define GR_GL_ACTIVE_UNIFORMS 0x8B86
434#define GR_GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
435#define GR_GL_ACTIVE_ATTRIBUTES 0x8B89
436#define GR_GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
437#define GR_GL_SHADING_LANGUAGE_VERSION 0x8B8C
438#define GR_GL_CURRENT_PROGRAM 0x8B8D
senorblanco@chromium.orgef3913b2011-05-19 17:11:07 +0000439#define GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
440#define GR_GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
twiz@google.com0f31ca72011-03-18 17:38:11 +0000441
442/* StencilFunction */
443#define GR_GL_NEVER 0x0200
444#define GR_GL_LESS 0x0201
445#define GR_GL_EQUAL 0x0202
446#define GR_GL_LEQUAL 0x0203
447#define GR_GL_GREATER 0x0204
448#define GR_GL_NOTEQUAL 0x0205
449#define GR_GL_GEQUAL 0x0206
450#define GR_GL_ALWAYS 0x0207
451
452/* StencilOp */
453/* GL_ZERO */
454#define GR_GL_KEEP 0x1E00
455#define GR_GL_REPLACE 0x1E01
456#define GR_GL_INCR 0x1E02
457#define GR_GL_DECR 0x1E03
458#define GR_GL_INVERT 0x150A
459#define GR_GL_INCR_WRAP 0x8507
460#define GR_GL_DECR_WRAP 0x8508
461
462/* StringName */
463#define GR_GL_VENDOR 0x1F00
464#define GR_GL_RENDERER 0x1F01
465#define GR_GL_VERSION 0x1F02
466#define GR_GL_EXTENSIONS 0x1F03
467
bsalomon@google.com1744f972013-02-26 21:46:32 +0000468/* StringCounts */
469#define GR_GL_NUM_EXTENSIONS 0x821D
470
twiz@google.com0f31ca72011-03-18 17:38:11 +0000471/* Pixel Mode / Transfer */
bsalomon@google.comc6980972011-11-02 19:57:21 +0000472#define GR_GL_UNPACK_ROW_LENGTH 0x0CF2
473#define GR_GL_PACK_ROW_LENGTH 0x0D02
474
twiz@google.com0f31ca72011-03-18 17:38:11 +0000475
476/* TextureMagFilter */
477#define GR_GL_NEAREST 0x2600
478#define GR_GL_LINEAR 0x2601
479
480/* TextureMinFilter */
481/* GL_NEAREST */
482/* GL_LINEAR */
483#define GR_GL_NEAREST_MIPMAP_NEAREST 0x2700
484#define GR_GL_LINEAR_MIPMAP_NEAREST 0x2701
485#define GR_GL_NEAREST_MIPMAP_LINEAR 0x2702
486#define GR_GL_LINEAR_MIPMAP_LINEAR 0x2703
487
bsalomon@google.com07dd2bf2011-12-09 19:40:36 +0000488/* TextureUsage */
489#define GR_GL_FRAMEBUFFER_ATTACHMENT 0x93A3
490
twiz@google.com0f31ca72011-03-18 17:38:11 +0000491/* TextureParameterName */
492#define GR_GL_TEXTURE_MAG_FILTER 0x2800
493#define GR_GL_TEXTURE_MIN_FILTER 0x2801
494#define GR_GL_TEXTURE_WRAP_S 0x2802
495#define GR_GL_TEXTURE_WRAP_T 0x2803
bsalomon@google.com07dd2bf2011-12-09 19:40:36 +0000496#define GR_GL_TEXTURE_USAGE 0x93A2
twiz@google.com0f31ca72011-03-18 17:38:11 +0000497
498/* TextureTarget */
499/* GL_TEXTURE_2D */
500#define GR_GL_TEXTURE 0x1702
501#define GR_GL_TEXTURE_CUBE_MAP 0x8513
502#define GR_GL_TEXTURE_BINDING_CUBE_MAP 0x8514
503#define GR_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
504#define GR_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
505#define GR_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
506#define GR_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
507#define GR_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
508#define GR_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
509#define GR_GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
510
511/* TextureUnit */
512#define GR_GL_TEXTURE0 0x84C0
513#define GR_GL_TEXTURE1 0x84C1
514#define GR_GL_TEXTURE2 0x84C2
515#define GR_GL_TEXTURE3 0x84C3
516#define GR_GL_TEXTURE4 0x84C4
517#define GR_GL_TEXTURE5 0x84C5
518#define GR_GL_TEXTURE6 0x84C6
519#define GR_GL_TEXTURE7 0x84C7
520#define GR_GL_TEXTURE8 0x84C8
521#define GR_GL_TEXTURE9 0x84C9
522#define GR_GL_TEXTURE10 0x84CA
523#define GR_GL_TEXTURE11 0x84CB
524#define GR_GL_TEXTURE12 0x84CC
525#define GR_GL_TEXTURE13 0x84CD
526#define GR_GL_TEXTURE14 0x84CE
527#define GR_GL_TEXTURE15 0x84CF
528#define GR_GL_TEXTURE16 0x84D0
529#define GR_GL_TEXTURE17 0x84D1
530#define GR_GL_TEXTURE18 0x84D2
531#define GR_GL_TEXTURE19 0x84D3
532#define GR_GL_TEXTURE20 0x84D4
533#define GR_GL_TEXTURE21 0x84D5
534#define GR_GL_TEXTURE22 0x84D6
535#define GR_GL_TEXTURE23 0x84D7
536#define GR_GL_TEXTURE24 0x84D8
537#define GR_GL_TEXTURE25 0x84D9
538#define GR_GL_TEXTURE26 0x84DA
539#define GR_GL_TEXTURE27 0x84DB
540#define GR_GL_TEXTURE28 0x84DC
541#define GR_GL_TEXTURE29 0x84DD
542#define GR_GL_TEXTURE30 0x84DE
543#define GR_GL_TEXTURE31 0x84DF
544#define GR_GL_ACTIVE_TEXTURE 0x84E0
545#define GR_GL_MAX_TEXTURE_UNITS 0x84E2
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000546#define GR_GL_MAX_TEXTURE_COORDS 0x8871
twiz@google.com0f31ca72011-03-18 17:38:11 +0000547
548/* TextureWrapMode */
549#define GR_GL_REPEAT 0x2901
550#define GR_GL_CLAMP_TO_EDGE 0x812F
551#define GR_GL_MIRRORED_REPEAT 0x8370
552
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000553/* Texture Swizzle */
554#define GR_GL_TEXTURE_SWIZZLE_R 0x8E42
555#define GR_GL_TEXTURE_SWIZZLE_G 0x8E43
556#define GR_GL_TEXTURE_SWIZZLE_B 0x8E44
557#define GR_GL_TEXTURE_SWIZZLE_A 0x8E45
558#define GR_GL_TEXTURE_SWIZZLE_RGBA 0x8E46
559
twiz@google.com0f31ca72011-03-18 17:38:11 +0000560/* Texture mapping */
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000561#define GR_GL_TEXTURE_ENV 0x2300
562#define GR_GL_TEXTURE_ENV_MODE 0x2200
563#define GR_GL_TEXTURE_1D 0x0DE0
bsalomon@google.comcee661a2011-07-26 12:32:36 +0000564/* GL_TEXTURE_2D */
565/* GL_TEXTURE_WRAP_S */
566/* GL_TEXTURE_WRAP_T */
567/* GL_TEXTURE_MAG_FILTER */
568/* GL_TEXTURE_MIN_FILTER */
twiz@google.com0f31ca72011-03-18 17:38:11 +0000569#define GR_GL_TEXTURE_ENV_COLOR 0x2201
570#define GR_GL_TEXTURE_GEN_S 0x0C60
571#define GR_GL_TEXTURE_GEN_T 0x0C61
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000572#define GR_GL_TEXTURE_GEN_R 0x0C62
573#define GR_GL_TEXTURE_GEN_Q 0x0C63
twiz@google.com0f31ca72011-03-18 17:38:11 +0000574#define GR_GL_TEXTURE_GEN_MODE 0x2500
575#define GR_GL_TEXTURE_BORDER_COLOR 0x1004
576#define GR_GL_TEXTURE_WIDTH 0x1000
577#define GR_GL_TEXTURE_HEIGHT 0x1001
578#define GR_GL_TEXTURE_BORDER 0x1005
579#define GR_GL_TEXTURE_COMPONENTS 0x1003
580#define GR_GL_TEXTURE_RED_SIZE 0x805C
581#define GR_GL_TEXTURE_GREEN_SIZE 0x805D
582#define GR_GL_TEXTURE_BLUE_SIZE 0x805E
583#define GR_GL_TEXTURE_ALPHA_SIZE 0x805F
584#define GR_GL_TEXTURE_LUMINANCE_SIZE 0x8060
585#define GR_GL_TEXTURE_INTENSITY_SIZE 0x8061
bsalomon@google.comcee661a2011-07-26 12:32:36 +0000586#define GR_GL_TEXTURE_INTERNAL_FORMAT 0x1003
587/* GL_NEAREST_MIPMAP_NEAREST */
588/* GL_NEAREST_MIPMAP_LINEAR */
589/* GL_LINEAR_MIPMAP_NEAREST */
590/* GL_LINEAR_MIPMAP_LINEAR */
twiz@google.com0f31ca72011-03-18 17:38:11 +0000591#define GR_GL_OBJECT_LINEAR 0x2401
592#define GR_GL_OBJECT_PLANE 0x2501
593#define GR_GL_EYE_LINEAR 0x2400
594#define GR_GL_EYE_PLANE 0x2502
595#define GR_GL_SPHERE_MAP 0x2402
596#define GR_GL_DECAL 0x2101
597#define GR_GL_MODULATE 0x2100
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000598/* GL_NEAREST */
599/* GL_REPEAT */
twiz@google.com0f31ca72011-03-18 17:38:11 +0000600#define GR_GL_CLAMP 0x2900
601#define GR_GL_S 0x2000
602#define GR_GL_T 0x2001
603#define GR_GL_R 0x2002
604#define GR_GL_Q 0x2003
605#define GR_GL_TEXTURE_GEN_R 0x0C62
606#define GR_GL_TEXTURE_GEN_Q 0x0C63
607
608/* texture_env_combine */
609#define GR_GL_COMBINE 0x8570
610#define GR_GL_COMBINE_RGB 0x8571
611#define GR_GL_COMBINE_ALPHA 0x8572
612#define GR_GL_SOURCE0_RGB 0x8580
613#define GR_GL_SOURCE1_RGB 0x8581
614#define GR_GL_SOURCE2_RGB 0x8582
615#define GR_GL_SOURCE0_ALPHA 0x8588
616#define GR_GL_SOURCE1_ALPHA 0x8589
617#define GR_GL_SOURCE2_ALPHA 0x858A
618#define GR_GL_OPERAND0_RGB 0x8590
619#define GR_GL_OPERAND1_RGB 0x8591
620#define GR_GL_OPERAND2_RGB 0x8592
621#define GR_GL_OPERAND0_ALPHA 0x8598
622#define GR_GL_OPERAND1_ALPHA 0x8599
623#define GR_GL_OPERAND2_ALPHA 0x859A
624#define GR_GL_RGB_SCALE 0x8573
625#define GR_GL_ADD_SIGNED 0x8574
626#define GR_GL_INTERPOLATE 0x8575
627#define GR_GL_SUBTRACT 0x84E7
628#define GR_GL_CONSTANT 0x8576
629#define GR_GL_PRIMARY_COLOR 0x8577
630#define GR_GL_PREVIOUS 0x8578
631#define GR_GL_SRC0_RGB 0x8580
632#define GR_GL_SRC1_RGB 0x8581
633#define GR_GL_SRC2_RGB 0x8582
634#define GR_GL_SRC0_ALPHA 0x8588
635#define GR_GL_SRC1_ALPHA 0x8589
636#define GR_GL_SRC2_ALPHA 0x858A
637
638/* Uniform Types */
639#define GR_GL_FLOAT_VEC2 0x8B50
640#define GR_GL_FLOAT_VEC3 0x8B51
641#define GR_GL_FLOAT_VEC4 0x8B52
642#define GR_GL_INT_VEC2 0x8B53
643#define GR_GL_INT_VEC3 0x8B54
644#define GR_GL_INT_VEC4 0x8B55
645#define GR_GL_BOOL 0x8B56
646#define GR_GL_BOOL_VEC2 0x8B57
647#define GR_GL_BOOL_VEC3 0x8B58
648#define GR_GL_BOOL_VEC4 0x8B59
649#define GR_GL_FLOAT_MAT2 0x8B5A
650#define GR_GL_FLOAT_MAT3 0x8B5B
651#define GR_GL_FLOAT_MAT4 0x8B5C
652#define GR_GL_SAMPLER_2D 0x8B5E
653#define GR_GL_SAMPLER_CUBE 0x8B60
654
655/* Vertex Arrays */
656#define GR_GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
657#define GR_GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
658#define GR_GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
659#define GR_GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
660#define GR_GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
661#define GR_GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
662#define GR_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
663#define GR_GL_VERTEX_ARRAY 0x8074
664#define GR_GL_NORMAL_ARRAY 0x8075
665#define GR_GL_COLOR_ARRAY 0x8076
commit-bot@chromium.orgce6da4d2013-09-09 14:55:37 +0000666#define GR_GL_SECONDARY_COLOR_ARRAY 0x845E
twiz@google.com0f31ca72011-03-18 17:38:11 +0000667#define GR_GL_INDEX_ARRAY 0x8077
668#define GR_GL_TEXTURE_COORD_ARRAY 0x8078
669#define GR_GL_EDGE_FLAG_ARRAY 0x8079
670#define GR_GL_VERTEX_ARRAY_SIZE 0x807A
671#define GR_GL_VERTEX_ARRAY_TYPE 0x807B
672#define GR_GL_VERTEX_ARRAY_STRIDE 0x807C
673#define GR_GL_NORMAL_ARRAY_TYPE 0x807E
674#define GR_GL_NORMAL_ARRAY_STRIDE 0x807F
675#define GR_GL_COLOR_ARRAY_SIZE 0x8081
676#define GR_GL_COLOR_ARRAY_TYPE 0x8082
677#define GR_GL_COLOR_ARRAY_STRIDE 0x8083
678#define GR_GL_INDEX_ARRAY_TYPE 0x8085
679#define GR_GL_INDEX_ARRAY_STRIDE 0x8086
680#define GR_GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
681#define GR_GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
682#define GR_GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
683#define GR_GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
684#define GR_GL_VERTEX_ARRAY_POINTER 0x808E
685#define GR_GL_NORMAL_ARRAY_POINTER 0x808F
686#define GR_GL_COLOR_ARRAY_POINTER 0x8090
687#define GR_GL_INDEX_ARRAY_POINTER 0x8091
688#define GR_GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
689#define GR_GL_EDGE_FLAG_ARRAY_POINTER 0x8093
690#define GR_GL_V2F 0x2A20
691#define GR_GL_V3F 0x2A21
692#define GR_GL_C4UB_V2F 0x2A22
693#define GR_GL_C4UB_V3F 0x2A23
694#define GR_GL_C3F_V3F 0x2A24
695#define GR_GL_N3F_V3F 0x2A25
696#define GR_GL_C4F_N3F_V3F 0x2A26
697#define GR_GL_T2F_V3F 0x2A27
698#define GR_GL_T4F_V4F 0x2A28
699#define GR_GL_T2F_C4UB_V3F 0x2A29
700#define GR_GL_T2F_C3F_V3F 0x2A2A
701#define GR_GL_T2F_N3F_V3F 0x2A2B
702#define GR_GL_T2F_C4F_N3F_V3F 0x2A2C
703#define GR_GL_T4F_C4F_N3F_V4F 0x2A2D
704
bsalomon@google.comc312bf92011-03-21 21:10:33 +0000705/* Vertex Buffer Object */
706#define GR_GL_WRITE_ONLY 0x88B9
707#define GR_GL_BUFFER_MAPPED 0x88BC
commit-bot@chromium.org160b4782014-05-05 12:32:37 +0000708
709#define GR_GL_MAP_READ_BIT 0x0001
710#define GR_GL_MAP_WRITE_BIT 0x0002
711#define GR_GL_MAP_INVALIDATE_RANGE_BIT 0x0004
712#define GR_GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
713#define GR_GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
714#define GR_GL_MAP_UNSYNCHRONIZED_BIT 0x0020
715
twiz@google.com0f31ca72011-03-18 17:38:11 +0000716/* Read Format */
717#define GR_GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
718#define GR_GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
719
720/* Shader Source */
721#define GR_GL_COMPILE_STATUS 0x8B81
722#define GR_GL_INFO_LOG_LENGTH 0x8B84
723#define GR_GL_SHADER_SOURCE_LENGTH 0x8B88
724#define GR_GL_SHADER_COMPILER 0x8DFA
725
726/* Shader Binary */
727#define GR_GL_SHADER_BINARY_FORMATS 0x8DF8
728#define GR_GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
729
730/* Shader Precision-Specified Types */
731#define GR_GL_LOW_FLOAT 0x8DF0
732#define GR_GL_MEDIUM_FLOAT 0x8DF1
733#define GR_GL_HIGH_FLOAT 0x8DF2
734#define GR_GL_LOW_INT 0x8DF3
735#define GR_GL_MEDIUM_INT 0x8DF4
736#define GR_GL_HIGH_INT 0x8DF5
737
bsalomon@google.com373a6632011-10-19 20:43:20 +0000738/* Queries */
739#define GR_GL_QUERY_COUNTER_BITS 0x8864
740#define GR_GL_CURRENT_QUERY 0x8865
741#define GR_GL_QUERY_RESULT 0x8866
742#define GR_GL_QUERY_RESULT_AVAILABLE 0x8867
743#define GR_GL_SAMPLES_PASSED 0x8914
744#define GR_GL_ANY_SAMPLES_PASSED 0x8C2F
745#define GR_GL_TIME_ELAPSED 0x88BF
746#define GR_GL_TIMESTAMP 0x8E28
747#define GR_GL_PRIMITIVES_GENERATED 0x8C87
748#define GR_GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
749
750
twiz@google.com0f31ca72011-03-18 17:38:11 +0000751/* Framebuffer Object. */
752#define GR_GL_FRAMEBUFFER 0x8D40
bsalomon@google.comc312bf92011-03-21 21:10:33 +0000753#define GR_GL_READ_FRAMEBUFFER 0x8CA8
754#define GR_GL_DRAW_FRAMEBUFFER 0x8CA9
755
twiz@google.com0f31ca72011-03-18 17:38:11 +0000756#define GR_GL_RENDERBUFFER 0x8D41
757
758#define GR_GL_RGBA4 0x8056
759#define GR_GL_RGB5_A1 0x8057
760#define GR_GL_RGB565 0x8D62
bsalomon@google.comc312bf92011-03-21 21:10:33 +0000761#define GR_GL_RGBA8 0x8058
joshualittee5da552014-07-16 13:32:56 -0700762#define GR_GL_RGBA32F 0x8814
jvanverth3f801cb2014-12-16 09:49:38 -0800763#define GR_GL_RGB5 0x8050
bsalomon@google.comcee661a2011-07-26 12:32:36 +0000764#define GR_GL_RGB8 0x8051
bsalomon@google.com280e99f2012-01-05 16:17:38 +0000765#define GR_GL_BGRA8 0x93A1
bsalomon@google.comcee661a2011-07-26 12:32:36 +0000766#define GR_GL_SRGB 0x8C40
767#define GR_GL_SRGB8 0x8C41
768#define GR_GL_SRGB_ALPHA 0x8C42
769#define GR_GL_SRGB8_ALPHA8 0x8C43
twiz@google.com0f31ca72011-03-18 17:38:11 +0000770#define GR_GL_DEPTH_COMPONENT16 0x81A5
771#define GR_GL_STENCIL_INDEX 0x1901
bsalomon@google.comc312bf92011-03-21 21:10:33 +0000772#define GR_GL_STENCIL_INDEX4 0x8D47
twiz@google.com0f31ca72011-03-18 17:38:11 +0000773#define GR_GL_STENCIL_INDEX8 0x8D48
bsalomon@google.comc312bf92011-03-21 21:10:33 +0000774#define GR_GL_STENCIL_INDEX16 0x8D49
775#define GR_GL_DEPTH_STENCIL 0x84F9
776#define GR_GL_DEPTH24_STENCIL8 0x88F0
777
778#define GR_GL_MAX_SAMPLES 0x8D57
bsalomon@google.comf3a60c02013-03-19 19:06:09 +0000779// GL_IMG_multisampled_render_to_texture uses a different value for GL_MAX_SAMPLES
780#define GR_GL_MAX_SAMPLES_IMG 0x9135
twiz@google.com0f31ca72011-03-18 17:38:11 +0000781
782#define GR_GL_RENDERBUFFER_WIDTH 0x8D42
783#define GR_GL_RENDERBUFFER_HEIGHT 0x8D43
784#define GR_GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
785#define GR_GL_RENDERBUFFER_RED_SIZE 0x8D50
786#define GR_GL_RENDERBUFFER_GREEN_SIZE 0x8D51
787#define GR_GL_RENDERBUFFER_BLUE_SIZE 0x8D52
788#define GR_GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
789#define GR_GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
790#define GR_GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
791
792#define GR_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
793#define GR_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
794#define GR_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
795#define GR_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
bsalomon@google.comcee661a2011-07-26 12:32:36 +0000796#define GR_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
jvanverthfa1e8a72014-12-22 08:31:49 -0800797#define GR_GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
798#define GR_GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
bsalomon@google.comcee661a2011-07-26 12:32:36 +0000799#define GR_GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
800#define GR_GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
801#define GR_GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
802#define GR_GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
803#define GR_GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
804#define GR_GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
twiz@google.com0f31ca72011-03-18 17:38:11 +0000805
806#define GR_GL_COLOR_ATTACHMENT0 0x8CE0
807#define GR_GL_DEPTH_ATTACHMENT 0x8D00
808#define GR_GL_STENCIL_ATTACHMENT 0x8D20
twiz@google.com0f31ca72011-03-18 17:38:11 +0000809
commit-bot@chromium.org28361fa2014-03-28 16:08:05 +0000810// GL_EXT_discard_framebuffer
811#define GR_GL_COLOR 0x1800
812#define GR_GL_DEPTH 0x1801
813#define GR_GL_STENCIL 0x1802
814
twiz@google.com0f31ca72011-03-18 17:38:11 +0000815#define GR_GL_NONE 0
816
817#define GR_GL_FRAMEBUFFER_COMPLETE 0x8CD5
818#define GR_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
819#define GR_GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
820#define GR_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
821#define GR_GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
822
823#define GR_GL_FRAMEBUFFER_BINDING 0x8CA6
824#define GR_GL_RENDERBUFFER_BINDING 0x8CA7
825#define GR_GL_MAX_RENDERBUFFER_SIZE 0x84E8
826
827#define GR_GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
828
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000829/* Path Rendering */
830// commands
831#define GR_GL_CLOSE_PATH 0x00
832#define GR_GL_MOVE_TO 0x02
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000833#define GR_GL_LINE_TO 0x04
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000834#define GR_GL_QUADRATIC_CURVE_TO 0x0A
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000835#define GR_GL_CUBIC_CURVE_TO 0x0C
kkinnunene097be52014-11-19 22:49:03 -0800836#define GR_GL_CONIC_CURVE_TO 0x1A
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000837
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000838// path parameters
839#define GR_GL_PATH_STROKE_WIDTH 0x9075
kkinnunen542ecbb2014-11-18 05:13:48 -0800840#define GR_GL_PATH_END_CAPS 0x9076
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000841#define GR_GL_PATH_JOIN_STYLE 0x9079
842#define GR_GL_PATH_MITER_LIMIT 0x907A
kkinnunen55e47832015-05-18 22:25:47 -0700843#define GR_GL_PATH_STROKE_BOUND 0x9086
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000844
845// fill modes
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000846#define GR_GL_COUNT_UP 0x9088
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000847
848// cover mode
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000849#define GR_GL_BOUNDING_BOX 0x908D
850#define GR_GL_BOUNDING_BOX_OF_BOUNDING_BOXES 0x909C
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000851
852// transform type
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000853#define GR_GL_TRANSLATE_X 0x908E
854#define GR_GL_TRANSLATE_Y 0x908F
855#define GR_GL_TRANSLATE_2D 0x9090
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000856#define GR_GL_TRANSPOSE_AFFINE_2D 0x9096
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000857
858// cap/dash values
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000859#define GR_GL_SQUARE 0x90A3
860#define GR_GL_ROUND 0x90A4
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000861
862// join values
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000863#define GR_GL_BEVEL 0x90A6
864#define GR_GL_MITER_REVERT 0x90A7
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000865
cdalton149b3ec2014-09-17 09:19:18 -0700866// glyph loading values
cdalton149b3ec2014-09-17 09:19:18 -0700867#define GR_GL_STANDARD_FONT_FORMAT 0x936C
cdalton149b3ec2014-09-17 09:19:18 -0700868#define GR_GL_FONT_GLYPHS_AVAILABLE 0x9368
cdalton149b3ec2014-09-17 09:19:18 -0700869
kkinnunen32b9a3b2014-07-02 22:56:35 -0700870// NV_path_rendering extension to ARB_program_interface_query:
871// .. corresponds to the set of active input variables used by the fragment
872// shader stage of <program> (if a fragment stage exists).
873#define GR_GL_FRAGMENT_INPUT 0x936D
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000874
kkinnunenec56e452014-08-25 22:21:16 -0700875// NV_path_rendering extension to EXT_direct_state_access:
876// [the matrix functions] must support the PATH_PROJECTION_NV and
877// PATH_MODELVIEW_NV tokens for matrixMode.
878#define GR_GL_PATH_PROJECTION 0x1701
879#define GR_GL_PATH_MODELVIEW 0x1700
880
joshualitt58162332014-08-01 06:44:53 -0700881/* ARM specific define for MSAA support on framebuffer fetch */
882#define GR_GL_FETCH_PER_SAMPLE_ARM 0x8F65
883
cdalton0edea2c2015-05-21 08:27:44 -0700884/* GL_EXT_raster_multisample */
885#define GR_GL_RASTER_MULTISAMPLE 0x9327
886#define GR_GL_RASTER_SAMPLES 0x9328
887#define GR_GL_MAX_RASTER_SAMPLES 0x9329
888#define GR_GL_RASTER_FIXED_SAMPLE_LOCATIONS 0x932A
889#define GR_GL_MULTISAMPLE_RASTERIZATION_ALLOWED 0x932B
890#define GR_GL_EFFECTIVE_RASTER_SAMPLES 0x932C
891
reed@google.coma03ec862011-03-22 17:49:13 +0000892#endif