18 #ifndef ION_PORTGFX_GLHEADERS_H_
19 #define ION_PORTGFX_GLHEADERS_H_
25 #if defined(_GL_GL_H_)
26 # error "ion/portgfx/glheaders.h must be included before system gl.h"
33 #if defined(ION_PLATFORM_MAC)
34 # include <OpenGL/gl.h>
36 # include <OpenGL/glext.h>
39 typedef void (*GLDEBUGPROC)(GLenum source, GLenum
type, GLuint
id,
40 GLenum severity, GLsizei
length,
41 const GLchar *message,
const void *userParam);
43 #elif defined(ION_PLATFORM_IOS)
44 # include <OpenGLES/ES2/gl.h>
46 # include <OpenGLES/ES2/glext.h>
49 typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source, GLenum
type, GLuint
id,
50 GLenum severity, GLsizei
length,
51 const GLchar *message,
52 const void *userParam);
54 #elif defined(ION_PLATFORM_ANDROID) || \
55 defined(ION_PLATFORM_GENERIC_ARM) || \
56 defined(ION_PLATFORM_ASMJS) || \
57 defined(ION_PLATFORM_NACL) || \
58 defined(ION_PLATFORM_QNX) || \
59 (defined(ION_PLATFORM_LINUX) && defined(ION_GFX_OGLES20))
60 # if !defined(ION_PLATFORM_NACL)
61 # if (defined(ION_PLATFORM_LINUX) && defined(ION_GFX_OGLES20))
64 # define MESA_EGL_NO_X11_HEADERS
68 # include <EGL/eglext.h>
71 # if (defined(ION_PLATFORM_LINUX) && defined(ION_GFX_OGLES20))
72 # undef MESA_EGL_NO_X11_HEADERS
75 # if __ANDROID_API__ >= 18
76 # include <GLES3/gl3.h>
78 # include <GLES2/gl2.h>
79 # include <GLES2/gl2ext.h>
83 typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source, GLenum
type, GLuint
id,
84 GLenum severity, GLsizei
length,
85 const GLchar *message,
86 const void *userParam);
89 # if defined(ION_PLATFORM_WINDOWS)
90 # if defined(ION_ANGLE)
93 # include <EGL/eglext.h>
96 # undef NOGDI // Need to get wgl functions from windows.h.
100 # if !defined(GL_GLEXT_PROTOTYPES)
101 # define GL_GLEXT_PROTOTYPES // For glGetString() to be defined.
103 # include "third_party/GL/gl/include/GL/glcorearb.h"
104 # include "third_party/GL/gl/include/GL/glext.h"
113 #if defined(ION_PLATFORM_ASMJS) || defined(ION_GOOGLE_INTERNAL)
118 #if defined(ION_PLATFORM_LINUX) && defined(ION_GFX_OGLES20)
121 #elif !defined(__glcorearb_h_) && \
122 (!defined(ION_PLATFORM_ANDROID) || (__ANDROID_API__ <= 20))
137 #ifndef GL_ALIASED_POINT_SIZE_RANGE
138 # define GL_ALIASED_POINT_SIZE_RANGE 0x846D
140 #ifndef GL_ALPHA_BITS
141 # define GL_ALPHA_BITS 0x0D55
143 #ifndef GL_ALREADY_SIGNALED
144 # define GL_ALREADY_SIGNALED 0x911A
147 # define GL_BACK 0x0405
150 # define GL_BACK_LEFT 0x0402
152 #ifndef GL_BACK_RIGHT
153 # define GL_BACK_RIGHT 0x0403
156 # define GL_BLUE 0x1905
159 # define GL_BLUE_BITS 0x0D54
161 #ifndef GL_BUFFER_MAP_POINTER
162 #define GL_BUFFER_MAP_POINTER 0x88BD
164 #ifndef GL_BUFFER_OBJECT
165 # define GL_BUFFER_OBJECT 0x9151
167 #ifndef GL_COLOR_ATTACHMENT0
168 # define GL_COLOR_ATTACHMENT0 0x8CE0
170 #ifndef GL_COMPARE_REF_TO_TEXTURE
171 # define GL_COMPARE_REF_TO_TEXTURE 0x884E
173 #ifndef GL_COMPRESSED_R11_EAC
174 # define GL_COMPRESSED_R11_EAC 0x9270
176 #ifndef GL_COMPRESSED_RG11_EAC
177 # define GL_COMPRESSED_RG11_EAC 0x9272
179 #ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
180 # define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
182 #ifndef GL_COMPRESSED_RGB8_ETC2
183 # define GL_COMPRESSED_RGB8_ETC2 0x9274
185 #ifndef GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
186 # define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
188 #ifndef GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG
189 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
191 #ifndef GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG
192 #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
194 #ifndef GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
195 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
197 #ifndef GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
198 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
200 #ifndef GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
201 # define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
203 #ifndef GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
204 # define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
206 #ifndef GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
207 # define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
209 #ifndef GL_COMPRESSED_RGBA8_ETC2_EAC
210 # define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
212 #ifndef GL_COMPRESSED_SIGNED_R11_EAC
213 # define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
215 #ifndef GL_COMPRESSED_SIGNED_RG11_EAC
216 # define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
218 #ifndef GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
219 # define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
221 #ifndef GL_COMPRESSED_SRGB8_ETC2
222 # define GL_COMPRESSED_SRGB8_ETC2 0x9275
224 #ifndef GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
225 # define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
227 #ifndef GL_CONDITION_SATISFED
228 # define GL_CONDITION_SATISFIED 0x911C
230 #ifndef GL_CONTEXT_COMPATIBILITY_PROFILE_BIT
231 # define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x0002
233 #ifndef GL_CONTEXT_CORE_PROFILE_BIT
234 # define GL_CONTEXT_CORE_PROFILE_BIT 0x0001
236 #ifndef GL_CONTEXT_PROFILE_MASK
237 # define GL_CONTEXT_PROFILE_MASK 0x9126
239 #ifndef GL_COPY_READ_BUFFER
240 # define GL_COPY_READ_BUFFER 0x8F36
242 #ifndef GL_COPY_WRITE_BUFFER
243 # define GL_COPY_WRITE_BUFFER 0x8F37
245 #ifndef GL_CURRENT_QUERY_EXT
246 # define GL_CURRENT_QUERY_EXT 0x8865
248 #ifndef GL_DRAW_BUFFER0
249 # define GL_DRAW_BUFFER0 0x8825
251 #ifndef GL_DEBUG_CALLBACK_FUNCTION
252 # define GL_DEBUG_CALLBACK_FUNCTION 0x8244
254 #ifndef GL_DEBUG_CALLBACK_USER_PARAM
255 # define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
257 #ifndef GL_DEBUG_LOGGED_MESSAGES
258 # define GL_DEBUG_LOGGED_MESSAGES 0x9145
260 #ifndef GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH
261 # define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
263 #ifndef GL_DEBUG_OUTPUT_SYNCHRONOUS
264 # define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
266 #ifndef GL_DEBUG_SEVERITY_LOW
267 # define GL_DEBUG_SEVERITY_LOW 0x9148
269 #ifndef GL_DEBUG_SEVERITY_MEDIUM
270 # define GL_DEBUG_SEVERITY_MEDIUM 0x9147
272 #ifndef GL_DEBUG_SEVERITY_HIGH
273 # define GL_DEBUG_SEVERITY_HIGH 0x9146
275 #ifndef GL_DEBUG_SOURCE_API
276 # define GL_DEBUG_SOURCE_API 0x8246
278 #ifndef GL_DEBUG_SOURCE_APPLICATION
279 # define GL_DEBUG_SOURCE_APPLICATION 0x824A
281 #ifndef GL_DEBUG_SOURCE_OTHER
282 # define GL_DEBUG_SOURCE_OTHER 0x824B
284 #ifndef GL_DEBUG_SOURCE_SHADER_COMPILER
285 # define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
287 #ifndef GL_DEBUG_SOURCE_THIRD_PARTY
288 # define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
290 #ifndef GL_DEBUG_SOURCE_WINDOW_SYSTEM
291 # define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
293 #ifndef GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR
294 # define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
296 #ifndef GL_DEBUG_TYPE_ERROR
297 # define GL_DEBUG_TYPE_ERROR 0x824C
299 #ifndef GL_DEBUG_TYPE_OTHER
300 # define GL_DEBUG_TYPE_OTHER 0x8251
302 #ifndef GL_DEBUG_TYPE_PERFORMANCE
303 # define GL_DEBUG_TYPE_PERFORMANCE 0x8250
305 #ifndef GL_DEBUG_TYPE_PORTABILITY
306 # define GL_DEBUG_TYPE_PORTABILITY 0x824F
308 #ifndef GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR
309 # define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
311 #ifndef GL_DEPTH_ATTACHMENT
312 # define GL_DEPTH_ATTACHMENT 0x8D00
314 #ifndef GL_DEPTH24_STENCIL8
315 # define GL_DEPTH24_STENCIL8 0x88F0
317 #ifndef GL_DEPTH32F_STENCIL8
318 # define GL_DEPTH32F_STENCIL8 0x8CAD
320 #ifndef GL_DEPTH_BITS
321 # define GL_DEPTH_BITS 0x0D56
323 #ifndef GL_DEPTH_BUFFER_BIT
324 # define GL_DEPTH_BUFFER_BIT 0x00000100
326 #ifndef GL_DEPTH_COMPONENT24
327 # define GL_DEPTH_COMPONENT24 0x81A6
329 #ifndef GL_DEPTH_COMPONENT32F
330 # define GL_DEPTH_COMPONENT32F 0x8CAC
332 #ifndef GL_DEPTH_STENCIL
333 # define GL_DEPTH_STENCIL 0x84F9
335 #ifndef GL_DRAW_BUFFER
336 # define GL_DRAW_BUFFER 0x0C01
338 #ifndef GL_DRAW_FRAMEBUFFER
339 # define GL_DRAW_FRAMEBUFFER 0x8CA9
341 #ifndef GL_DRAW_FRAMEBUFFER_BINDING
342 # define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
344 #ifndef GL_ETC1_RGB8_OES
345 # define GL_ETC1_RGB8_OES 0x8D64
348 # define GL_FIXED 0x140C
350 #ifndef GL_FLOAT_32_UNSIGNED_INT_24_8_REV
351 # define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
353 #ifndef GL_FRAMEBUFFER
354 # define GL_FRAMEBUFFER 0x8D40
356 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
357 # define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
359 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
360 # define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
362 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER
363 # define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
365 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
366 # define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
368 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
369 # define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
371 #ifndef GL_FRAMEBUFFER_BINDING
372 # define GL_FRAMEBUFFER_BINDING 0x8CA6
374 #ifndef GL_FRAMEBUFFER_COMPLETE
375 # define GL_FRAMEBUFFER_COMPLETE 0x8CD5
377 #ifndef GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
378 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
380 #ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
381 # define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
383 #ifndef GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
384 # define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
386 #ifndef GL_FRAMEBUFFER_UNSUPPORTED
387 # define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
390 # define GL_FRONT 0x0404
392 #ifndef GL_FRONT_AND_BACK
393 # define GL_FRONT_AND_BACK 0x0408
395 #ifndef GL_FRONT_LEFT
396 # define GL_FRONT_LEFT 0x0400
398 #ifndef GL_FRONT_RIGHT
399 # define GL_FRONT_RIGHT 0x0401
401 #ifndef GL_GENERATE_MIPMAP_HINT
402 # define GL_GENERATE_MIPMAP_HINT 0x8192
404 #ifndef GL_GPU_DISJOINT_EXT
405 # define GL_GPU_DISJOINT_EXT 0x8FBB
408 # define GL_GREEN 0x1904
410 #ifndef GL_GREEN_BITS
411 # define GL_GREEN_BITS 0x0D53
413 #ifndef GL_HALF_FLOAT
414 # define GL_HALF_FLOAT 0x140B
416 #ifndef GL_HIGH_FLOAT
417 # define GL_HIGH_FLOAT 0x8DF2
420 # define GL_HIGH_INT 0x8DF5
422 #ifndef GL_IMPLEMENTATION_COLOR_READ_FORMAT
423 # define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
425 #ifndef GL_IMPLEMENTATION_COLOR_READ_TYPE
426 # define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
428 #ifndef GL_INT_SAMPLER_1D
429 # define GL_INT_SAMPLER_1D 0x8DC9
431 #ifndef GL_INT_SAMPLER_2D
432 # define GL_INT_SAMPLER_2D 0x8DCA
434 #ifndef GL_INT_SAMPLER_3D
435 # define GL_INT_SAMPLER_3D 0x8DCB
437 #ifndef GL_INT_SAMPLER_CUBE
438 # define GL_INT_SAMPLER_CUBE 0x8DCC
440 #ifndef GL_INT_SAMPLER_1D_ARRAY
441 # define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
443 #ifndef GL_INT_SAMPLER_2D_ARRAY
444 # define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
446 #ifndef GL_INT_SAMPLER_CUBE_MAP_ARRAY
447 # define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
449 #ifndef GL_INTERLEAVED_ATTRIBS
450 #define GL_INTERLEAVED_ATTRIBS 0x8C8C
452 #ifndef GL_INVALID_FRAMEBUFFER_OPERATION
453 # define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
456 # define GL_LEFT 0x0406
459 # define GL_LOW_FLOAT 0x8DF0
462 # define GL_LOW_INT 0x8DF3
465 # define GL_LUMINANCE 0x1909
467 #ifndef GL_LUMINANCE_ALPHA
468 # define GL_LUMINANCE_ALPHA 0x190A
470 #ifndef GL_MAP_FLUSH_EXPLICIT_BIT
471 # define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
473 #ifndef GL_MAP_INVALIDATE_BUFFER_BIT
474 # define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
476 #ifndef GL_MAP_INVALIDATE_RANGE_BIT
477 # define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
479 #ifndef GL_MAP_READ_BIT
480 # define GL_MAP_READ_BIT 0x0001
482 #ifndef GL_MAP_UNSYNCHRONIZED_BIT
483 # define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
485 #ifndef GL_MAP_WRITE_BIT
486 # define GL_MAP_WRITE_BIT 0x0002
488 #ifndef GL_MAX_3D_TEXTURE_SIZE
489 # define GL_MAX_3D_TEXTURE_SIZE 0x8073
491 #ifndef GL_MAX_ARRAY_TEXTURE_LAYERS
492 # define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
494 #ifndef GL_MAX_COLOR_ATTACHMENTS
495 # define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
497 #ifndef GL_MAX_DEBUG_LOGGED_MESSAGES
498 # define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
500 #ifndef GL_MAX_DEBUG_MESSAGE_LENGTH
501 # define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
503 #ifndef GL_MAX_DRAW_BUFFERS
504 # define GL_MAX_DRAW_BUFFERS 0x8824
506 #ifndef GL_MAX_FRAGMENT_UNIFORM_COMPONENTS
507 # define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
509 #ifndef GL_MAX_FRAGMENT_UNIFORM_VECTORS
510 # define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
512 #ifndef GL_MAX_RENDERBUFFER_SIZE
513 # define GL_MAX_RENDERBUFFER_SIZE 0x84E8
515 #ifndef GL_MAX_SAMPLE_MASK_WORDS
516 # define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
518 #ifndef GL_MAX_SAMPLES
519 # define GL_MAX_SAMPLES 0x8D57
521 #ifndef GL_MAX_SERVER_WAIT_TIMEOUT
522 # define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
524 #ifndef GL_MAX_TEXTURE_BUFFER_SIZE
525 # define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
527 #ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
528 # define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
530 #ifndef GL_MAX_TRANSFORM_FEEDBACK_BUFFERS
531 #define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
533 #ifndef GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS
534 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
536 #ifndef GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS
537 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
539 #ifndef GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS
540 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
542 #ifndef GL_MAX_VARYING_VECTORS
543 # define GL_MAX_VARYING_VECTORS 0x8DFC
545 #ifndef GL_MAX_VERTEX_UNIFORM_COMPONENTS
546 # define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
548 #ifndef GL_MAX_VERTEX_UNIFORM_VECTORS
549 # define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
551 #ifndef GL_MEDIUM_FLOAT
552 # define GL_MEDIUM_FLOAT 0x8DF1
554 #ifndef GL_MEDIUM_INT
555 # define GL_MEDIUM_INT 0x8DF4
557 #ifndef GL_MULTISAMPLE
558 # define GL_MULTISAMPLE 0x809D
560 #ifndef GL_NUM_EXTENSIONS
561 # define GL_NUM_EXTENSIONS 0x821D
563 #ifndef GL_NUM_SHADER_BINARY_FORMATS
564 # define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
566 #ifndef GL_OBJECT_TYPE
567 # define GL_OBJECT_TYPE 0x9112
569 #ifndef GL_PALETTE4_R5_G6_B5_OES
570 # define GL_PALETTE4_R5_G6_B5_OES 0x8B92
572 #ifndef GL_PALETTE4_RGB5_A1_OES
573 # define GL_PALETTE4_RGB5_A1_OES 0x8B94
575 #ifndef GL_PALETTE4_RGB8_OES
576 # define GL_PALETTE4_RGB8_OES 0x8B90
578 #ifndef GL_PALETTE4_RGBA4_OES
579 # define GL_PALETTE4_RGBA4_OES 0x8B93
581 #ifndef GL_PALETTE4_RGBA8_OES
582 # define GL_PALETTE4_RGBA8_OES 0x8B91
584 #ifndef GL_PALETTE8_R5_G6_B5_OES
585 # define GL_PALETTE8_R5_G6_B5_OES 0x8B97
587 #ifndef GL_PALETTE8_RGB5_A1_OES
588 # define GL_PALETTE8_RGB5_A1_OES 0x8B99
590 #ifndef GL_PALETTE8_RGB8_OES
591 # define GL_PALETTE8_RGB8_OES 0x8B95
593 #ifndef GL_PALETTE8_RGBA4_OES
594 # define GL_PALETTE8_RGBA4_OES 0x8B98
596 #ifndef GL_PALETTE8_RGBA8_OES
597 # define GL_PALETTE8_RGBA8_OES 0x8B96
599 #ifndef GL_PIXEL_PACK_BUFFER
600 # define GL_PIXEL_PACK_BUFFER 0x88EB
602 #ifndef GL_PIXEL_UNPACK_BUFFER
603 # define GL_PIXEL_UNPACK_BUFFER 0x88EC
605 #ifndef GL_PIXEL_PACK_BUFFER_BINDING
606 # define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
608 #ifndef GL_PIXEL_UNPACK_BUFFER_BINDING
609 # define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
611 #ifndef GL_POINT_SIZE
612 # define GL_POINT_SIZE 0x0B11
614 #ifndef GL_POINT_SIZE_RANGE
615 #define GL_POINT_SIZE_RANGE 0x0B12
617 #ifndef GL_POINT_SPRITE
618 # define GL_POINT_SPRITE 0x8861
620 #ifndef GL_PRIMITIVES_GENERATED
621 #define GL_PRIMITIVES_GENERATED 0x8C87
623 #ifndef GL_PROGRAM_OBJECT
624 # define GL_PROGRAM_OBJECT 0x8B40
626 #ifndef GL_PROGRAM_PIPELINE
627 # define GL_PROGRAM_PIPELINE 0x82E4
629 #ifndef GL_PROGRAM_PIPELINE_OBJECT
630 # define GL_PROGRAM_PIPELINE_OBJECT 0x8A4F
632 #ifndef GL_PROGRAM_POINT_SIZE
633 # define GL_PROGRAM_POINT_SIZE 0x8642
636 # define GL_QUERY 0x82E3
638 #ifndef GL_QUERY_COUNTER_BITS_EXT
639 # define GL_QUERY_COUNTER_BITS_EXT 0x8864
641 #ifndef GL_QUERY_OBJECT
642 # define GL_QUERY_OBJECT 0x9153
644 #ifndef GL_QUERY_RESULT_AVAILABLE_EXT
645 # define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
647 #ifndef GL_QUERY_RESULT_EXT
648 # define GL_QUERY_RESULT_EXT 0x8866
650 #ifndef GL_R11F_G11F_B10F
651 # define GL_R11F_G11F_B10F 0x8C3A
654 # define GL_R16F 0x822D
657 # define GL_R16I 0x8233
660 # define GL_R16UI 0x8234
663 # define GL_R32F 0x822E
666 # define GL_R32I 0x8235
669 # define GL_R32UI 0x8236
672 # define GL_R8 0x8229
675 # define GL_R8I 0x8231
678 # define GL_R8UI 0x8232
681 # define GL_R8_SNORM 0x8F94
683 #ifndef GL_RASTERIZER_DISCARD
684 #define GL_RASTERIZER_DISCARD 0x8C89
686 #ifndef GL_READ_BUFFER
687 # define GL_READ_BUFFER 0x0C02
689 #ifndef GL_READ_FRAMEBUFFER
690 # define GL_READ_FRAMEBUFFER 0x8CA8
692 #ifndef GL_READ_FRAMEBUFFER_BINDING
693 # define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
696 # define GL_READ_ONLY 0x88B8
698 #ifndef GL_READ_WRITE
699 # define GL_READ_WRITE 0x88BA
702 # define GL_RED 0x1903
705 # define GL_RED_BITS 0x0D52
707 #ifndef GL_RED_INTEGER
708 # define GL_RED_INTEGER 0x8D94
710 #ifndef GL_RENDERBUFFER
711 # define GL_RENDERBUFFER 0x8D41
713 #ifndef GL_RENDERBUFFER_ALPHA_SIZE
714 # define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
716 #ifndef GL_RENDERBUFFER_BINDING
717 # define GL_RENDERBUFFER_BINDING 0x8CA7
719 #ifndef GL_RENDERBUFFER_BLUE_SIZE
720 # define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
722 #ifndef GL_RENDERBUFFER_DEPTH_SIZE
723 # define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
725 #ifndef GL_RENDERBUFFER_GREEN_SIZE
726 # define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
728 #ifndef GL_RENDERBUFFER_HEIGHT
729 # define GL_RENDERBUFFER_HEIGHT 0x8D43
731 #ifndef GL_RENDERBUFFER_INTERNAL_FORMAT
732 # define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
734 #ifndef GL_RENDERBUFFER_RED_SIZE
735 # define GL_RENDERBUFFER_RED_SIZE 0x8D50
737 #ifndef GL_RENDERBUFFER_STENCIL_SIZE
738 # define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
740 #ifndef GL_RENDERBUFFER_WIDTH
741 # define GL_RENDERBUFFER_WIDTH 0x8D42
744 # define GL_RG 0x8227
747 # define GL_RG16F 0x822F
750 # define GL_RG16I 0x8239
753 # define GL_RG16UI 0x823A
756 # define GL_RG32F 0x8230
759 # define GL_RG32I 0x823B
762 # define GL_RG32UI 0x823C
765 # define GL_RG8 0x822B
768 # define GL_RG8I 0x8237
771 # define GL_RG8UI 0x8238
774 # define GL_RG8_SNORM 0x8F95
777 # define GL_RGB10_A2 0x8059
779 #ifndef GL_RGB10_A2UI
780 # define GL_RGB10_A2UI 0x906F
783 # define GL_RGB16F 0x881B
786 # define GL_RGB16I 0x8D89
789 # define GL_RGB16UI 0x8D77
792 # define GL_RGB32F 0x8815
795 # define GL_RGB32I 0x8D83
798 # define GL_RGB32UI 0x8D71
801 # define GL_RGB8 0x8051
804 # define GL_RGB8I 0x8D8F
807 # define GL_RGB8UI 0x8D7D
809 #ifndef GL_RGB8_SNORM
810 # define GL_RGB8_SNORM 0x8F96
813 # define GL_RGB9_E5 0x8C3D
816 # define GL_RGB565 0x8D62
819 # define GL_RGBA16F 0x881A
822 # define GL_RGBA16I 0x8D88
825 # define GL_RGBA16UI 0x8D76
828 # define GL_RGBA32F 0x8814
831 # define GL_RGBA32I 0x8D82
834 # define GL_RGBA32UI 0x8D70
837 # define GL_RGBA8 0x8058
840 # define GL_RGBA8I 0x8D8E
843 # define GL_RGBA8UI 0x8D7C
845 #ifndef GL_RGBA8_SNORM
846 # define GL_RGBA8_SNORM 0x8F97
848 #ifndef GL_RGBA_INTEGER
849 # define GL_RGBA_INTEGER 0x8D99
851 #ifndef GL_RGB_INTEGER
852 # define GL_RGB_INTEGER 0x8D98
854 #ifndef GL_RG_INTEGER
855 # define GL_RG_INTEGER 0x8228
858 # define GL_RIGHT 0x0407
860 #ifndef GL_SAMPLE_POSITION
861 # define GL_SAMPLE_POSITION 0x8E50
863 #ifndef GL_SAMPLE_MASK_VALUE
864 # define GL_SAMPLE_MASK_VALUE 0x8E52
867 # define GL_SAMPLER 0x82E6
869 #ifndef GL_SAMPLER_1D
870 # define GL_SAMPLER_1D 0x8B5D
872 #ifndef GL_SAMPLER_1D_ARRAY
873 # define GL_SAMPLER_1D_ARRAY 0x8DC0
875 #ifndef GL_SAMPLER_1D_ARRAY_SHADOW
876 # define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
878 #ifndef GL_SAMPLER_1D_SHADOW
879 # define GL_SAMPLER_1D_SHADOW 0x8B61
881 #ifndef GL_SAMPLER_2D_ARRAY
882 # define GL_SAMPLER_2D_ARRAY 0x8DC1
884 #ifndef GL_SAMPLER_2D_ARRAY_SHADOW
885 # define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
887 #ifndef GL_SAMPLER_2D_MULTISAMPLE
888 # define GL_SAMPLER_2D_MULTISAMPLE 0x9108
890 #ifndef GL_SAMPLER_2D_MULTISAMPLE_ARRAY
891 # define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
893 #ifndef GL_SAMPLER_2D_SHADOW
894 # define GL_SAMPLER_2D_SHADOW 0x8B62
896 #ifndef GL_SAMPLER_3D
897 # define GL_SAMPLER_3D 0x8B5F
899 #ifndef GL_SAMPLER_BINDING
900 # define GL_SAMPLER_BINDING 0x8919
902 #ifndef GL_SAMPLER_CUBE_MAP_ARRAY
903 # define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
905 #ifndef GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW
906 # define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
908 #ifndef GL_SAMPLER_CUBE_SHADOW
909 # define GL_SAMPLER_CUBE_SHADOW 0x8DC5
911 #ifndef GL_SAMPLER_EXTERNAL_OES
912 # define GL_SAMPLER_EXTERNAL_OES 0x8D66
914 #ifndef GL_SEPARATE_ATTRIBS
915 #define GL_SEPARATE_ATTRIBS 0x8C8D
917 #ifndef GL_SHADER_BINARY_FORMATS
918 # define GL_SHADER_BINARY_FORMATS 0x8DF8
920 #ifndef GL_SHADER_COMPILER
921 # define GL_SHADER_COMPILER 0x8DFA
923 #ifndef GL_SHADER_OBJECT
924 # define GL_SHADER_OBJECT 0x8B48
927 # define GL_SIGNALED 0x9119
930 # define GL_SRGB8 0x8C41
932 #ifndef GL_SRGB8_ALPHA8
933 # define GL_SRGB8_ALPHA8 0x8C43
936 # define GL_STENCIL 0x1802
938 #ifndef GL_STENCIL_ATTACHMENT
939 # define GL_STENCIL_ATTACHMENT 0x8D20
941 #ifndef GL_STENCIL_BITS
942 # define GL_STENCIL_BITS 0x0D57
944 #ifndef GL_STENCIL_BUFFER_BIT
945 # define GL_STENCIL_BUFFER_BIT 0x00000400
947 #ifndef GL_STENCIL_INDEX8
948 # define GL_STENCIL_INDEX8 0x8D48
950 #ifndef GL_SYNC_CONDITION
951 # define GL_SYNC_CONDITION 0x9113
953 #ifndef GL_SYNC_FENCE
954 # define GL_SYNC_FENCE 0x9116
956 #ifndef GL_SYNC_FLAGS
957 # define GL_SYNC_FLAGS 0x9115
959 #ifndef GL_SYNC_FLUSH_COMMANDS_BIT
960 # define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
962 #ifndef GL_SYNC_GPU_COMMANDS_COMPLETE
963 # define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
965 #ifndef GL_SYNC_STATUS
966 # define GL_SYNC_STATUS 0x9114
968 #ifndef GL_TEXTURE_1D_ARRAY
969 # define GL_TEXTURE_1D_ARRAY 0x8C18
971 #ifndef GL_TEXTURE_2D_ARRAY
972 # define GL_TEXTURE_2D_ARRAY 0x8C1A
974 #ifndef GL_TEXTURE_2D_MULTISAMPLE
975 # define GL_TEXTURE_2D_MULTISAMPLE 0x9100
977 #ifndef GL_TEXTURE_2D_MULTISAMPLE_ARRAY
978 # define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
980 #ifndef GL_TEXTURE_3D
981 # define GL_TEXTURE_3D 0x806F
983 #ifndef GL_TEXTURE_BASE_LEVEL
984 # define GL_TEXTURE_BASE_LEVEL 0x813C
986 #ifndef GL_TEXTURE_BINDING_1D_ARRAY
987 # define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
989 #ifndef GL_TEXTURE_BINDING_2D_ARRAY
990 # define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
992 #ifndef GL_TEXTURE_BINDING_2D_MULTISAMPLE
993 # define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
995 #ifndef GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY
996 # define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
998 #ifndef GL_TEXTURE_BINDING_3D
999 # define GL_TEXTURE_BINDING_3D 0x806A
1001 #ifndef GL_TEXTURE_BINDING_BUFFER
1002 # define GL_TEXTURE_BINDING_BUFFER 0x8C2C
1004 #ifndef GL_TEXTURE_BINDING_CUBE_MAP_ARRAY
1005 # define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
1007 #ifndef GL_TEXTURE_BINDING_EXTERNAL_OES
1008 # define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
1010 #ifndef GL_TEXTURE_BUFFER
1011 # define GL_TEXTURE_BUFFER 0x8C2A
1013 #ifndef GL_TEXTURE_BUFFER_DATA_STORE_BINDING
1014 # define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
1016 #ifndef GL_TEXTURE_BUFFER_FORMAT
1017 # define GL_TEXTURE_BUFFER_FORMAT 0x8C2E
1019 #ifndef GL_TEXTURE_COMPARE_FUNC
1020 # define GL_TEXTURE_COMPARE_FUNC 0x884D
1022 #ifndef GL_TEXTURE_COMPARE_MODE
1023 # define GL_TEXTURE_COMPARE_MODE 0x884C
1025 #ifndef GL_TEXTURE_CUBE_MAP_ARRAY
1026 # define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
1028 #ifndef GL_TEXTURE_EXTERNAL_OES
1029 # define GL_TEXTURE_EXTERNAL_OES 0x8D65
1031 #ifndef GL_TEXTURE_FIXED_SAMPLE_LOCATIONS
1032 # define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
1034 #ifndef GL_TEXTURE_IMMUTABLE_FORMAT
1035 # define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
1037 #ifndef GL_TEXTURE_MAX_ANISOTROPY_EXT
1038 # define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
1040 #ifndef GL_TEXTURE_MAX_LEVEL
1041 # define GL_TEXTURE_MAX_LEVEL 0x813D
1043 #ifndef GL_TEXTURE_MAX_LOD
1044 # define GL_TEXTURE_MAX_LOD 0x813B
1046 #ifndef GL_TEXTURE_MIN_LOD
1047 # define GL_TEXTURE_MIN_LOD 0x813A
1049 #ifndef GL_TEXTURE_SAMPLES
1050 # define GL_TEXTURE_SAMPLES 0x9106
1052 #ifndef GL_TEXTURE_SWIZZLE_R
1053 # define GL_TEXTURE_SWIZZLE_R 0x8E42
1055 #ifndef GL_TEXTURE_SWIZZLE_G
1056 # define GL_TEXTURE_SWIZZLE_G 0x8E43
1058 #ifndef GL_TEXTURE_SWIZZLE_B
1059 # define GL_TEXTURE_SWIZZLE_B 0x8E44
1061 #ifndef GL_TEXTURE_SWIZZLE_A
1062 # define GL_TEXTURE_SWIZZLE_A 0x8E45
1064 #ifndef GL_TEXTURE_WRAP_R
1065 # define GL_TEXTURE_WRAP_R 0x8072
1067 #ifndef GL_TIMEOUT_EXPIRED
1068 # define GL_TIMEOUT_EXPIRED 0x911B
1070 #ifndef GL_TIMEOUT_IGNORED
1071 # define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF
1073 #ifndef GL_TIMESTAMP_EXT
1074 # define GL_TIMESTAMP_EXT 0x8E28
1076 #ifndef GL_TIME_ELAPSED_EXT
1077 # define GL_TIME_ELAPSED_EXT 0x88BF
1079 #ifndef GL_TRANSFORM_FEEDBACK
1080 # define GL_TRANSFORM_FEEDBACK 0x8E22
1082 #ifndef GL_TRANSFORM_FEEDBACK_ACTIVE
1083 #define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
1085 #ifndef GL_TRANSFORM_FEEDBACK_BINDING
1086 #define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
1088 #ifndef GL_TRANSFORM_FEEDBACK_BUFFER
1089 #define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
1091 #ifndef GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE
1092 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
1094 #ifndef GL_TRANSFORM_FEEDBACK_BUFFER_BINDING
1095 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
1097 #ifndef GL_TRANSFORM_FEEDBACK_BUFFER_MODE
1098 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
1100 #ifndef GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED
1101 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
1103 #ifndef GL_TRANSFORM_FEEDBACK_BUFFER_SIZE
1104 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
1106 #ifndef GL_TRANSFORM_FEEDBACK_BUFFER_START
1107 #define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
1109 #ifndef GL_TRANSFORM_FEEDBACK_PAUSED
1110 #define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
1112 #ifndef GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
1113 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
1115 #ifndef GL_TRANSFORM_FEEDBACK_VARYINGS
1116 #define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
1118 #ifndef GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH
1119 #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
1121 #ifndef GL_UNSIGNALED
1122 # define GL_UNSIGNALED 0x9118
1124 #ifndef GL_UNSIGNED_INT_10F_11F_11F_REV
1125 # define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
1127 #ifndef GL_UNSIGNED_INT_24_8
1128 # define GL_UNSIGNED_INT_24_8 0x84FA
1130 #ifndef GL_UNSIGNED_INT_2_10_10_10_REV
1131 # define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
1133 #ifndef GL_UNSIGNED_INT_5_9_9_9_REV
1134 # define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
1136 #ifndef GL_UNSIGNED_INT_SAMPLER_1D
1137 # define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
1139 #ifndef GL_UNSIGNED_INT_SAMPLER_2D
1140 # define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
1142 #ifndef GL_UNSIGNED_INT_SAMPLER_3D
1143 # define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
1145 #ifndef GL_UNSIGNED_INT_SAMPLER_CUBE
1146 # define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
1148 #ifndef GL_UNSIGNED_INT_SAMPLER_1D_ARRAY
1149 # define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
1151 #ifndef GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
1152 # define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
1154 #ifndef GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY
1155 # define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
1157 #ifndef GL_UNSIGNED_INT_VEC2
1158 # define GL_UNSIGNED_INT_VEC2 0x8DC6
1160 #ifndef GL_UNSIGNED_INT_VEC3
1161 # define GL_UNSIGNED_INT_VEC3 0x8DC7
1163 #ifndef GL_UNSIGNED_INT_VEC4
1164 # define GL_UNSIGNED_INT_VEC4 0x8DC8
1166 #ifndef GL_VERTEX_ARRAY_BINDING
1167 # define GL_VERTEX_ARRAY_BINDING 0x85B5
1169 #ifndef GL_VERTEX_ARRAY_OBJECT
1170 # define GL_VERTEX_ARRAY_OBJECT 0x9154
1172 #ifndef GL_VERTEX_ATTRIB_ARRAY_DIVISOR
1173 # define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88fe
1175 #ifndef GL_WAIT_FAILED
1176 # define GL_WAIT_FAILED 0x911D
1178 #ifndef GL_WRITE_ONLY
1179 # define GL_WRITE_ONLY 0x88B9
1182 #endif // ION_PORTGFX_GLHEADERS_H_