Home | History | Annotate | Download | only in SDL2
      1 /*
      2   Simple DirectMedia Layer
      3   Copyright (C) 1997-2014 Sam Lantinga <slouken (at) libsdl.org>
      4 
      5   This software is provided 'as-is', without any express or implied
      6   warranty.  In no event will the authors be held liable for any damages
      7   arising from the use of this software.
      8 
      9   Permission is granted to anyone to use this software for any purpose,
     10   including commercial applications, and to alter it and redistribute it
     11   freely, subject to the following restrictions:
     12 
     13   1. The origin of this software must not be misrepresented; you must not
     14      claim that you wrote the original software. If you use this software
     15      in a product, an acknowledgment in the product documentation would be
     16      appreciated but is not required.
     17   2. Altered source versions must be plainly marked as such, and must not be
     18      misrepresented as being the original software.
     19   3. This notice may not be removed or altered from any source distribution.
     20 */
     21 
     22 /**
     23  *  \file SDL_opengles.h
     24  *
     25  *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
     26  */
     27 #ifndef _MSC_VER
     28 #ifdef __IPHONEOS__
     29 #include <OpenGLES/ES2/gl.h>
     30 #include <OpenGLES/ES2/glext.h>
     31 #else
     32 #include <GLES2/gl2.h>
     33 #include <GLES2/gl2ext.h>
     34 #endif
     35 
     36 #else /* _MSC_VER */
     37 
     38 /* OpenGL ES2 headers for Visual Studio */
     39 
     40 #ifndef __khrplatform_h_
     41 #define __khrplatform_h_
     42 
     43 /*
     44 ** Copyright (c) 2008-2009 The Khronos Group Inc.
     45 **
     46 ** Permission is hereby granted, free of charge, to any person obtaining a
     47 ** copy of this software and/or associated documentation files (the
     48 ** "Materials"), to deal in the Materials without restriction, including
     49 ** without limitation the rights to use, copy, modify, merge, publish,
     50 ** distribute, sublicense, and/or sell copies of the Materials, and to
     51 ** permit persons to whom the Materials are furnished to do so, subject to
     52 ** the following conditions:
     53 **
     54 ** The above copyright notice and this permission notice shall be included
     55 ** in all copies or substantial portions of the Materials.
     56 **
     57 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     58 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     59 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     60 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     61 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     62 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     63 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
     64 */
     65 
     66 /* Khronos platform-specific types and definitions.
     67 *
     68 * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
     69 *
     70 * Adopters may modify this file to suit their platform. Adopters are
     71 * encouraged to submit platform specific modifications to the Khronos
     72 * group so that they can be included in future versions of this file.
     73 * Please submit changes by sending them to the public Khronos Bugzilla
     74 * (http://khronos.org/bugzilla) by filing a bug against product
     75 * "Khronos (general)" component "Registry".
     76 *
     77 * A predefined template which fills in some of the bug fields can be
     78 * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
     79 * must create a Bugzilla login first.
     80 *
     81 *
     82 * See the Implementer's Guidelines for information about where this file
     83 * should be located on your system and for more details of its use:
     84 *    http://www.khronos.org/registry/implementers_guide.pdf
     85 *
     86 * This file should be included as
     87 *        #include <KHR/khrplatform.h>
     88 * by Khronos client API header files that use its types and defines.
     89 *
     90 * The types in khrplatform.h should only be used to define API-specific types.
     91 *
     92 * Types defined in khrplatform.h:
     93 *    khronos_int8_t              signed   8  bit
     94 *    khronos_uint8_t             unsigned 8  bit
     95 *    khronos_int16_t             signed   16 bit
     96 *    khronos_uint16_t            unsigned 16 bit
     97 *    khronos_int32_t             signed   32 bit
     98 *    khronos_uint32_t            unsigned 32 bit
     99 *    khronos_int64_t             signed   64 bit
    100 *    khronos_uint64_t            unsigned 64 bit
    101 *    khronos_intptr_t            signed   same number of bits as a pointer
    102 *    khronos_uintptr_t           unsigned same number of bits as a pointer
    103 *    khronos_ssize_t             signed   size
    104 *    khronos_usize_t             unsigned size
    105 *    khronos_float_t             signed   32 bit floating point
    106 *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds
    107 *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in
    108 *                                         nanoseconds
    109 *    khronos_stime_nanoseconds_t signed time interval in nanoseconds
    110 *    khronos_boolean_enum_t      enumerated boolean type. This should
    111 *      only be used as a base type when a client API's boolean type is
    112 *      an enum. Client APIs which use an integer or other type for
    113 *      booleans cannot use this as the base type for their boolean.
    114 *
    115 * Tokens defined in khrplatform.h:
    116 *
    117 *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
    118 *
    119 *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
    120 *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
    121 *
    122 * Calling convention macros defined in this file:
    123 *    KHRONOS_APICALL
    124 *    KHRONOS_APIENTRY
    125 *    KHRONOS_APIATTRIBUTES
    126 *
    127 * These may be used in function prototypes as:
    128 *
    129 *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
    130 *                                  int arg1,
    131 *                                  int arg2) KHRONOS_APIATTRIBUTES;
    132 */
    133 
    134 /*-------------------------------------------------------------------------
    135 * Definition of KHRONOS_APICALL
    136 *-------------------------------------------------------------------------
    137 * This precedes the return type of the function in the function prototype.
    138 */
    139 #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
    140 #   define KHRONOS_APICALL __declspec(dllimport)
    141 #elif defined (__SYMBIAN32__)
    142 #   define KHRONOS_APICALL IMPORT_C
    143 #else
    144 #   define KHRONOS_APICALL
    145 #endif
    146 
    147 /*-------------------------------------------------------------------------
    148 * Definition of KHRONOS_APIENTRY
    149 *-------------------------------------------------------------------------
    150 * This follows the return type of the function  and precedes the function
    151 * name in the function prototype.
    152 */
    153 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
    154 /* Win32 but not WinCE */
    155 #   define KHRONOS_APIENTRY __stdcall
    156 #else
    157 #   define KHRONOS_APIENTRY
    158 #endif
    159 
    160 /*-------------------------------------------------------------------------
    161 * Definition of KHRONOS_APIATTRIBUTES
    162 *-------------------------------------------------------------------------
    163 * This follows the closing parenthesis of the function prototype arguments.
    164 */
    165 #if defined (__ARMCC_2__)
    166 #define KHRONOS_APIATTRIBUTES __softfp
    167 #else
    168 #define KHRONOS_APIATTRIBUTES
    169 #endif
    170 
    171 /*-------------------------------------------------------------------------
    172 * basic type definitions
    173 *-----------------------------------------------------------------------*/
    174 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
    175 
    176 
    177 /*
    178 * Using <stdint.h>
    179 */
    180 #include <stdint.h>
    181 typedef int32_t                 khronos_int32_t;
    182 typedef uint32_t                khronos_uint32_t;
    183 typedef int64_t                 khronos_int64_t;
    184 typedef uint64_t                khronos_uint64_t;
    185 #define KHRONOS_SUPPORT_INT64   1
    186 #define KHRONOS_SUPPORT_FLOAT   1
    187 
    188 #elif defined(__VMS ) || defined(__sgi)
    189 
    190 /*
    191 * Using <inttypes.h>
    192 */
    193 #include <inttypes.h>
    194 typedef int32_t                 khronos_int32_t;
    195 typedef uint32_t                khronos_uint32_t;
    196 typedef int64_t                 khronos_int64_t;
    197 typedef uint64_t                khronos_uint64_t;
    198 #define KHRONOS_SUPPORT_INT64   1
    199 #define KHRONOS_SUPPORT_FLOAT   1
    200 
    201 #elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
    202 
    203 /*
    204 * Win32
    205 */
    206 typedef __int32                 khronos_int32_t;
    207 typedef unsigned __int32        khronos_uint32_t;
    208 typedef __int64                 khronos_int64_t;
    209 typedef unsigned __int64        khronos_uint64_t;
    210 #define KHRONOS_SUPPORT_INT64   1
    211 #define KHRONOS_SUPPORT_FLOAT   1
    212 
    213 #elif defined(__sun__) || defined(__digital__)
    214 
    215 /*
    216 * Sun or Digital
    217 */
    218 typedef int                     khronos_int32_t;
    219 typedef unsigned int            khronos_uint32_t;
    220 #if defined(__arch64__) || defined(_LP64)
    221 typedef long int                khronos_int64_t;
    222 typedef unsigned long int       khronos_uint64_t;
    223 #else
    224 typedef long long int           khronos_int64_t;
    225 typedef unsigned long long int  khronos_uint64_t;
    226 #endif /* __arch64__ */
    227 #define KHRONOS_SUPPORT_INT64   1
    228 #define KHRONOS_SUPPORT_FLOAT   1
    229 
    230 #elif 0
    231 
    232 /*
    233 * Hypothetical platform with no float or int64 support
    234 */
    235 typedef int                     khronos_int32_t;
    236 typedef unsigned int            khronos_uint32_t;
    237 #define KHRONOS_SUPPORT_INT64   0
    238 #define KHRONOS_SUPPORT_FLOAT   0
    239 
    240 #else
    241 
    242 /*
    243 * Generic fallback
    244 */
    245 #include <stdint.h>
    246 typedef int32_t                 khronos_int32_t;
    247 typedef uint32_t                khronos_uint32_t;
    248 typedef int64_t                 khronos_int64_t;
    249 typedef uint64_t                khronos_uint64_t;
    250 #define KHRONOS_SUPPORT_INT64   1
    251 #define KHRONOS_SUPPORT_FLOAT   1
    252 
    253 #endif
    254 
    255 
    256 /*
    257 * Types that are (so far) the same on all platforms
    258 */
    259 typedef signed   char          khronos_int8_t;
    260 typedef unsigned char          khronos_uint8_t;
    261 typedef signed   short int     khronos_int16_t;
    262 typedef unsigned short int     khronos_uint16_t;
    263 
    264 /*
    265 * Types that differ between LLP64 and LP64 architectures - in LLP64,
    266 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
    267 * to be the only LLP64 architecture in current use.
    268 */
    269 #ifdef _WIN64
    270 typedef signed   long long int khronos_intptr_t;
    271 typedef unsigned long long int khronos_uintptr_t;
    272 typedef signed   long long int khronos_ssize_t;
    273 typedef unsigned long long int khronos_usize_t;
    274 #else
    275 typedef signed   long  int     khronos_intptr_t;
    276 typedef unsigned long  int     khronos_uintptr_t;
    277 typedef signed   long  int     khronos_ssize_t;
    278 typedef unsigned long  int     khronos_usize_t;
    279 #endif
    280 
    281 #if KHRONOS_SUPPORT_FLOAT
    282 /*
    283 * Float type
    284 */
    285 typedef          float         khronos_float_t;
    286 #endif
    287 
    288 #if KHRONOS_SUPPORT_INT64
    289 /* Time types
    290 *
    291 * These types can be used to represent a time interval in nanoseconds or
    292 * an absolute Unadjusted System Time.  Unadjusted System Time is the number
    293 * of nanoseconds since some arbitrary system event (e.g. since the last
    294 * time the system booted).  The Unadjusted System Time is an unsigned
    295 * 64 bit value that wraps back to 0 every 584 years.  Time intervals
    296 * may be either signed or unsigned.
    297 */
    298 typedef khronos_uint64_t       khronos_utime_nanoseconds_t;
    299 typedef khronos_int64_t        khronos_stime_nanoseconds_t;
    300 #endif
    301 
    302 /*
    303 * Dummy value used to pad enum types to 32 bits.
    304 */
    305 #ifndef KHRONOS_MAX_ENUM
    306 #define KHRONOS_MAX_ENUM 0x7FFFFFFF
    307 #endif
    308 
    309 /*
    310 * Enumerated boolean type
    311 *
    312 * Values other than zero should be considered to be true.  Therefore
    313 * comparisons should not be made against KHRONOS_TRUE.
    314 */
    315 typedef enum {
    316     KHRONOS_FALSE = 0,
    317     KHRONOS_TRUE = 1,
    318     KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
    319 } khronos_boolean_enum_t;
    320 
    321 #endif /* __khrplatform_h_ */
    322 
    323 
    324 #ifndef __gl2platform_h_
    325 #define __gl2platform_h_
    326 
    327 /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
    328 
    329 /*
    330  * This document is licensed under the SGI Free Software B License Version
    331  * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
    332  */
    333 
    334 /* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h
    335  *
    336  * Adopters may modify khrplatform.h and this file to suit their platform.
    337  * You are encouraged to submit all modifications to the Khronos group so that
    338  * they can be included in future versions of this file.  Please submit changes
    339  * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
    340  * by filing a bug against product "OpenGL-ES" component "Registry".
    341  */
    342 
    343 /*#include <KHR/khrplatform.h>*/
    344 
    345 #ifndef GL_APICALL
    346 #define GL_APICALL  KHRONOS_APICALL
    347 #endif
    348 
    349 #ifndef GL_APIENTRY
    350 #define GL_APIENTRY KHRONOS_APIENTRY
    351 #endif
    352 
    353 #endif /* __gl2platform_h_ */
    354 
    355 #ifndef __gl2_h_
    356 #define __gl2_h_
    357 
    358 /* $Revision: 16803 $ on $Date:: 2012-02-02 09:49:18 -0800 #$ */
    359 
    360 /*#include <GLES2/gl2platform.h>*/
    361 
    362 #ifdef __cplusplus
    363 extern "C" {
    364 #endif
    365 
    366 /*
    367  * This document is licensed under the SGI Free Software B License Version
    368  * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
    369  */
    370 
    371 /*-------------------------------------------------------------------------
    372  * Data type definitions
    373  *-----------------------------------------------------------------------*/
    374 
    375 typedef void             GLvoid;
    376 typedef char             GLchar;
    377 typedef unsigned int     GLenum;
    378 typedef unsigned char    GLboolean;
    379 typedef unsigned int     GLbitfield;
    380 typedef khronos_int8_t   GLbyte;
    381 typedef short            GLshort;
    382 typedef int              GLint;
    383 typedef int              GLsizei;
    384 typedef khronos_uint8_t  GLubyte;
    385 typedef unsigned short   GLushort;
    386 typedef unsigned int     GLuint;
    387 typedef khronos_float_t  GLfloat;
    388 typedef khronos_float_t  GLclampf;
    389 typedef khronos_int32_t  GLfixed;
    390 
    391 /* GL types for handling large vertex buffer objects */
    392 typedef khronos_intptr_t GLintptr;
    393 typedef khronos_ssize_t  GLsizeiptr;
    394 
    395 /* OpenGL ES core versions */
    396 #define GL_ES_VERSION_2_0                 1
    397 
    398 /* ClearBufferMask */
    399 #define GL_DEPTH_BUFFER_BIT               0x00000100
    400 #define GL_STENCIL_BUFFER_BIT             0x00000400
    401 #define GL_COLOR_BUFFER_BIT               0x00004000
    402 
    403 /* Boolean */
    404 #define GL_FALSE                          0
    405 #define GL_TRUE                           1
    406 
    407 /* BeginMode */
    408 #define GL_POINTS                         0x0000
    409 #define GL_LINES                          0x0001
    410 #define GL_LINE_LOOP                      0x0002
    411 #define GL_LINE_STRIP                     0x0003
    412 #define GL_TRIANGLES                      0x0004
    413 #define GL_TRIANGLE_STRIP                 0x0005
    414 #define GL_TRIANGLE_FAN                   0x0006
    415 
    416 /* AlphaFunction (not supported in ES20) */
    417 /*      GL_NEVER */
    418 /*      GL_LESS */
    419 /*      GL_EQUAL */
    420 /*      GL_LEQUAL */
    421 /*      GL_GREATER */
    422 /*      GL_NOTEQUAL */
    423 /*      GL_GEQUAL */
    424 /*      GL_ALWAYS */
    425 
    426 /* BlendingFactorDest */
    427 #define GL_ZERO                           0
    428 #define GL_ONE                            1
    429 #define GL_SRC_COLOR                      0x0300
    430 #define GL_ONE_MINUS_SRC_COLOR            0x0301
    431 #define GL_SRC_ALPHA                      0x0302
    432 #define GL_ONE_MINUS_SRC_ALPHA            0x0303
    433 #define GL_DST_ALPHA                      0x0304
    434 #define GL_ONE_MINUS_DST_ALPHA            0x0305
    435 
    436 /* BlendingFactorSrc */
    437 /*      GL_ZERO */
    438 /*      GL_ONE */
    439 #define GL_DST_COLOR                      0x0306
    440 #define GL_ONE_MINUS_DST_COLOR            0x0307
    441 #define GL_SRC_ALPHA_SATURATE             0x0308
    442 /*      GL_SRC_ALPHA */
    443 /*      GL_ONE_MINUS_SRC_ALPHA */
    444 /*      GL_DST_ALPHA */
    445 /*      GL_ONE_MINUS_DST_ALPHA */
    446 
    447 /* BlendEquationSeparate */
    448 #define GL_FUNC_ADD                       0x8006
    449 #define GL_BLEND_EQUATION                 0x8009
    450 #define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */
    451 #define GL_BLEND_EQUATION_ALPHA           0x883D
    452 
    453 /* BlendSubtract */
    454 #define GL_FUNC_SUBTRACT                  0x800A
    455 #define GL_FUNC_REVERSE_SUBTRACT          0x800B
    456 
    457 /* Separate Blend Functions */
    458 #define GL_BLEND_DST_RGB                  0x80C8
    459 #define GL_BLEND_SRC_RGB                  0x80C9
    460 #define GL_BLEND_DST_ALPHA                0x80CA
    461 #define GL_BLEND_SRC_ALPHA                0x80CB
    462 #define GL_CONSTANT_COLOR                 0x8001
    463 #define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
    464 #define GL_CONSTANT_ALPHA                 0x8003
    465 #define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
    466 #define GL_BLEND_COLOR                    0x8005
    467 
    468 /* Buffer Objects */
    469 #define GL_ARRAY_BUFFER                   0x8892
    470 #define GL_ELEMENT_ARRAY_BUFFER           0x8893
    471 #define GL_ARRAY_BUFFER_BINDING           0x8894
    472 #define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
    473 
    474 #define GL_STREAM_DRAW                    0x88E0
    475 #define GL_STATIC_DRAW                    0x88E4
    476 #define GL_DYNAMIC_DRAW                   0x88E8
    477 
    478 #define GL_BUFFER_SIZE                    0x8764
    479 #define GL_BUFFER_USAGE                   0x8765
    480 
    481 #define GL_CURRENT_VERTEX_ATTRIB          0x8626
    482 
    483 /* CullFaceMode */
    484 #define GL_FRONT                          0x0404
    485 #define GL_BACK                           0x0405
    486 #define GL_FRONT_AND_BACK                 0x0408
    487 
    488 /* DepthFunction */
    489 /*      GL_NEVER */
    490 /*      GL_LESS */
    491 /*      GL_EQUAL */
    492 /*      GL_LEQUAL */
    493 /*      GL_GREATER */
    494 /*      GL_NOTEQUAL */
    495 /*      GL_GEQUAL */
    496 /*      GL_ALWAYS */
    497 
    498 /* EnableCap */
    499 #define GL_TEXTURE_2D                     0x0DE1
    500 #define GL_CULL_FACE                      0x0B44
    501 #define GL_BLEND                          0x0BE2
    502 #define GL_DITHER                         0x0BD0
    503 #define GL_STENCIL_TEST                   0x0B90
    504 #define GL_DEPTH_TEST                     0x0B71
    505 #define GL_SCISSOR_TEST                   0x0C11
    506 #define GL_POLYGON_OFFSET_FILL            0x8037
    507 #define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
    508 #define GL_SAMPLE_COVERAGE                0x80A0
    509 
    510 /* ErrorCode */
    511 #define GL_NO_ERROR                       0
    512 #define GL_INVALID_ENUM                   0x0500
    513 #define GL_INVALID_VALUE                  0x0501
    514 #define GL_INVALID_OPERATION              0x0502
    515 #define GL_OUT_OF_MEMORY                  0x0505
    516 
    517 /* FrontFaceDirection */
    518 #define GL_CW                             0x0900
    519 #define GL_CCW                            0x0901
    520 
    521 /* GetPName */
    522 #define GL_LINE_WIDTH                     0x0B21
    523 #define GL_ALIASED_POINT_SIZE_RANGE       0x846D
    524 #define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
    525 #define GL_CULL_FACE_MODE                 0x0B45
    526 #define GL_FRONT_FACE                     0x0B46
    527 #define GL_DEPTH_RANGE                    0x0B70
    528 #define GL_DEPTH_WRITEMASK                0x0B72
    529 #define GL_DEPTH_CLEAR_VALUE              0x0B73
    530 #define GL_DEPTH_FUNC                     0x0B74
    531 #define GL_STENCIL_CLEAR_VALUE            0x0B91
    532 #define GL_STENCIL_FUNC                   0x0B92
    533 #define GL_STENCIL_FAIL                   0x0B94
    534 #define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
    535 #define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
    536 #define GL_STENCIL_REF                    0x0B97
    537 #define GL_STENCIL_VALUE_MASK             0x0B93
    538 #define GL_STENCIL_WRITEMASK              0x0B98
    539 #define GL_STENCIL_BACK_FUNC              0x8800
    540 #define GL_STENCIL_BACK_FAIL              0x8801
    541 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
    542 #define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
    543 #define GL_STENCIL_BACK_REF               0x8CA3
    544 #define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
    545 #define GL_STENCIL_BACK_WRITEMASK         0x8CA5
    546 #define GL_VIEWPORT                       0x0BA2
    547 #define GL_SCISSOR_BOX                    0x0C10
    548 /*      GL_SCISSOR_TEST */
    549 #define GL_COLOR_CLEAR_VALUE              0x0C22
    550 #define GL_COLOR_WRITEMASK                0x0C23
    551 #define GL_UNPACK_ALIGNMENT               0x0CF5
    552 #define GL_PACK_ALIGNMENT                 0x0D05
    553 #define GL_MAX_TEXTURE_SIZE               0x0D33
    554 #define GL_MAX_VIEWPORT_DIMS              0x0D3A
    555 #define GL_SUBPIXEL_BITS                  0x0D50
    556 #define GL_RED_BITS                       0x0D52
    557 #define GL_GREEN_BITS                     0x0D53
    558 #define GL_BLUE_BITS                      0x0D54
    559 #define GL_ALPHA_BITS                     0x0D55
    560 #define GL_DEPTH_BITS                     0x0D56
    561 #define GL_STENCIL_BITS                   0x0D57
    562 #define GL_POLYGON_OFFSET_UNITS           0x2A00
    563 /*      GL_POLYGON_OFFSET_FILL */
    564 #define GL_POLYGON_OFFSET_FACTOR          0x8038
    565 #define GL_TEXTURE_BINDING_2D             0x8069
    566 #define GL_SAMPLE_BUFFERS                 0x80A8
    567 #define GL_SAMPLES                        0x80A9
    568 #define GL_SAMPLE_COVERAGE_VALUE          0x80AA
    569 #define GL_SAMPLE_COVERAGE_INVERT         0x80AB
    570 
    571 /* GetTextureParameter */
    572 /*      GL_TEXTURE_MAG_FILTER */
    573 /*      GL_TEXTURE_MIN_FILTER */
    574 /*      GL_TEXTURE_WRAP_S */
    575 /*      GL_TEXTURE_WRAP_T */
    576 
    577 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
    578 #define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
    579 
    580 /* HintMode */
    581 #define GL_DONT_CARE                      0x1100
    582 #define GL_FASTEST                        0x1101
    583 #define GL_NICEST                         0x1102
    584 
    585 /* HintTarget */
    586 #define GL_GENERATE_MIPMAP_HINT            0x8192
    587 
    588 /* DataType */
    589 #define GL_BYTE                           0x1400
    590 #define GL_UNSIGNED_BYTE                  0x1401
    591 #define GL_SHORT                          0x1402
    592 #define GL_UNSIGNED_SHORT                 0x1403
    593 #define GL_INT                            0x1404
    594 #define GL_UNSIGNED_INT                   0x1405
    595 #define GL_FLOAT                          0x1406
    596 #define GL_FIXED                          0x140C
    597 
    598 /* PixelFormat */
    599 #define GL_DEPTH_COMPONENT                0x1902
    600 #define GL_ALPHA                          0x1906
    601 #define GL_RGB                            0x1907
    602 #define GL_RGBA                           0x1908
    603 #define GL_LUMINANCE                      0x1909
    604 #define GL_LUMINANCE_ALPHA                0x190A
    605 
    606 /* PixelType */
    607 /*      GL_UNSIGNED_BYTE */
    608 #define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
    609 #define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
    610 #define GL_UNSIGNED_SHORT_5_6_5           0x8363
    611 
    612 /* Shaders */
    613 #define GL_FRAGMENT_SHADER                  0x8B30
    614 #define GL_VERTEX_SHADER                    0x8B31
    615 #define GL_MAX_VERTEX_ATTRIBS               0x8869
    616 #define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
    617 #define GL_MAX_VARYING_VECTORS              0x8DFC
    618 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
    619 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
    620 #define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
    621 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
    622 #define GL_SHADER_TYPE                      0x8B4F
    623 #define GL_DELETE_STATUS                    0x8B80
    624 #define GL_LINK_STATUS                      0x8B82
    625 #define GL_VALIDATE_STATUS                  0x8B83
    626 #define GL_ATTACHED_SHADERS                 0x8B85
    627 #define GL_ACTIVE_UNIFORMS                  0x8B86
    628 #define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
    629 #define GL_ACTIVE_ATTRIBUTES                0x8B89
    630 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
    631 #define GL_SHADING_LANGUAGE_VERSION         0x8B8C
    632 #define GL_CURRENT_PROGRAM                  0x8B8D
    633 
    634 /* StencilFunction */
    635 #define GL_NEVER                          0x0200
    636 #define GL_LESS                           0x0201
    637 #define GL_EQUAL                          0x0202
    638 #define GL_LEQUAL                         0x0203
    639 #define GL_GREATER                        0x0204
    640 #define GL_NOTEQUAL                       0x0205
    641 #define GL_GEQUAL                         0x0206
    642 #define GL_ALWAYS                         0x0207
    643 
    644 /* StencilOp */
    645 /*      GL_ZERO */
    646 #define GL_KEEP                           0x1E00
    647 #define GL_REPLACE                        0x1E01
    648 #define GL_INCR                           0x1E02
    649 #define GL_DECR                           0x1E03
    650 #define GL_INVERT                         0x150A
    651 #define GL_INCR_WRAP                      0x8507
    652 #define GL_DECR_WRAP                      0x8508
    653 
    654 /* StringName */
    655 #define GL_VENDOR                         0x1F00
    656 #define GL_RENDERER                       0x1F01
    657 #define GL_VERSION                        0x1F02
    658 #define GL_EXTENSIONS                     0x1F03
    659 
    660 /* TextureMagFilter */
    661 #define GL_NEAREST                        0x2600
    662 #define GL_LINEAR                         0x2601
    663 
    664 /* TextureMinFilter */
    665 /*      GL_NEAREST */
    666 /*      GL_LINEAR */
    667 #define GL_NEAREST_MIPMAP_NEAREST         0x2700
    668 #define GL_LINEAR_MIPMAP_NEAREST          0x2701
    669 #define GL_NEAREST_MIPMAP_LINEAR          0x2702
    670 #define GL_LINEAR_MIPMAP_LINEAR           0x2703
    671 
    672 /* TextureParameterName */
    673 #define GL_TEXTURE_MAG_FILTER             0x2800
    674 #define GL_TEXTURE_MIN_FILTER             0x2801
    675 #define GL_TEXTURE_WRAP_S                 0x2802
    676 #define GL_TEXTURE_WRAP_T                 0x2803
    677 
    678 /* TextureTarget */
    679 /*      GL_TEXTURE_2D */
    680 #define GL_TEXTURE                        0x1702
    681 
    682 #define GL_TEXTURE_CUBE_MAP               0x8513
    683 #define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
    684 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
    685 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
    686 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
    687 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
    688 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
    689 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
    690 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
    691 
    692 /* TextureUnit */
    693 #define GL_TEXTURE0                       0x84C0
    694 #define GL_TEXTURE1                       0x84C1
    695 #define GL_TEXTURE2                       0x84C2
    696 #define GL_TEXTURE3                       0x84C3
    697 #define GL_TEXTURE4                       0x84C4
    698 #define GL_TEXTURE5                       0x84C5
    699 #define GL_TEXTURE6                       0x84C6
    700 #define GL_TEXTURE7                       0x84C7
    701 #define GL_TEXTURE8                       0x84C8
    702 #define GL_TEXTURE9                       0x84C9
    703 #define GL_TEXTURE10                      0x84CA
    704 #define GL_TEXTURE11                      0x84CB
    705 #define GL_TEXTURE12                      0x84CC
    706 #define GL_TEXTURE13                      0x84CD
    707 #define GL_TEXTURE14                      0x84CE
    708 #define GL_TEXTURE15                      0x84CF
    709 #define GL_TEXTURE16                      0x84D0
    710 #define GL_TEXTURE17                      0x84D1
    711 #define GL_TEXTURE18                      0x84D2
    712 #define GL_TEXTURE19                      0x84D3
    713 #define GL_TEXTURE20                      0x84D4
    714 #define GL_TEXTURE21                      0x84D5
    715 #define GL_TEXTURE22                      0x84D6
    716 #define GL_TEXTURE23                      0x84D7
    717 #define GL_TEXTURE24                      0x84D8
    718 #define GL_TEXTURE25                      0x84D9
    719 #define GL_TEXTURE26                      0x84DA
    720 #define GL_TEXTURE27                      0x84DB
    721 #define GL_TEXTURE28                      0x84DC
    722 #define GL_TEXTURE29                      0x84DD
    723 #define GL_TEXTURE30                      0x84DE
    724 #define GL_TEXTURE31                      0x84DF
    725 #define GL_ACTIVE_TEXTURE                 0x84E0
    726 
    727 /* TextureWrapMode */
    728 #define GL_REPEAT                         0x2901
    729 #define GL_CLAMP_TO_EDGE                  0x812F
    730 #define GL_MIRRORED_REPEAT                0x8370
    731 
    732 /* Uniform Types */
    733 #define GL_FLOAT_VEC2                     0x8B50
    734 #define GL_FLOAT_VEC3                     0x8B51
    735 #define GL_FLOAT_VEC4                     0x8B52
    736 #define GL_INT_VEC2                       0x8B53
    737 #define GL_INT_VEC3                       0x8B54
    738 #define GL_INT_VEC4                       0x8B55
    739 #define GL_BOOL                           0x8B56
    740 #define GL_BOOL_VEC2                      0x8B57
    741 #define GL_BOOL_VEC3                      0x8B58
    742 #define GL_BOOL_VEC4                      0x8B59
    743 #define GL_FLOAT_MAT2                     0x8B5A
    744 #define GL_FLOAT_MAT3                     0x8B5B
    745 #define GL_FLOAT_MAT4                     0x8B5C
    746 #define GL_SAMPLER_2D                     0x8B5E
    747 #define GL_SAMPLER_CUBE                   0x8B60
    748 
    749 /* Vertex Arrays */
    750 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
    751 #define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
    752 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
    753 #define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
    754 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
    755 #define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
    756 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
    757 
    758 /* Read Format */
    759 #define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
    760 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
    761 
    762 /* Shader Source */
    763 #define GL_COMPILE_STATUS                 0x8B81
    764 #define GL_INFO_LOG_LENGTH                0x8B84
    765 #define GL_SHADER_SOURCE_LENGTH           0x8B88
    766 #define GL_SHADER_COMPILER                0x8DFA
    767 
    768 /* Shader Binary */
    769 #define GL_SHADER_BINARY_FORMATS          0x8DF8
    770 #define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
    771 
    772 /* Shader Precision-Specified Types */
    773 #define GL_LOW_FLOAT                      0x8DF0
    774 #define GL_MEDIUM_FLOAT                   0x8DF1
    775 #define GL_HIGH_FLOAT                     0x8DF2
    776 #define GL_LOW_INT                        0x8DF3
    777 #define GL_MEDIUM_INT                     0x8DF4
    778 #define GL_HIGH_INT                       0x8DF5
    779 
    780 /* Framebuffer Object. */
    781 #define GL_FRAMEBUFFER                    0x8D40
    782 #define GL_RENDERBUFFER                   0x8D41
    783 
    784 #define GL_RGBA4                          0x8056
    785 #define GL_RGB5_A1                        0x8057
    786 #define GL_RGB565                         0x8D62
    787 #define GL_DEPTH_COMPONENT16              0x81A5
    788 #define GL_STENCIL_INDEX8                 0x8D48
    789 
    790 #define GL_RENDERBUFFER_WIDTH             0x8D42
    791 #define GL_RENDERBUFFER_HEIGHT            0x8D43
    792 #define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
    793 #define GL_RENDERBUFFER_RED_SIZE          0x8D50
    794 #define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
    795 #define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
    796 #define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
    797 #define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
    798 #define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
    799 
    800 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
    801 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
    802 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
    803 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
    804 
    805 #define GL_COLOR_ATTACHMENT0              0x8CE0
    806 #define GL_DEPTH_ATTACHMENT               0x8D00
    807 #define GL_STENCIL_ATTACHMENT             0x8D20
    808 
    809 #define GL_NONE                           0
    810 
    811 #define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
    812 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
    813 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
    814 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
    815 #define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
    816 
    817 #define GL_FRAMEBUFFER_BINDING            0x8CA6
    818 #define GL_RENDERBUFFER_BINDING           0x8CA7
    819 #define GL_MAX_RENDERBUFFER_SIZE          0x84E8
    820 
    821 #define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
    822 
    823 /*-------------------------------------------------------------------------
    824  * GL core functions.
    825  *-----------------------------------------------------------------------*/
    826 
    827 GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
    828 GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
    829 GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
    830 GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
    831 GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
    832 GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
    833 GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
    834 GL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
    835 GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );
    836 GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
    837 GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
    838 GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
    839 GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
    840 GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
    841 GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
    842 GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
    843 GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
    844 GL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);
    845 GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
    846 GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
    847 GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
    848 GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
    849 GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
    850 GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
    851 GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
    852 GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
    853 GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);
    854 GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);
    855 GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
    856 GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
    857 GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);
    858 GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
    859 GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);
    860 GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
    861 GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);
    862 GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);
    863 GL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
    864 GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
    865 GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
    866 GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
    867 GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
    868 GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
    869 GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
    870 GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
    871 GL_APICALL void         GL_APIENTRY glFinish (void);
    872 GL_APICALL void         GL_APIENTRY glFlush (void);
    873 GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
    874 GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
    875 GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);
    876 GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
    877 GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);
    878 GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
    879 GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
    880 GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
    881 GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
    882 GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
    883 GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
    884 GL_APICALL int          GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
    885 GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
    886 GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
    887 GL_APICALL GLenum       GL_APIENTRY glGetError (void);
    888 GL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
    889 GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
    890 GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
    891 GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
    892 GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
    893 GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
    894 GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
    895 GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
    896 GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
    897 GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
    898 GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
    899 GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
    900 GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
    901 GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
    902 GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
    903 GL_APICALL int          GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
    904 GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
    905 GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
    906 GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
    907 GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
    908 GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
    909 GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
    910 GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
    911 GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);
    912 GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
    913 GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);
    914 GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);
    915 GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);
    916 GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
    917 GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
    918 GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
    919 GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
    920 GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
    921 GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
    922 GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
    923 GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
    924 GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
    925 GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
    926 GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
    927 GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
    928 GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
    929 GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
    930 GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
    931 GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
    932 GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
    933 GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
    934 GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
    935 GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
    936 GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
    937 GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
    938 GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);
    939 GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
    940 GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);
    941 GL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
    942 GL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
    943 GL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
    944 GL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
    945 GL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
    946 GL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
    947 GL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
    948 GL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
    949 GL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
    950 GL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
    951 GL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
    952 GL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
    953 GL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
    954 GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
    955 GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
    956 GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
    957 GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);
    958 GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);
    959 GL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
    960 GL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
    961 GL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
    962 GL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
    963 GL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
    964 GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
    965 GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
    966 GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
    967 GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
    968 GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
    969 
    970 #ifdef __cplusplus
    971 }
    972 #endif
    973 
    974 #endif /* __gl2_h_ */
    975 
    976 
    977 #ifndef __gl2ext_h_
    978 #define __gl2ext_h_
    979 
    980 /* $Revision: 19436 $ on $Date:: 2012-10-10 10:37:04 -0700 #$ */
    981 
    982 #ifdef __cplusplus
    983 extern "C" {
    984 #endif
    985 
    986 /*
    987  * This document is licensed under the SGI Free Software B License Version
    988  * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
    989  */
    990 
    991 #ifndef GL_APIENTRYP
    992 #   define GL_APIENTRYP GL_APIENTRY*
    993 #endif
    994 
    995 /*------------------------------------------------------------------------*
    996  * OES extension tokens
    997  *------------------------------------------------------------------------*/
    998 
    999 /* GL_OES_compressed_ETC1_RGB8_texture */
   1000 #ifndef GL_OES_compressed_ETC1_RGB8_texture
   1001 #define GL_ETC1_RGB8_OES                                        0x8D64
   1002 #endif
   1003 
   1004 /* GL_OES_compressed_paletted_texture */
   1005 #ifndef GL_OES_compressed_paletted_texture
   1006 #define GL_PALETTE4_RGB8_OES                                    0x8B90
   1007 #define GL_PALETTE4_RGBA8_OES                                   0x8B91
   1008 #define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
   1009 #define GL_PALETTE4_RGBA4_OES                                   0x8B93
   1010 #define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
   1011 #define GL_PALETTE8_RGB8_OES                                    0x8B95
   1012 #define GL_PALETTE8_RGBA8_OES                                   0x8B96
   1013 #define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
   1014 #define GL_PALETTE8_RGBA4_OES                                   0x8B98
   1015 #define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
   1016 #endif
   1017 
   1018 /* GL_OES_depth24 */
   1019 #ifndef GL_OES_depth24
   1020 #define GL_DEPTH_COMPONENT24_OES                                0x81A6
   1021 #endif
   1022 
   1023 /* GL_OES_depth32 */
   1024 #ifndef GL_OES_depth32
   1025 #define GL_DEPTH_COMPONENT32_OES                                0x81A7
   1026 #endif
   1027 
   1028 /* GL_OES_depth_texture */
   1029 /* No new tokens introduced by this extension. */
   1030 
   1031 /* GL_OES_EGL_image */
   1032 #ifndef GL_OES_EGL_image
   1033 typedef void* GLeglImageOES;
   1034 #endif
   1035 
   1036 /* GL_OES_EGL_image_external */
   1037 #ifndef GL_OES_EGL_image_external
   1038 /* GLeglImageOES defined in GL_OES_EGL_image already. */
   1039 #define GL_TEXTURE_EXTERNAL_OES                                 0x8D65
   1040 #define GL_SAMPLER_EXTERNAL_OES                                 0x8D66
   1041 #define GL_TEXTURE_BINDING_EXTERNAL_OES                         0x8D67
   1042 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES                     0x8D68
   1043 #endif
   1044 
   1045 /* GL_OES_element_index_uint */
   1046 #ifndef GL_OES_element_index_uint
   1047 #define GL_UNSIGNED_INT                                         0x1405
   1048 #endif
   1049 
   1050 /* GL_OES_get_program_binary */
   1051 #ifndef GL_OES_get_program_binary
   1052 #define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
   1053 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
   1054 #define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
   1055 #endif
   1056 
   1057 /* GL_OES_mapbuffer */
   1058 #ifndef GL_OES_mapbuffer
   1059 #define GL_WRITE_ONLY_OES                                       0x88B9
   1060 #define GL_BUFFER_ACCESS_OES                                    0x88BB
   1061 #define GL_BUFFER_MAPPED_OES                                    0x88BC
   1062 #define GL_BUFFER_MAP_POINTER_OES                               0x88BD
   1063 #endif
   1064 
   1065 /* GL_OES_packed_depth_stencil */
   1066 #ifndef GL_OES_packed_depth_stencil
   1067 #define GL_DEPTH_STENCIL_OES                                    0x84F9
   1068 #define GL_UNSIGNED_INT_24_8_OES                                0x84FA
   1069 #define GL_DEPTH24_STENCIL8_OES                                 0x88F0
   1070 #endif
   1071 
   1072 /* GL_OES_required_internalformat */
   1073 #ifndef GL_OES_required_internalformat
   1074 #define GL_ALPHA8_OES                                           0x803C
   1075 #define GL_DEPTH_COMPONENT16_OES                                0x81A5
   1076 /* reuse GL_DEPTH_COMPONENT24_OES */
   1077 /* reuse GL_DEPTH24_STENCIL8_OES */
   1078 /* reuse GL_DEPTH_COMPONENT32_OES */
   1079 #define GL_LUMINANCE4_ALPHA4_OES                                0x8043
   1080 #define GL_LUMINANCE8_ALPHA8_OES                                0x8045
   1081 #define GL_LUMINANCE8_OES                                       0x8040
   1082 #define GL_RGBA4_OES                                            0x8056
   1083 #define GL_RGB5_A1_OES                                          0x8057
   1084 #define GL_RGB565_OES                                           0x8D62
   1085 /* reuse GL_RGB8_OES */
   1086 /* reuse GL_RGBA8_OES */
   1087 /* reuse GL_RGB10_EXT */
   1088 /* reuse GL_RGB10_A2_EXT */
   1089 #endif
   1090 
   1091 /* GL_OES_rgb8_rgba8 */
   1092 #ifndef GL_OES_rgb8_rgba8
   1093 #define GL_RGB8_OES                                             0x8051
   1094 #define GL_RGBA8_OES                                            0x8058
   1095 #endif
   1096 
   1097 /* GL_OES_standard_derivatives */
   1098 #ifndef GL_OES_standard_derivatives
   1099 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
   1100 #endif
   1101 
   1102 /* GL_OES_stencil1 */
   1103 #ifndef GL_OES_stencil1
   1104 #define GL_STENCIL_INDEX1_OES                                   0x8D46
   1105 #endif
   1106 
   1107 /* GL_OES_stencil4 */
   1108 #ifndef GL_OES_stencil4
   1109 #define GL_STENCIL_INDEX4_OES                                   0x8D47
   1110 #endif
   1111 
   1112 #ifndef GL_OES_surfaceless_context
   1113 #define GL_FRAMEBUFFER_UNDEFINED_OES                            0x8219
   1114 #endif
   1115 
   1116 /* GL_OES_texture_3D */
   1117 #ifndef GL_OES_texture_3D
   1118 #define GL_TEXTURE_WRAP_R_OES                                   0x8072
   1119 #define GL_TEXTURE_3D_OES                                       0x806F
   1120 #define GL_TEXTURE_BINDING_3D_OES                               0x806A
   1121 #define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
   1122 #define GL_SAMPLER_3D_OES                                       0x8B5F
   1123 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
   1124 #endif
   1125 
   1126 /* GL_OES_texture_float */
   1127 /* No new tokens introduced by this extension. */
   1128 
   1129 /* GL_OES_texture_float_linear */
   1130 /* No new tokens introduced by this extension. */
   1131 
   1132 /* GL_OES_texture_half_float */
   1133 #ifndef GL_OES_texture_half_float
   1134 #define GL_HALF_FLOAT_OES                                       0x8D61
   1135 #endif
   1136 
   1137 /* GL_OES_texture_half_float_linear */
   1138 /* No new tokens introduced by this extension. */
   1139 
   1140 /* GL_OES_texture_npot */
   1141 /* No new tokens introduced by this extension. */
   1142 
   1143 /* GL_OES_vertex_array_object */
   1144 #ifndef GL_OES_vertex_array_object
   1145 #define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
   1146 #endif
   1147 
   1148 /* GL_OES_vertex_half_float */
   1149 /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
   1150 
   1151 /* GL_OES_vertex_type_10_10_10_2 */
   1152 #ifndef GL_OES_vertex_type_10_10_10_2
   1153 #define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
   1154 #define GL_INT_10_10_10_2_OES                                   0x8DF7
   1155 #endif
   1156 
   1157 /*------------------------------------------------------------------------*
   1158  * KHR extension tokens
   1159  *------------------------------------------------------------------------*/
   1160 
   1161 #ifndef GL_KHR_debug
   1162 typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
   1163 #define GL_DEBUG_OUTPUT_SYNCHRONOUS                             0x8242
   1164 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH                     0x8243
   1165 #define GL_DEBUG_CALLBACK_FUNCTION                              0x8244
   1166 #define GL_DEBUG_CALLBACK_USER_PARAM                            0x8245
   1167 #define GL_DEBUG_SOURCE_API                                     0x8246
   1168 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM                           0x8247
   1169 #define GL_DEBUG_SOURCE_SHADER_COMPILER                         0x8248
   1170 #define GL_DEBUG_SOURCE_THIRD_PARTY                             0x8249
   1171 #define GL_DEBUG_SOURCE_APPLICATION                             0x824A
   1172 #define GL_DEBUG_SOURCE_OTHER                                   0x824B
   1173 #define GL_DEBUG_TYPE_ERROR                                     0x824C
   1174 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR                       0x824D
   1175 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR                        0x824E
   1176 #define GL_DEBUG_TYPE_PORTABILITY                               0x824F
   1177 #define GL_DEBUG_TYPE_PERFORMANCE                               0x8250
   1178 #define GL_DEBUG_TYPE_OTHER                                     0x8251
   1179 #define GL_DEBUG_TYPE_MARKER                                    0x8268
   1180 #define GL_DEBUG_TYPE_PUSH_GROUP                                0x8269
   1181 #define GL_DEBUG_TYPE_POP_GROUP                                 0x826A
   1182 #define GL_DEBUG_SEVERITY_NOTIFICATION                          0x826B
   1183 #define GL_MAX_DEBUG_GROUP_STACK_DEPTH                          0x826C
   1184 #define GL_DEBUG_GROUP_STACK_DEPTH                              0x826D
   1185 #define GL_BUFFER                                               0x82E0
   1186 #define GL_SHADER                                               0x82E1
   1187 #define GL_PROGRAM                                              0x82E2
   1188 #define GL_QUERY                                                0x82E3
   1189 /* PROGRAM_PIPELINE only in GL */
   1190 #define GL_SAMPLER                                              0x82E6
   1191 /* DISPLAY_LIST only in GL */
   1192 #define GL_MAX_LABEL_LENGTH                                     0x82E8
   1193 #define GL_MAX_DEBUG_MESSAGE_LENGTH                             0x9143
   1194 #define GL_MAX_DEBUG_LOGGED_MESSAGES                            0x9144
   1195 #define GL_DEBUG_LOGGED_MESSAGES                                0x9145
   1196 #define GL_DEBUG_SEVERITY_HIGH                                  0x9146
   1197 #define GL_DEBUG_SEVERITY_MEDIUM                                0x9147
   1198 #define GL_DEBUG_SEVERITY_LOW                                   0x9148
   1199 #define GL_DEBUG_OUTPUT                                         0x92E0
   1200 #define GL_CONTEXT_FLAG_DEBUG_BIT                               0x00000002
   1201 #define GL_STACK_OVERFLOW                                       0x0503
   1202 #define GL_STACK_UNDERFLOW                                      0x0504
   1203 #endif
   1204 
   1205 #ifndef GL_KHR_texture_compression_astc_ldr
   1206 #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR                         0x93B0
   1207 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR                         0x93B1
   1208 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR                         0x93B2
   1209 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR                         0x93B3
   1210 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR                         0x93B4
   1211 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR                         0x93B5
   1212 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR                         0x93B6
   1213 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR                         0x93B7
   1214 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR                        0x93B8
   1215 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR                        0x93B9
   1216 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR                        0x93BA
   1217 #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR                       0x93BB
   1218 #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR                       0x93BC
   1219 #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR                       0x93BD
   1220 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR                 0x93D0
   1221 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR                 0x93D1
   1222 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR                 0x93D2
   1223 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR                 0x93D3
   1224 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR                 0x93D4
   1225 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR                 0x93D5
   1226 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR                 0x93D6
   1227 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR                 0x93D7
   1228 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR                0x93D8
   1229 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR                0x93D9
   1230 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR                0x93DA
   1231 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR               0x93DB
   1232 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR               0x93DC
   1233 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR               0x93DD
   1234 #endif
   1235 
   1236 /*------------------------------------------------------------------------*
   1237  * AMD extension tokens
   1238  *------------------------------------------------------------------------*/
   1239 
   1240 /* GL_AMD_compressed_3DC_texture */
   1241 #ifndef GL_AMD_compressed_3DC_texture
   1242 #define GL_3DC_X_AMD                                            0x87F9
   1243 #define GL_3DC_XY_AMD                                           0x87FA
   1244 #endif
   1245 
   1246 /* GL_AMD_compressed_ATC_texture */
   1247 #ifndef GL_AMD_compressed_ATC_texture
   1248 #define GL_ATC_RGB_AMD                                          0x8C92
   1249 #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
   1250 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
   1251 #endif
   1252 
   1253 /* GL_AMD_performance_monitor */
   1254 #ifndef GL_AMD_performance_monitor
   1255 #define GL_COUNTER_TYPE_AMD                                     0x8BC0
   1256 #define GL_COUNTER_RANGE_AMD                                    0x8BC1
   1257 #define GL_UNSIGNED_INT64_AMD                                   0x8BC2
   1258 #define GL_PERCENTAGE_AMD                                       0x8BC3
   1259 #define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4
   1260 #define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5
   1261 #define GL_PERFMON_RESULT_AMD                                   0x8BC6
   1262 #endif
   1263 
   1264 /* GL_AMD_program_binary_Z400 */
   1265 #ifndef GL_AMD_program_binary_Z400
   1266 #define GL_Z400_BINARY_AMD                                      0x8740
   1267 #endif
   1268 
   1269 /*------------------------------------------------------------------------*
   1270  * ANGLE extension tokens
   1271  *------------------------------------------------------------------------*/
   1272 
   1273 /* GL_ANGLE_framebuffer_blit */
   1274 #ifndef GL_ANGLE_framebuffer_blit
   1275 #define GL_READ_FRAMEBUFFER_ANGLE                               0x8CA8
   1276 #define GL_DRAW_FRAMEBUFFER_ANGLE                               0x8CA9
   1277 #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE                       0x8CA6
   1278 #define GL_READ_FRAMEBUFFER_BINDING_ANGLE                       0x8CAA
   1279 #endif
   1280 
   1281 /* GL_ANGLE_framebuffer_multisample */
   1282 #ifndef GL_ANGLE_framebuffer_multisample
   1283 #define GL_RENDERBUFFER_SAMPLES_ANGLE                           0x8CAB
   1284 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE             0x8D56
   1285 #define GL_MAX_SAMPLES_ANGLE                                    0x8D57
   1286 #endif
   1287 
   1288 /* GL_ANGLE_instanced_arrays */
   1289 #ifndef GL_ANGLE_instanced_arrays
   1290 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE                    0x88FE
   1291 #endif
   1292 
   1293 /* GL_ANGLE_pack_reverse_row_order */
   1294 #ifndef GL_ANGLE_pack_reverse_row_order
   1295 #define GL_PACK_REVERSE_ROW_ORDER_ANGLE                         0x93A4
   1296 #endif
   1297 
   1298 /* GL_ANGLE_texture_compression_dxt3 */
   1299 #ifndef GL_ANGLE_texture_compression_dxt3
   1300 #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE                      0x83F2
   1301 #endif
   1302 
   1303 /* GL_ANGLE_texture_compression_dxt5 */
   1304 #ifndef GL_ANGLE_texture_compression_dxt5
   1305 #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE                      0x83F3
   1306 #endif
   1307 
   1308 /* GL_ANGLE_texture_usage */
   1309 #ifndef GL_ANGLE_texture_usage
   1310 #define GL_TEXTURE_USAGE_ANGLE                                  0x93A2
   1311 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE                         0x93A3
   1312 #endif
   1313 
   1314 /* GL_ANGLE_translated_shader_source */
   1315 #ifndef GL_ANGLE_translated_shader_source
   1316 #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE                0x93A0
   1317 #endif
   1318 
   1319 /*------------------------------------------------------------------------*
   1320  * APPLE extension tokens
   1321  *------------------------------------------------------------------------*/
   1322 
   1323 /* GL_APPLE_copy_texture_levels */
   1324 /* No new tokens introduced by this extension. */
   1325 
   1326 /* GL_APPLE_framebuffer_multisample */
   1327 #ifndef GL_APPLE_framebuffer_multisample
   1328 #define GL_RENDERBUFFER_SAMPLES_APPLE                           0x8CAB
   1329 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE             0x8D56
   1330 #define GL_MAX_SAMPLES_APPLE                                    0x8D57
   1331 #define GL_READ_FRAMEBUFFER_APPLE                               0x8CA8
   1332 #define GL_DRAW_FRAMEBUFFER_APPLE                               0x8CA9
   1333 #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE                       0x8CA6
   1334 #define GL_READ_FRAMEBUFFER_BINDING_APPLE                       0x8CAA
   1335 #endif
   1336 
   1337 /* GL_APPLE_rgb_422 */
   1338 #ifndef GL_APPLE_rgb_422
   1339 #define GL_RGB_422_APPLE                                        0x8A1F
   1340 #define GL_UNSIGNED_SHORT_8_8_APPLE                             0x85BA
   1341 #define GL_UNSIGNED_SHORT_8_8_REV_APPLE                         0x85BB
   1342 #endif
   1343 
   1344 /* GL_APPLE_sync */
   1345 #ifndef GL_APPLE_sync
   1346 
   1347 #ifndef __gl3_h_
   1348 /* These types are defined with reference to <inttypes.h>
   1349  * in the Apple extension spec, but here we use the Khronos
   1350  * portable types in khrplatform.h, and assume those types
   1351  * are always defined.
   1352  * If any other extensions using these types are defined,
   1353  * the typedefs must move out of this block and be shared.
   1354  */
   1355 typedef khronos_int64_t GLint64;
   1356 typedef khronos_uint64_t GLuint64;
   1357 typedef struct __GLsync *GLsync;
   1358 #endif
   1359 
   1360 #define GL_SYNC_OBJECT_APPLE                                    0x8A53
   1361 #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE                        0x9111
   1362 #define GL_OBJECT_TYPE_APPLE                                    0x9112
   1363 #define GL_SYNC_CONDITION_APPLE                                 0x9113
   1364 #define GL_SYNC_STATUS_APPLE                                    0x9114
   1365 #define GL_SYNC_FLAGS_APPLE                                     0x9115
   1366 #define GL_SYNC_FENCE_APPLE                                     0x9116
   1367 #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE                     0x9117
   1368 #define GL_UNSIGNALED_APPLE                                     0x9118
   1369 #define GL_SIGNALED_APPLE                                       0x9119
   1370 #define GL_ALREADY_SIGNALED_APPLE                               0x911A
   1371 #define GL_TIMEOUT_EXPIRED_APPLE                                0x911B
   1372 #define GL_CONDITION_SATISFIED_APPLE                            0x911C
   1373 #define GL_WAIT_FAILED_APPLE                                    0x911D
   1374 #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE                        0x00000001
   1375 #define GL_TIMEOUT_IGNORED_APPLE                                0xFFFFFFFFFFFFFFFFull
   1376 #endif
   1377 
   1378 /* GL_APPLE_texture_format_BGRA8888 */
   1379 #ifndef GL_APPLE_texture_format_BGRA8888
   1380 #define GL_BGRA_EXT                                             0x80E1
   1381 #endif
   1382 
   1383 /* GL_APPLE_texture_max_level */
   1384 #ifndef GL_APPLE_texture_max_level
   1385 #define GL_TEXTURE_MAX_LEVEL_APPLE                              0x813D
   1386 #endif
   1387 
   1388 /*------------------------------------------------------------------------*
   1389  * ARM extension tokens
   1390  *------------------------------------------------------------------------*/
   1391 
   1392 /* GL_ARM_mali_program_binary */
   1393 #ifndef GL_ARM_mali_program_binary
   1394 #define GL_MALI_PROGRAM_BINARY_ARM                              0x8F61
   1395 #endif
   1396 
   1397 /* GL_ARM_mali_shader_binary */
   1398 #ifndef GL_ARM_mali_shader_binary
   1399 #define GL_MALI_SHADER_BINARY_ARM                               0x8F60
   1400 #endif
   1401 
   1402 /* GL_ARM_rgba8 */
   1403 /* No new tokens introduced by this extension. */
   1404 
   1405 /*------------------------------------------------------------------------*
   1406  * EXT extension tokens
   1407  *------------------------------------------------------------------------*/
   1408 
   1409 /* GL_EXT_blend_minmax */
   1410 #ifndef GL_EXT_blend_minmax
   1411 #define GL_MIN_EXT                                              0x8007
   1412 #define GL_MAX_EXT                                              0x8008
   1413 #endif
   1414 
   1415 /* GL_EXT_color_buffer_half_float */
   1416 #ifndef GL_EXT_color_buffer_half_float
   1417 #define GL_RGBA16F_EXT                                          0x881A
   1418 #define GL_RGB16F_EXT                                           0x881B
   1419 #define GL_RG16F_EXT                                            0x822F
   1420 #define GL_R16F_EXT                                             0x822D
   1421 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT            0x8211
   1422 #define GL_UNSIGNED_NORMALIZED_EXT                              0x8C17
   1423 #endif
   1424 
   1425 /* GL_EXT_debug_label */
   1426 #ifndef GL_EXT_debug_label
   1427 #define GL_PROGRAM_PIPELINE_OBJECT_EXT                          0x8A4F
   1428 #define GL_PROGRAM_OBJECT_EXT                                   0x8B40
   1429 #define GL_SHADER_OBJECT_EXT                                    0x8B48
   1430 #define GL_BUFFER_OBJECT_EXT                                    0x9151
   1431 #define GL_QUERY_OBJECT_EXT                                     0x9153
   1432 #define GL_VERTEX_ARRAY_OBJECT_EXT                              0x9154
   1433 #endif
   1434 
   1435 /* GL_EXT_debug_marker */
   1436 /* No new tokens introduced by this extension. */
   1437 
   1438 /* GL_EXT_discard_framebuffer */
   1439 #ifndef GL_EXT_discard_framebuffer
   1440 #define GL_COLOR_EXT                                            0x1800
   1441 #define GL_DEPTH_EXT                                            0x1801
   1442 #define GL_STENCIL_EXT                                          0x1802
   1443 #endif
   1444 
   1445 /* GL_EXT_map_buffer_range */
   1446 #ifndef GL_EXT_map_buffer_range
   1447 #define GL_MAP_READ_BIT_EXT                                     0x0001
   1448 #define GL_MAP_WRITE_BIT_EXT                                    0x0002
   1449 #define GL_MAP_INVALIDATE_RANGE_BIT_EXT                         0x0004
   1450 #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT                        0x0008
   1451 #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT                           0x0010
   1452 #define GL_MAP_UNSYNCHRONIZED_BIT_EXT                           0x0020
   1453 #endif
   1454 
   1455 /* GL_EXT_multisampled_render_to_texture */
   1456 #ifndef GL_EXT_multisampled_render_to_texture
   1457 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT           0x8D6C
   1458 /* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
   1459 #define GL_RENDERBUFFER_SAMPLES_EXT                             0x8CAB
   1460 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x8D56
   1461 #define GL_MAX_SAMPLES_EXT                                      0x8D57
   1462 #endif
   1463 
   1464 /* GL_EXT_multiview_draw_buffers */
   1465 #ifndef GL_EXT_multiview_draw_buffers
   1466 #define GL_COLOR_ATTACHMENT_EXT                                 0x90F0
   1467 #define GL_MULTIVIEW_EXT                                        0x90F1
   1468 #define GL_DRAW_BUFFER_EXT                                      0x0C01
   1469 #define GL_READ_BUFFER_EXT                                      0x0C02
   1470 #define GL_MAX_MULTIVIEW_BUFFERS_EXT                            0x90F2
   1471 #endif
   1472 
   1473 /* GL_EXT_multi_draw_arrays */
   1474 /* No new tokens introduced by this extension. */
   1475 
   1476 /* GL_EXT_occlusion_query_boolean */
   1477 #ifndef GL_EXT_occlusion_query_boolean
   1478 #define GL_ANY_SAMPLES_PASSED_EXT                               0x8C2F
   1479 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT                  0x8D6A
   1480 #define GL_CURRENT_QUERY_EXT                                    0x8865
   1481 #define GL_QUERY_RESULT_EXT                                     0x8866
   1482 #define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867
   1483 #endif
   1484 
   1485 /* GL_EXT_read_format_bgra */
   1486 #ifndef GL_EXT_read_format_bgra
   1487 #define GL_BGRA_EXT                                             0x80E1
   1488 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
   1489 #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
   1490 #endif
   1491 
   1492 /* GL_EXT_robustness */
   1493 #ifndef GL_EXT_robustness
   1494 /* reuse GL_NO_ERROR */
   1495 #define GL_GUILTY_CONTEXT_RESET_EXT                             0x8253
   1496 #define GL_INNOCENT_CONTEXT_RESET_EXT                           0x8254
   1497 #define GL_UNKNOWN_CONTEXT_RESET_EXT                            0x8255
   1498 #define GL_CONTEXT_ROBUST_ACCESS_EXT                            0x90F3
   1499 #define GL_RESET_NOTIFICATION_STRATEGY_EXT                      0x8256
   1500 #define GL_LOSE_CONTEXT_ON_RESET_EXT                            0x8252
   1501 #define GL_NO_RESET_NOTIFICATION_EXT                            0x8261
   1502 #endif
   1503 
   1504 /* GL_EXT_separate_shader_objects */
   1505 #ifndef GL_EXT_separate_shader_objects
   1506 #define GL_VERTEX_SHADER_BIT_EXT                                0x00000001
   1507 #define GL_FRAGMENT_SHADER_BIT_EXT                              0x00000002
   1508 #define GL_ALL_SHADER_BITS_EXT                                  0xFFFFFFFF
   1509 #define GL_PROGRAM_SEPARABLE_EXT                                0x8258
   1510 #define GL_ACTIVE_PROGRAM_EXT                                   0x8259
   1511 #define GL_PROGRAM_PIPELINE_BINDING_EXT                         0x825A
   1512 #endif
   1513 
   1514 /* GL_EXT_shader_framebuffer_fetch */
   1515 #ifndef GL_EXT_shader_framebuffer_fetch
   1516 #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT                 0x8A52
   1517 #endif
   1518 
   1519 /* GL_EXT_shader_texture_lod */
   1520 /* No new tokens introduced by this extension. */
   1521 
   1522 /* GL_EXT_shadow_samplers */
   1523 #ifndef GL_EXT_shadow_samplers
   1524 #define GL_TEXTURE_COMPARE_MODE_EXT                             0x884C
   1525 #define GL_TEXTURE_COMPARE_FUNC_EXT                             0x884D
   1526 #define GL_COMPARE_REF_TO_TEXTURE_EXT                           0x884E
   1527 #define GL_SAMPLER_2D_SHADOW_EXT                                0x8B62
   1528 #endif
   1529 
   1530 /* GL_EXT_sRGB */
   1531 #ifndef GL_EXT_sRGB
   1532 #define GL_SRGB_EXT                                             0x8C40
   1533 #define GL_SRGB_ALPHA_EXT                                       0x8C42
   1534 #define GL_SRGB8_ALPHA8_EXT                                     0x8C43
   1535 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT            0x8210
   1536 #endif
   1537 
   1538 /* GL_EXT_texture_compression_dxt1 */
   1539 #ifndef GL_EXT_texture_compression_dxt1
   1540 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0
   1541 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1
   1542 #endif
   1543 
   1544 /* GL_EXT_texture_filter_anisotropic */
   1545 #ifndef GL_EXT_texture_filter_anisotropic
   1546 #define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
   1547 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
   1548 #endif
   1549 
   1550 /* GL_EXT_texture_format_BGRA8888 */
   1551 #ifndef GL_EXT_texture_format_BGRA8888
   1552 #define GL_BGRA_EXT                                             0x80E1
   1553 #endif
   1554 
   1555 /* GL_EXT_texture_rg */
   1556 #ifndef GL_EXT_texture_rg
   1557 #define GL_RED_EXT                                              0x1903
   1558 #define GL_RG_EXT                                               0x8227
   1559 #define GL_R8_EXT                                               0x8229
   1560 #define GL_RG8_EXT                                              0x822B
   1561 #endif
   1562 
   1563 /* GL_EXT_texture_storage */
   1564 #ifndef GL_EXT_texture_storage
   1565 #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT                         0x912F
   1566 #define GL_ALPHA8_EXT                                           0x803C
   1567 #define GL_LUMINANCE8_EXT                                       0x8040
   1568 #define GL_LUMINANCE8_ALPHA8_EXT                                0x8045
   1569 #define GL_RGBA32F_EXT                                          0x8814
   1570 #define GL_RGB32F_EXT                                           0x8815
   1571 #define GL_ALPHA32F_EXT                                         0x8816
   1572 #define GL_LUMINANCE32F_EXT                                     0x8818
   1573 #define GL_LUMINANCE_ALPHA32F_EXT                               0x8819
   1574 /* reuse GL_RGBA16F_EXT */
   1575 /* reuse GL_RGB16F_EXT */
   1576 #define GL_ALPHA16F_EXT                                         0x881C
   1577 #define GL_LUMINANCE16F_EXT                                     0x881E
   1578 #define GL_LUMINANCE_ALPHA16F_EXT                               0x881F
   1579 #define GL_RGB10_A2_EXT                                         0x8059
   1580 #define GL_RGB10_EXT                                            0x8052
   1581 #define GL_BGRA8_EXT                                            0x93A1
   1582 #define GL_R8_EXT                                               0x8229
   1583 #define GL_RG8_EXT                                              0x822B
   1584 #define GL_R32F_EXT                                             0x822E
   1585 #define GL_RG32F_EXT                                            0x8230
   1586 #define GL_R16F_EXT                                             0x822D
   1587 #define GL_RG16F_EXT                                            0x822F
   1588 #endif
   1589 
   1590 /* GL_EXT_texture_type_2_10_10_10_REV */
   1591 #ifndef GL_EXT_texture_type_2_10_10_10_REV
   1592 #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
   1593 #endif
   1594 
   1595 /* GL_EXT_unpack_subimage */
   1596 #ifndef GL_EXT_unpack_subimage
   1597 #define GL_UNPACK_ROW_LENGTH                                    0x0CF2
   1598 #define GL_UNPACK_SKIP_ROWS                                     0x0CF3
   1599 #define GL_UNPACK_SKIP_PIXELS                                   0x0CF4
   1600 #endif
   1601 
   1602 /*------------------------------------------------------------------------*
   1603  * DMP extension tokens
   1604  *------------------------------------------------------------------------*/
   1605 
   1606 /* GL_DMP_shader_binary */
   1607 #ifndef GL_DMP_shader_binary
   1608 #define GL_SHADER_BINARY_DMP                                    0x9250
   1609 #endif
   1610 
   1611 /*------------------------------------------------------------------------*
   1612  * FJ extension tokens
   1613  *------------------------------------------------------------------------*/
   1614 
   1615 /* GL_FJ_shader_binary_GCCSO */
   1616 #ifndef GL_FJ_shader_binary_GCCSO
   1617 #define GCCSO_SHADER_BINARY_FJ                                  0x9260
   1618 #endif
   1619 
   1620 /*------------------------------------------------------------------------*
   1621  * IMG extension tokens
   1622  *------------------------------------------------------------------------*/
   1623 
   1624 /* GL_IMG_program_binary */
   1625 #ifndef GL_IMG_program_binary
   1626 #define GL_SGX_PROGRAM_BINARY_IMG                               0x9130
   1627 #endif
   1628 
   1629 /* GL_IMG_read_format */
   1630 #ifndef GL_IMG_read_format
   1631 #define GL_BGRA_IMG                                             0x80E1
   1632 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
   1633 #endif
   1634 
   1635 /* GL_IMG_shader_binary */
   1636 #ifndef GL_IMG_shader_binary
   1637 #define GL_SGX_BINARY_IMG                                       0x8C0A
   1638 #endif
   1639 
   1640 /* GL_IMG_texture_compression_pvrtc */
   1641 #ifndef GL_IMG_texture_compression_pvrtc
   1642 #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
   1643 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
   1644 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
   1645 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
   1646 #endif
   1647 
   1648 /* GL_IMG_multisampled_render_to_texture */
   1649 #ifndef GL_IMG_multisampled_render_to_texture
   1650 #define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133
   1651 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134
   1652 #define GL_MAX_SAMPLES_IMG                                      0x9135
   1653 #define GL_TEXTURE_SAMPLES_IMG                                  0x9136
   1654 #endif
   1655 
   1656 /*------------------------------------------------------------------------*
   1657  * NV extension tokens
   1658  *------------------------------------------------------------------------*/
   1659 
   1660 /* GL_NV_coverage_sample */
   1661 #ifndef GL_NV_coverage_sample
   1662 #define GL_COVERAGE_COMPONENT_NV                                0x8ED0
   1663 #define GL_COVERAGE_COMPONENT4_NV                               0x8ED1
   1664 #define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2
   1665 #define GL_COVERAGE_BUFFERS_NV                                  0x8ED3
   1666 #define GL_COVERAGE_SAMPLES_NV                                  0x8ED4
   1667 #define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5
   1668 #define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6
   1669 #define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7
   1670 #define GL_COVERAGE_BUFFER_BIT_NV                               0x8000
   1671 #endif
   1672 
   1673 /* GL_NV_depth_nonlinear */
   1674 #ifndef GL_NV_depth_nonlinear
   1675 #define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C
   1676 #endif
   1677 
   1678 /* GL_NV_draw_buffers */
   1679 #ifndef GL_NV_draw_buffers
   1680 #define GL_MAX_DRAW_BUFFERS_NV                                  0x8824
   1681 #define GL_DRAW_BUFFER0_NV                                      0x8825
   1682 #define GL_DRAW_BUFFER1_NV                                      0x8826
   1683 #define GL_DRAW_BUFFER2_NV                                      0x8827
   1684 #define GL_DRAW_BUFFER3_NV                                      0x8828
   1685 #define GL_DRAW_BUFFER4_NV                                      0x8829
   1686 #define GL_DRAW_BUFFER5_NV                                      0x882A
   1687 #define GL_DRAW_BUFFER6_NV                                      0x882B
   1688 #define GL_DRAW_BUFFER7_NV                                      0x882C
   1689 #define GL_DRAW_BUFFER8_NV                                      0x882D
   1690 #define GL_DRAW_BUFFER9_NV                                      0x882E
   1691 #define GL_DRAW_BUFFER10_NV                                     0x882F
   1692 #define GL_DRAW_BUFFER11_NV                                     0x8830
   1693 #define GL_DRAW_BUFFER12_NV                                     0x8831
   1694 #define GL_DRAW_BUFFER13_NV                                     0x8832
   1695 #define GL_DRAW_BUFFER14_NV                                     0x8833
   1696 #define GL_DRAW_BUFFER15_NV                                     0x8834
   1697 #define GL_COLOR_ATTACHMENT0_NV                                 0x8CE0
   1698 #define GL_COLOR_ATTACHMENT1_NV                                 0x8CE1
   1699 #define GL_COLOR_ATTACHMENT2_NV                                 0x8CE2
   1700 #define GL_COLOR_ATTACHMENT3_NV                                 0x8CE3
   1701 #define GL_COLOR_ATTACHMENT4_NV                                 0x8CE4
   1702 #define GL_COLOR_ATTACHMENT5_NV                                 0x8CE5
   1703 #define GL_COLOR_ATTACHMENT6_NV                                 0x8CE6
   1704 #define GL_COLOR_ATTACHMENT7_NV                                 0x8CE7
   1705 #define GL_COLOR_ATTACHMENT8_NV                                 0x8CE8
   1706 #define GL_COLOR_ATTACHMENT9_NV                                 0x8CE9
   1707 #define GL_COLOR_ATTACHMENT10_NV                                0x8CEA
   1708 #define GL_COLOR_ATTACHMENT11_NV                                0x8CEB
   1709 #define GL_COLOR_ATTACHMENT12_NV                                0x8CEC
   1710 #define GL_COLOR_ATTACHMENT13_NV                                0x8CED
   1711 #define GL_COLOR_ATTACHMENT14_NV                                0x8CEE
   1712 #define GL_COLOR_ATTACHMENT15_NV                                0x8CEF
   1713 #endif
   1714 
   1715 /* GL_NV_fbo_color_attachments */
   1716 #ifndef GL_NV_fbo_color_attachments
   1717 #define GL_MAX_COLOR_ATTACHMENTS_NV                             0x8CDF
   1718 /* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
   1719 #endif
   1720 
   1721 /* GL_NV_fence */
   1722 #ifndef GL_NV_fence
   1723 #define GL_ALL_COMPLETED_NV                                     0x84F2
   1724 #define GL_FENCE_STATUS_NV                                      0x84F3
   1725 #define GL_FENCE_CONDITION_NV                                   0x84F4
   1726 #endif
   1727 
   1728 /* GL_NV_read_buffer */
   1729 #ifndef GL_NV_read_buffer
   1730 #define GL_READ_BUFFER_NV                                       0x0C02
   1731 #endif
   1732 
   1733 /* GL_NV_read_buffer_front */
   1734 /* No new tokens introduced by this extension. */
   1735 
   1736 /* GL_NV_read_depth */
   1737 /* No new tokens introduced by this extension. */
   1738 
   1739 /* GL_NV_read_depth_stencil */
   1740 /* No new tokens introduced by this extension. */
   1741 
   1742 /* GL_NV_read_stencil */
   1743 /* No new tokens introduced by this extension. */
   1744 
   1745 /* GL_NV_texture_compression_s3tc_update */
   1746 /* No new tokens introduced by this extension. */
   1747 
   1748 /* GL_NV_texture_npot_2D_mipmap */
   1749 /* No new tokens introduced by this extension. */
   1750 
   1751 /*------------------------------------------------------------------------*
   1752  * QCOM extension tokens
   1753  *------------------------------------------------------------------------*/
   1754 
   1755 /* GL_QCOM_alpha_test */
   1756 #ifndef GL_QCOM_alpha_test
   1757 #define GL_ALPHA_TEST_QCOM                                      0x0BC0
   1758 #define GL_ALPHA_TEST_FUNC_QCOM                                 0x0BC1
   1759 #define GL_ALPHA_TEST_REF_QCOM                                  0x0BC2
   1760 #endif
   1761 
   1762 /* GL_QCOM_binning_control */
   1763 #ifndef GL_QCOM_binning_control
   1764 #define GL_BINNING_CONTROL_HINT_QCOM                            0x8FB0
   1765 #define GL_CPU_OPTIMIZED_QCOM                                   0x8FB1
   1766 #define GL_GPU_OPTIMIZED_QCOM                                   0x8FB2
   1767 #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM                    0x8FB3
   1768 #endif
   1769 
   1770 /* GL_QCOM_driver_control */
   1771 /* No new tokens introduced by this extension. */
   1772 
   1773 /* GL_QCOM_extended_get */
   1774 #ifndef GL_QCOM_extended_get
   1775 #define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
   1776 #define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
   1777 #define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
   1778 #define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
   1779 #define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
   1780 #define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
   1781 #define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
   1782 #define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
   1783 #define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
   1784 #define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
   1785 #define GL_STATE_RESTORE                                        0x8BDC
   1786 #endif
   1787 
   1788 /* GL_QCOM_extended_get2 */
   1789 /* No new tokens introduced by this extension. */
   1790 
   1791 /* GL_QCOM_perfmon_global_mode */
   1792 #ifndef GL_QCOM_perfmon_global_mode
   1793 #define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
   1794 #endif
   1795 
   1796 /* GL_QCOM_writeonly_rendering */
   1797 #ifndef GL_QCOM_writeonly_rendering
   1798 #define GL_WRITEONLY_RENDERING_QCOM                             0x8823
   1799 #endif
   1800 
   1801 /* GL_QCOM_tiled_rendering */
   1802 #ifndef GL_QCOM_tiled_rendering
   1803 #define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
   1804 #define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
   1805 #define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
   1806 #define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
   1807 #define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
   1808 #define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
   1809 #define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
   1810 #define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
   1811 #define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
   1812 #define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
   1813 #define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
   1814 #define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
   1815 #define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
   1816 #define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
   1817 #define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
   1818 #define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
   1819 #define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
   1820 #define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
   1821 #define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
   1822 #define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
   1823 #define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
   1824 #define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
   1825 #define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
   1826 #define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
   1827 #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
   1828 #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
   1829 #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
   1830 #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
   1831 #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
   1832 #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
   1833 #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
   1834 #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
   1835 #endif
   1836 
   1837 /*------------------------------------------------------------------------*
   1838  * VIV extension tokens
   1839  *------------------------------------------------------------------------*/
   1840 
   1841 /* GL_VIV_shader_binary */
   1842 #ifndef GL_VIV_shader_binary
   1843 #define GL_SHADER_BINARY_VIV                                    0x8FC4
   1844 #endif
   1845 
   1846 /*------------------------------------------------------------------------*
   1847  * End of extension tokens, start of corresponding extension functions
   1848  *------------------------------------------------------------------------*/
   1849 
   1850 /*------------------------------------------------------------------------*
   1851  * OES extension functions
   1852  *------------------------------------------------------------------------*/
   1853 
   1854 /* GL_OES_compressed_ETC1_RGB8_texture */
   1855 #ifndef GL_OES_compressed_ETC1_RGB8_texture
   1856 #define GL_OES_compressed_ETC1_RGB8_texture 1
   1857 #endif
   1858 
   1859 /* GL_OES_compressed_paletted_texture */
   1860 #ifndef GL_OES_compressed_paletted_texture
   1861 #define GL_OES_compressed_paletted_texture 1
   1862 #endif
   1863 
   1864 /* GL_OES_depth24 */
   1865 #ifndef GL_OES_depth24
   1866 #define GL_OES_depth24 1
   1867 #endif
   1868 
   1869 /* GL_OES_depth32 */
   1870 #ifndef GL_OES_depth32
   1871 #define GL_OES_depth32 1
   1872 #endif
   1873 
   1874 /* GL_OES_depth_texture */
   1875 #ifndef GL_OES_depth_texture
   1876 #define GL_OES_depth_texture 1
   1877 #endif
   1878 
   1879 /* GL_OES_EGL_image */
   1880 #ifndef GL_OES_EGL_image
   1881 #define GL_OES_EGL_image 1
   1882 #ifdef GL_GLEXT_PROTOTYPES
   1883 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
   1884 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
   1885 #endif
   1886 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
   1887 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
   1888 #endif
   1889 
   1890 /* GL_OES_EGL_image_external */
   1891 #ifndef GL_OES_EGL_image_external
   1892 #define GL_OES_EGL_image_external 1
   1893 /* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
   1894 #endif
   1895 
   1896 /* GL_OES_element_index_uint */
   1897 #ifndef GL_OES_element_index_uint
   1898 #define GL_OES_element_index_uint 1
   1899 #endif
   1900 
   1901 /* GL_OES_fbo_render_mipmap */
   1902 #ifndef GL_OES_fbo_render_mipmap
   1903 #define GL_OES_fbo_render_mipmap 1
   1904 #endif
   1905 
   1906 /* GL_OES_fragment_precision_high */
   1907 #ifndef GL_OES_fragment_precision_high
   1908 #define GL_OES_fragment_precision_high 1
   1909 #endif
   1910 
   1911 /* GL_OES_get_program_binary */
   1912 #ifndef GL_OES_get_program_binary
   1913 #define GL_OES_get_program_binary 1
   1914 #ifdef GL_GLEXT_PROTOTYPES
   1915 GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
   1916 GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
   1917 #endif
   1918 typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
   1919 typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
   1920 #endif
   1921 
   1922 /* GL_OES_mapbuffer */
   1923 #ifndef GL_OES_mapbuffer
   1924 #define GL_OES_mapbuffer 1
   1925 #ifdef GL_GLEXT_PROTOTYPES
   1926 GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
   1927 GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
   1928 GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
   1929 #endif
   1930 typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
   1931 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
   1932 typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
   1933 #endif
   1934 
   1935 /* GL_OES_packed_depth_stencil */
   1936 #ifndef GL_OES_packed_depth_stencil
   1937 #define GL_OES_packed_depth_stencil 1
   1938 #endif
   1939 
   1940 /* GL_OES_required_internalformat */
   1941 #ifndef GL_OES_required_internalformat
   1942 #define GL_OES_required_internalformat 1
   1943 #endif
   1944 
   1945 /* GL_OES_rgb8_rgba8 */
   1946 #ifndef GL_OES_rgb8_rgba8
   1947 #define GL_OES_rgb8_rgba8 1
   1948 #endif
   1949 
   1950 /* GL_OES_standard_derivatives */
   1951 #ifndef GL_OES_standard_derivatives
   1952 #define GL_OES_standard_derivatives 1
   1953 #endif
   1954 
   1955 /* GL_OES_stencil1 */
   1956 #ifndef GL_OES_stencil1
   1957 #define GL_OES_stencil1 1
   1958 #endif
   1959 
   1960 /* GL_OES_stencil4 */
   1961 #ifndef GL_OES_stencil4
   1962 #define GL_OES_stencil4 1
   1963 #endif
   1964 
   1965 #ifndef GL_OES_surfaceless_context
   1966 #define GL_OES_surfaceless_context 1
   1967 #endif
   1968 
   1969 /* GL_OES_texture_3D */
   1970 #ifndef GL_OES_texture_3D
   1971 #define GL_OES_texture_3D 1
   1972 #ifdef GL_GLEXT_PROTOTYPES
   1973 GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
   1974 GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
   1975 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
   1976 GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
   1977 GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
   1978 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
   1979 #endif
   1980 typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
   1981 typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
   1982 typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
   1983 typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
   1984 typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
   1985 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
   1986 #endif
   1987 
   1988 /* GL_OES_texture_float */
   1989 #ifndef GL_OES_texture_float
   1990 #define GL_OES_texture_float 1
   1991 #endif
   1992 
   1993 /* GL_OES_texture_float_linear */
   1994 #ifndef GL_OES_texture_float_linear
   1995 #define GL_OES_texture_float_linear 1
   1996 #endif
   1997 
   1998 /* GL_OES_texture_half_float */
   1999 #ifndef GL_OES_texture_half_float
   2000 #define GL_OES_texture_half_float 1
   2001 #endif
   2002 
   2003 /* GL_OES_texture_half_float_linear */
   2004 #ifndef GL_OES_texture_half_float_linear
   2005 #define GL_OES_texture_half_float_linear 1
   2006 #endif
   2007 
   2008 /* GL_OES_texture_npot */
   2009 #ifndef GL_OES_texture_npot
   2010 #define GL_OES_texture_npot 1
   2011 #endif
   2012 
   2013 /* GL_OES_vertex_array_object */
   2014 #ifndef GL_OES_vertex_array_object
   2015 #define GL_OES_vertex_array_object 1
   2016 #ifdef GL_GLEXT_PROTOTYPES
   2017 GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
   2018 GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
   2019 GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
   2020 GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
   2021 #endif
   2022 typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
   2023 typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
   2024 typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
   2025 typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
   2026 #endif
   2027 
   2028 /* GL_OES_vertex_half_float */
   2029 #ifndef GL_OES_vertex_half_float
   2030 #define GL_OES_vertex_half_float 1
   2031 #endif
   2032 
   2033 /* GL_OES_vertex_type_10_10_10_2 */
   2034 #ifndef GL_OES_vertex_type_10_10_10_2
   2035 #define GL_OES_vertex_type_10_10_10_2 1
   2036 #endif
   2037 
   2038 /*------------------------------------------------------------------------*
   2039  * KHR extension functions
   2040  *------------------------------------------------------------------------*/
   2041 
   2042 #ifndef GL_KHR_debug
   2043 #define GL_KHR_debug 1
   2044 #ifdef GL_GLEXT_PROTOTYPES
   2045 GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
   2046 GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
   2047 GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
   2048 GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
   2049 GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
   2050 GL_APICALL void GL_APIENTRY glPopDebugGroup (void);
   2051 GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
   2052 GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
   2053 GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
   2054 GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
   2055 GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
   2056 #endif
   2057 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
   2058 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
   2059 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
   2060 typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
   2061 typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
   2062 typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
   2063 typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
   2064 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
   2065 typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
   2066 typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
   2067 typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params);
   2068 #endif
   2069 
   2070 #ifndef GL_KHR_texture_compression_astc_ldr
   2071 #define GL_KHR_texture_compression_astc_ldr 1
   2072 #endif
   2073 
   2074 
   2075 /*------------------------------------------------------------------------*
   2076  * AMD extension functions
   2077  *------------------------------------------------------------------------*/
   2078 
   2079 /* GL_AMD_compressed_3DC_texture */
   2080 #ifndef GL_AMD_compressed_3DC_texture
   2081 #define GL_AMD_compressed_3DC_texture 1
   2082 #endif
   2083 
   2084 /* GL_AMD_compressed_ATC_texture */
   2085 #ifndef GL_AMD_compressed_ATC_texture
   2086 #define GL_AMD_compressed_ATC_texture 1
   2087 #endif
   2088 
   2089 /* AMD_performance_monitor */
   2090 #ifndef GL_AMD_performance_monitor
   2091 #define GL_AMD_performance_monitor 1
   2092 #ifdef GL_GLEXT_PROTOTYPES
   2093 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
   2094 GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
   2095 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
   2096 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
   2097 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
   2098 GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
   2099 GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
   2100 GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
   2101 GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
   2102 GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
   2103 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
   2104 #endif
   2105 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
   2106 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
   2107 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
   2108 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
   2109 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
   2110 typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
   2111 typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
   2112 typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
   2113 typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
   2114 typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
   2115 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
   2116 #endif
   2117 
   2118 /* GL_AMD_program_binary_Z400 */
   2119 #ifndef GL_AMD_program_binary_Z400
   2120 #define GL_AMD_program_binary_Z400 1
   2121 #endif
   2122 
   2123 /*------------------------------------------------------------------------*
   2124  * ANGLE extension functions
   2125  *------------------------------------------------------------------------*/
   2126 
   2127 /* GL_ANGLE_framebuffer_blit */
   2128 #ifndef GL_ANGLE_framebuffer_blit
   2129 #define GL_ANGLE_framebuffer_blit 1
   2130 #ifdef GL_GLEXT_PROTOTYPES
   2131 GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
   2132 #endif
   2133 typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
   2134 #endif
   2135 
   2136 /* GL_ANGLE_framebuffer_multisample */
   2137 #ifndef GL_ANGLE_framebuffer_multisample
   2138 #define GL_ANGLE_framebuffer_multisample 1
   2139 #ifdef GL_GLEXT_PROTOTYPES
   2140 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
   2141 #endif
   2142 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
   2143 #endif
   2144 
   2145 #ifndef GL_ANGLE_instanced_arrays
   2146 #ifdef GL_GLEXT_PROTOTYPES
   2147 GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
   2148 GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
   2149 GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
   2150 #endif
   2151 typedef void (GL_APIENTRYP PFLGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
   2152 typedef void (GL_APIENTRYP PFLGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
   2153 typedef void (GL_APIENTRYP PFLGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
   2154 #endif
   2155 
   2156 /* GL_ANGLE_pack_reverse_row_order */
   2157 #ifndef GL_ANGLE_pack_reverse_row_order
   2158 #define GL_ANGLE_pack_reverse_row_order 1
   2159 #endif
   2160 
   2161 /* GL_ANGLE_texture_compression_dxt3 */
   2162 #ifndef GL_ANGLE_texture_compression_dxt3
   2163 #define GL_ANGLE_texture_compression_dxt3 1
   2164 #endif
   2165 
   2166 /* GL_ANGLE_texture_compression_dxt5 */
   2167 #ifndef GL_ANGLE_texture_compression_dxt5
   2168 #define GL_ANGLE_texture_compression_dxt5 1
   2169 #endif
   2170 
   2171 /* GL_ANGLE_texture_usage */
   2172 #ifndef GL_ANGLE_texture_usage
   2173 #define GL_ANGLE_texture_usage 1
   2174 #endif
   2175 
   2176 #ifndef GL_ANGLE_translated_shader_source
   2177 #define GL_ANGLE_translated_shader_source 1
   2178 #ifdef GL_GLEXT_PROTOTYPES
   2179 GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
   2180 #endif
   2181 typedef void (GL_APIENTRYP PFLGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
   2182 #endif
   2183 
   2184 /*------------------------------------------------------------------------*
   2185  * APPLE extension functions
   2186  *------------------------------------------------------------------------*/
   2187 
   2188 /* GL_APPLE_copy_texture_levels */
   2189 #ifndef GL_APPLE_copy_texture_levels
   2190 #define GL_APPLE_copy_texture_levels 1
   2191 #ifdef GL_GLEXT_PROTOTYPES
   2192 GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
   2193 #endif
   2194 typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
   2195 #endif
   2196 
   2197 /* GL_APPLE_framebuffer_multisample */
   2198 #ifndef GL_APPLE_framebuffer_multisample
   2199 #define GL_APPLE_framebuffer_multisample 1
   2200 #ifdef GL_GLEXT_PROTOTYPES
   2201 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
   2202 GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
   2203 #endif /* GL_GLEXT_PROTOTYPES */
   2204 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
   2205 typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
   2206 #endif
   2207 
   2208 /* GL_APPLE_rgb_422 */
   2209 #ifndef GL_APPLE_rgb_422
   2210 #define GL_APPLE_rgb_422 1
   2211 #endif
   2212 
   2213 /* GL_APPLE_sync */
   2214 #ifndef GL_APPLE_sync
   2215 #define GL_APPLE_sync 1
   2216 #ifdef GL_GLEXT_PROTOTYPES
   2217 GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
   2218 GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
   2219 GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
   2220 GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
   2221 GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
   2222 GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
   2223 GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
   2224 #endif
   2225 typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
   2226 typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
   2227 typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
   2228 typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
   2229 typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
   2230 typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
   2231 typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
   2232 #endif
   2233 
   2234 /* GL_APPLE_texture_format_BGRA8888 */
   2235 #ifndef GL_APPLE_texture_format_BGRA8888
   2236 #define GL_APPLE_texture_format_BGRA8888 1
   2237 #endif
   2238 
   2239 /* GL_APPLE_texture_max_level */
   2240 #ifndef GL_APPLE_texture_max_level
   2241 #define GL_APPLE_texture_max_level 1
   2242 #endif
   2243 
   2244 /*------------------------------------------------------------------------*
   2245  * ARM extension functions
   2246  *------------------------------------------------------------------------*/
   2247 
   2248 /* GL_ARM_mali_program_binary */
   2249 #ifndef GL_ARM_mali_program_binary
   2250 #define GL_ARM_mali_program_binary 1
   2251 #endif
   2252 
   2253 /* GL_ARM_mali_shader_binary */
   2254 #ifndef GL_ARM_mali_shader_binary
   2255 #define GL_ARM_mali_shader_binary 1
   2256 #endif
   2257 
   2258 /* GL_ARM_rgba8 */
   2259 #ifndef GL_ARM_rgba8
   2260 #define GL_ARM_rgba8 1
   2261 #endif
   2262 
   2263 /*------------------------------------------------------------------------*
   2264  * EXT extension functions
   2265  *------------------------------------------------------------------------*/
   2266 
   2267 /* GL_EXT_blend_minmax */
   2268 #ifndef GL_EXT_blend_minmax
   2269 #define GL_EXT_blend_minmax 1
   2270 #endif
   2271 
   2272 /* GL_EXT_color_buffer_half_float */
   2273 #ifndef GL_EXT_color_buffer_half_float
   2274 #define GL_EXT_color_buffer_half_float 1
   2275 #endif
   2276 
   2277 /* GL_EXT_debug_label */
   2278 #ifndef GL_EXT_debug_label
   2279 #define GL_EXT_debug_label 1
   2280 #ifdef GL_GLEXT_PROTOTYPES
   2281 GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
   2282 GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
   2283 #endif
   2284 typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
   2285 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
   2286 #endif
   2287 
   2288 /* GL_EXT_debug_marker */
   2289 #ifndef GL_EXT_debug_marker
   2290 #define GL_EXT_debug_marker 1
   2291 #ifdef GL_GLEXT_PROTOTYPES
   2292 GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
   2293 GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
   2294 GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
   2295 #endif
   2296 typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
   2297 typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
   2298 typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
   2299 #endif
   2300 
   2301 /* GL_EXT_discard_framebuffer */
   2302 #ifndef GL_EXT_discard_framebuffer
   2303 #define GL_EXT_discard_framebuffer 1
   2304 #ifdef GL_GLEXT_PROTOTYPES
   2305 GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
   2306 #endif
   2307 typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
   2308 #endif
   2309 
   2310 /* GL_EXT_map_buffer_range */
   2311 #ifndef GL_EXT_map_buffer_range
   2312 #define GL_EXT_map_buffer_range 1
   2313 #ifdef GL_GLEXT_PROTOTYPES
   2314 GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
   2315 GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
   2316 #endif
   2317 typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
   2318 typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
   2319 #endif
   2320 
   2321 /* GL_EXT_multisampled_render_to_texture */
   2322 #ifndef GL_EXT_multisampled_render_to_texture
   2323 #define GL_EXT_multisampled_render_to_texture 1
   2324 #ifdef GL_GLEXT_PROTOTYPES
   2325 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
   2326 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
   2327 #endif
   2328 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
   2329 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
   2330 #endif
   2331 
   2332 /* GL_EXT_multiview_draw_buffers */
   2333 #ifndef GL_EXT_multiview_draw_buffers
   2334 #define GL_EXT_multiview_draw_buffers 1
   2335 #ifdef GL_GLEXT_PROTOTYPES
   2336 GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
   2337 GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
   2338 GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
   2339 #endif
   2340 typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
   2341 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
   2342 typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
   2343 #endif
   2344 
   2345 #ifndef GL_EXT_multi_draw_arrays
   2346 #define GL_EXT_multi_draw_arrays 1
   2347 #ifdef GL_GLEXT_PROTOTYPES
   2348 GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
   2349 GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
   2350 #endif /* GL_GLEXT_PROTOTYPES */
   2351 typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
   2352 typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
   2353 #endif
   2354 
   2355 /* GL_EXT_occlusion_query_boolean */
   2356 #ifndef GL_EXT_occlusion_query_boolean
   2357 #define GL_EXT_occlusion_query_boolean 1
   2358 #ifdef GL_GLEXT_PROTOTYPES
   2359 GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
   2360 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
   2361 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
   2362 GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
   2363 GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
   2364 GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
   2365 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
   2366 #endif
   2367 typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
   2368 typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
   2369 typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
   2370 typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
   2371 typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
   2372 typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
   2373 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
   2374 #endif
   2375 
   2376 /* GL_EXT_read_format_bgra */
   2377 #ifndef GL_EXT_read_format_bgra
   2378 #define GL_EXT_read_format_bgra 1
   2379 #endif
   2380 
   2381 /* GL_EXT_robustness */
   2382 #ifndef GL_EXT_robustness
   2383 #define GL_EXT_robustness 1
   2384 #ifdef GL_GLEXT_PROTOTYPES
   2385 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
   2386 GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
   2387 GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
   2388 GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
   2389 #endif
   2390 typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
   2391 typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
   2392 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
   2393 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
   2394 #endif
   2395 
   2396 /* GL_EXT_separate_shader_objects */
   2397 #ifndef GL_EXT_separate_shader_objects
   2398 #define GL_EXT_separate_shader_objects 1
   2399 #ifdef GL_GLEXT_PROTOTYPES
   2400 GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
   2401 GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
   2402 GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
   2403 GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
   2404 GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
   2405 GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
   2406 GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
   2407 GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
   2408 GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
   2409 GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
   2410 GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
   2411 GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
   2412 GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
   2413 GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
   2414 GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
   2415 GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
   2416 GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
   2417 GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
   2418 GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
   2419 GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
   2420 GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
   2421 GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2422 GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2423 GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2424 GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2425 GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
   2426 GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
   2427 GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
   2428 GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
   2429 GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
   2430 #endif
   2431 typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
   2432 typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
   2433 typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
   2434 typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
   2435 typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
   2436 typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
   2437 typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
   2438 typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
   2439 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
   2440 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
   2441 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
   2442 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
   2443 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
   2444 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
   2445 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
   2446 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
   2447 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
   2448 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
   2449 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
   2450 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
   2451 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
   2452 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2453 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2454 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2455 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
   2456 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
   2457 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
   2458 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
   2459 typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
   2460 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
   2461 #endif
   2462 
   2463 /* GL_EXT_shader_framebuffer_fetch */
   2464 #ifndef GL_EXT_shader_framebuffer_fetch
   2465 #define GL_EXT_shader_framebuffer_fetch 1
   2466 #endif
   2467 
   2468 /* GL_EXT_shader_texture_lod */
   2469 #ifndef GL_EXT_shader_texture_lod
   2470 #define GL_EXT_shader_texture_lod 1
   2471 #endif
   2472 
   2473 /* GL_EXT_shadow_samplers */
   2474 #ifndef GL_EXT_shadow_samplers
   2475 #define GL_EXT_shadow_samplers 1
   2476 #endif
   2477 
   2478 /* GL_EXT_sRGB */
   2479 #ifndef GL_EXT_sRGB
   2480 #define GL_EXT_sRGB 1
   2481 #endif
   2482 
   2483 /* GL_EXT_texture_compression_dxt1 */
   2484 #ifndef GL_EXT_texture_compression_dxt1
   2485 #define GL_EXT_texture_compression_dxt1 1
   2486 #endif
   2487 
   2488 /* GL_EXT_texture_filter_anisotropic */
   2489 #ifndef GL_EXT_texture_filter_anisotropic
   2490 #define GL_EXT_texture_filter_anisotropic 1
   2491 #endif
   2492 
   2493 /* GL_EXT_texture_format_BGRA8888 */
   2494 #ifndef GL_EXT_texture_format_BGRA8888
   2495 #define GL_EXT_texture_format_BGRA8888 1
   2496 #endif
   2497 
   2498 /* GL_EXT_texture_rg */
   2499 #ifndef GL_EXT_texture_rg
   2500 #define GL_EXT_texture_rg 1
   2501 #endif
   2502 
   2503 /* GL_EXT_texture_storage */
   2504 #ifndef GL_EXT_texture_storage
   2505 #define GL_EXT_texture_storage 1
   2506 #ifdef GL_GLEXT_PROTOTYPES
   2507 GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
   2508 GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
   2509 GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
   2510 GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
   2511 GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
   2512 GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
   2513 #endif
   2514 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
   2515 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
   2516 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
   2517 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
   2518 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
   2519 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
   2520 #endif
   2521 
   2522 /* GL_EXT_texture_type_2_10_10_10_REV */
   2523 #ifndef GL_EXT_texture_type_2_10_10_10_REV
   2524 #define GL_EXT_texture_type_2_10_10_10_REV 1
   2525 #endif
   2526 
   2527 /* GL_EXT_unpack_subimage */
   2528 #ifndef GL_EXT_unpack_subimage
   2529 #define GL_EXT_unpack_subimage 1
   2530 #endif
   2531 
   2532 /*------------------------------------------------------------------------*
   2533  * DMP extension functions
   2534  *------------------------------------------------------------------------*/
   2535 
   2536 /* GL_DMP_shader_binary */
   2537 #ifndef GL_DMP_shader_binary
   2538 #define GL_DMP_shader_binary 1
   2539 #endif
   2540 
   2541 /*------------------------------------------------------------------------*
   2542  * FJ extension functions
   2543  *------------------------------------------------------------------------*/
   2544 
   2545 /* GL_FJ_shader_binary_GCCSO */
   2546 #ifndef GL_FJ_shader_binary_GCCSO
   2547 #define GL_FJ_shader_binary_GCCSO 1
   2548 #endif
   2549 
   2550 /*------------------------------------------------------------------------*
   2551  * IMG extension functions
   2552  *------------------------------------------------------------------------*/
   2553 
   2554 /* GL_IMG_program_binary */
   2555 #ifndef GL_IMG_program_binary
   2556 #define GL_IMG_program_binary 1
   2557 #endif
   2558 
   2559 /* GL_IMG_read_format */
   2560 #ifndef GL_IMG_read_format
   2561 #define GL_IMG_read_format 1
   2562 #endif
   2563 
   2564 /* GL_IMG_shader_binary */
   2565 #ifndef GL_IMG_shader_binary
   2566 #define GL_IMG_shader_binary 1
   2567 #endif
   2568 
   2569 /* GL_IMG_texture_compression_pvrtc */
   2570 #ifndef GL_IMG_texture_compression_pvrtc
   2571 #define GL_IMG_texture_compression_pvrtc 1
   2572 #endif
   2573 
   2574 /* GL_IMG_multisampled_render_to_texture */
   2575 #ifndef GL_IMG_multisampled_render_to_texture
   2576 #define GL_IMG_multisampled_render_to_texture 1
   2577 #ifdef GL_GLEXT_PROTOTYPES
   2578 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
   2579 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
   2580 #endif
   2581 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
   2582 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
   2583 #endif
   2584 
   2585 /*------------------------------------------------------------------------*
   2586  * NV extension functions
   2587  *------------------------------------------------------------------------*/
   2588 
   2589 /* GL_NV_coverage_sample */
   2590 #ifndef GL_NV_coverage_sample
   2591 #define GL_NV_coverage_sample 1
   2592 #ifdef GL_GLEXT_PROTOTYPES
   2593 GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
   2594 GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
   2595 #endif
   2596 typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
   2597 typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
   2598 #endif
   2599 
   2600 /* GL_NV_depth_nonlinear */
   2601 #ifndef GL_NV_depth_nonlinear
   2602 #define GL_NV_depth_nonlinear 1
   2603 #endif
   2604 
   2605 /* GL_NV_draw_buffers */
   2606 #ifndef GL_NV_draw_buffers
   2607 #define GL_NV_draw_buffers 1
   2608 #ifdef GL_GLEXT_PROTOTYPES
   2609 GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
   2610 #endif
   2611 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
   2612 #endif
   2613 
   2614 /* GL_NV_fbo_color_attachments */
   2615 #ifndef GL_NV_fbo_color_attachments
   2616 #define GL_NV_fbo_color_attachments 1
   2617 #endif
   2618 
   2619 /* GL_NV_fence */
   2620 #ifndef GL_NV_fence
   2621 #define GL_NV_fence 1
   2622 #ifdef GL_GLEXT_PROTOTYPES
   2623 GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
   2624 GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
   2625 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
   2626 GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
   2627 GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
   2628 GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
   2629 GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
   2630 #endif
   2631 typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
   2632 typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
   2633 typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
   2634 typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
   2635 typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
   2636 typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
   2637 typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
   2638 #endif
   2639 
   2640 /* GL_NV_read_buffer */
   2641 #ifndef GL_NV_read_buffer
   2642 #define GL_NV_read_buffer 1
   2643 #ifdef GL_GLEXT_PROTOTYPES
   2644 GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
   2645 #endif
   2646 typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
   2647 #endif
   2648 
   2649 /* GL_NV_read_buffer_front */
   2650 #ifndef GL_NV_read_buffer_front
   2651 #define GL_NV_read_buffer_front 1
   2652 #endif
   2653 
   2654 /* GL_NV_read_depth */
   2655 #ifndef GL_NV_read_depth
   2656 #define GL_NV_read_depth 1
   2657 #endif
   2658 
   2659 /* GL_NV_read_depth_stencil */
   2660 #ifndef GL_NV_read_depth_stencil
   2661 #define GL_NV_read_depth_stencil 1
   2662 #endif
   2663 
   2664 /* GL_NV_read_stencil */
   2665 #ifndef GL_NV_read_stencil
   2666 #define GL_NV_read_stencil 1
   2667 #endif
   2668 
   2669 /* GL_NV_texture_compression_s3tc_update */
   2670 #ifndef GL_NV_texture_compression_s3tc_update
   2671 #define GL_NV_texture_compression_s3tc_update 1
   2672 #endif
   2673 
   2674 /* GL_NV_texture_npot_2D_mipmap */
   2675 #ifndef GL_NV_texture_npot_2D_mipmap
   2676 #define GL_NV_texture_npot_2D_mipmap 1
   2677 #endif
   2678 
   2679 /*------------------------------------------------------------------------*
   2680  * QCOM extension functions
   2681  *------------------------------------------------------------------------*/
   2682 
   2683 /* GL_QCOM_alpha_test */
   2684 #ifndef GL_QCOM_alpha_test
   2685 #define GL_QCOM_alpha_test 1
   2686 #ifdef GL_GLEXT_PROTOTYPES
   2687 GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
   2688 #endif
   2689 typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
   2690 #endif
   2691 
   2692 /* GL_QCOM_binning_control */
   2693 #ifndef GL_QCOM_binning_control
   2694 #define GL_QCOM_binning_control 1
   2695 #endif
   2696 
   2697 /* GL_QCOM_driver_control */
   2698 #ifndef GL_QCOM_driver_control
   2699 #define GL_QCOM_driver_control 1
   2700 #ifdef GL_GLEXT_PROTOTYPES
   2701 GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
   2702 GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
   2703 GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
   2704 GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
   2705 #endif
   2706 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
   2707 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
   2708 typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
   2709 typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
   2710 #endif
   2711 
   2712 /* GL_QCOM_extended_get */
   2713 #ifndef GL_QCOM_extended_get
   2714 #define GL_QCOM_extended_get 1
   2715 #ifdef GL_GLEXT_PROTOTYPES
   2716 GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
   2717 GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
   2718 GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
   2719 GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
   2720 GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
   2721 GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
   2722 GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
   2723 GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
   2724 #endif
   2725 typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
   2726 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
   2727 typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
   2728 typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
   2729 typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
   2730 typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
   2731 typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
   2732 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
   2733 #endif
   2734 
   2735 /* GL_QCOM_extended_get2 */
   2736 #ifndef GL_QCOM_extended_get2
   2737 #define GL_QCOM_extended_get2 1
   2738 #ifdef GL_GLEXT_PROTOTYPES
   2739 GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
   2740 GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
   2741 GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
   2742 GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
   2743 #endif
   2744 typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
   2745 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
   2746 typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
   2747 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
   2748 #endif
   2749 
   2750 /* GL_QCOM_perfmon_global_mode */
   2751 #ifndef GL_QCOM_perfmon_global_mode
   2752 #define GL_QCOM_perfmon_global_mode 1
   2753 #endif
   2754 
   2755 /* GL_QCOM_writeonly_rendering */
   2756 #ifndef GL_QCOM_writeonly_rendering
   2757 #define GL_QCOM_writeonly_rendering 1
   2758 #endif
   2759 
   2760 /* GL_QCOM_tiled_rendering */
   2761 #ifndef GL_QCOM_tiled_rendering
   2762 #define GL_QCOM_tiled_rendering 1
   2763 #ifdef GL_GLEXT_PROTOTYPES
   2764 GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
   2765 GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
   2766 #endif
   2767 typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
   2768 typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
   2769 #endif
   2770 
   2771 /*------------------------------------------------------------------------*
   2772  * VIV extension tokens
   2773  *------------------------------------------------------------------------*/
   2774 
   2775 /* GL_VIV_shader_binary */
   2776 #ifndef GL_VIV_shader_binary
   2777 #define GL_VIV_shader_binary 1
   2778 #endif
   2779 
   2780 #ifdef __cplusplus
   2781 }
   2782 #endif
   2783 
   2784 #endif /* __gl2ext_h_ */
   2785 
   2786 #endif /* _MSC_VER */
   2787 
   2788 #ifndef APIENTRY
   2789 #define APIENTRY GL_APIENTRY
   2790 #endif
   2791