include/SDL_opengles2.h
author Gabriel Jacobo <gabomdq@gmail.com>
Sat, 10 May 2014 17:00:37 -0300
changeset 8767 8719af30db6b
parent 8583 fb2933ca805f
child 8806 1a413cfc6ab7
permissions -rw-r--r--
Include gl2platform.h in SDL_opengles2.h so we play nice with GLEW.

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