include/SDL_opengles.h
author Mike Gorchak <lestat@i.com.ua>
Wed, 06 May 2009 07:00:32 +0000
changeset 3117 39da34152ad6
parent 3099 82e60908fab1
child 3118 5ba12c32ac6a
permissions -rw-r--r--
Added _OES suffix for GL_OES_vertex_buffer_object extension for OpenGL ES.
     1 /*
     2  SDL - Simple DirectMedia Layer
     3  Copyright (C) 1997-2009 Sam Lantinga
     4  
     5  This library is free software; you can redistribute it and/or
     6  modify it under the terms of the GNU Lesser General Public
     7  License as published by the Free Software Foundation; either
     8  version 2.1 of the License, or (at your option) any later version.
     9  
    10  This library is distributed in the hope that it will be useful,
    11  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13  Lesser General Public License for more details.
    14  
    15  You should have received a copy of the GNU Lesser General Public
    16  License along with this library; if not, write to the Free Software
    17  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18  
    19  Sam Lantinga
    20  slouken@libsdl.org
    21  */
    22 
    23 /*
    24 	This is a simple file to encapsulate the OpenGL ES API headers.
    25 	Headers copied from The Kronos Group website.
    26 	http://www.khronos.org/opengles/
    27  */
    28 
    29 #ifndef __gles_h_
    30 #define __gles_h_
    31 
    32 /* $Id: gl.h 4533 2007-11-26 11:19:35Z markc $ */
    33 
    34 #ifdef __cplusplus
    35 extern "C"
    36 {
    37 #endif
    38 
    39 #ifdef __IPHONEOS__
    40 #include <OpenGLES/ES1/gl.h>    /* Header File For The OpenGL ES Library */
    41 #endif
    42 
    43 #ifndef APIENTRY
    44 #define APIENTRY
    45 #endif
    46 
    47 #ifndef GL_APIENTRY
    48 #define GL_APIENTRY
    49 #endif
    50 
    51 #ifndef GL_API
    52 #define GL_API
    53 #endif /* GL_API */
    54 
    55 /*
    56 ** License Applicability. Except to the extent portions of this file are
    57 ** made subject to an alternative license as permitted in the SGI Free
    58 ** Software License B, Version 1.0 (the "License"), the contents of this
    59 ** file are subject only to the provisions of the License. You may not use
    60 ** this file except in compliance with the License. You may obtain a copy
    61 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
    62 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
    63 **
    64 ** http://oss.sgi.com/projects/FreeB
    65 **
    66 ** Note that, as provided in the License, the Software is distributed on an
    67 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
    68 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
    69 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
    70 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
    71 **
    72 ** Original Code. The Original Code is: OpenGL Sample Implementation,
    73 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
    74 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
    75 ** Copyright in any portions created by third parties is as indicated
    76 ** elsewhere herein. All Rights Reserved.
    77 **
    78 ** Additional Notice Provisions: The application programming interfaces
    79 ** established by SGI in conjunction with the Original Code are The
    80 ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
    81 ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
    82 ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
    83 ** Window System(R) (Version 1.3), released October 19, 1998. This software
    84 ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
    85 ** published by SGI, but has not been independently verified as being
    86 ** compliant with the OpenGL(R) version 1.2.1 Specification.
    87 */
    88 
    89     typedef unsigned int GLenum;
    90     typedef unsigned char GLboolean;
    91     typedef unsigned int GLbitfield;
    92     typedef signed char GLbyte;
    93     typedef short GLshort;
    94     typedef int GLint;
    95     typedef int GLsizei;
    96     typedef unsigned char GLubyte;
    97     typedef unsigned short GLushort;
    98     typedef unsigned int GLuint;
    99     typedef float GLfloat;
   100     typedef float GLclampf;
   101     typedef void GLvoid;
   102     typedef int GLfixed;
   103     typedef int GLclampx;
   104 
   105     typedef int GLintptr;
   106     typedef int GLsizeiptr;
   107 
   108 
   109 /*************************************************************/
   110 
   111 /* OpenGL ES core versions */
   112 #define GL_VERSION_ES_CM_1_0		  1
   113 #define GL_VERSION_ES_CL_1_0		  1
   114 #define GL_VERSION_ES_CM_1_1		  1
   115 #define GL_VERSION_ES_CL_1_1		  1
   116 
   117 /* ClearBufferMask */
   118 #define GL_DEPTH_BUFFER_BIT               0x00000100
   119 #define GL_STENCIL_BUFFER_BIT             0x00000400
   120 #define GL_COLOR_BUFFER_BIT               0x00004000
   121 
   122 /* Boolean */
   123 #define GL_FALSE                          0
   124 #define GL_TRUE                           1
   125 
   126 /* BeginMode */
   127 #define GL_POINTS                         0x0000
   128 #define GL_LINES                          0x0001
   129 #define GL_LINE_LOOP                      0x0002
   130 #define GL_LINE_STRIP                     0x0003
   131 #define GL_TRIANGLES                      0x0004
   132 #define GL_TRIANGLE_STRIP                 0x0005
   133 #define GL_TRIANGLE_FAN                   0x0006
   134 
   135 /* AlphaFunction */
   136 #define GL_NEVER                          0x0200
   137 #define GL_LESS                           0x0201
   138 #define GL_EQUAL                          0x0202
   139 #define GL_LEQUAL                         0x0203
   140 #define GL_GREATER                        0x0204
   141 #define GL_NOTEQUAL                       0x0205
   142 #define GL_GEQUAL                         0x0206
   143 #define GL_ALWAYS                         0x0207
   144 
   145 /* BlendingFactorDest */
   146 #define GL_ZERO                           0
   147 #define GL_ONE                            1
   148 #define GL_SRC_COLOR                      0x0300
   149 #define GL_ONE_MINUS_SRC_COLOR            0x0301
   150 #define GL_SRC_ALPHA                      0x0302
   151 #define GL_ONE_MINUS_SRC_ALPHA            0x0303
   152 #define GL_DST_ALPHA                      0x0304
   153 #define GL_ONE_MINUS_DST_ALPHA            0x0305
   154 
   155 /* BlendingFactorSrc */
   156 /*      GL_ZERO */
   157 /*      GL_ONE */
   158 #define GL_DST_COLOR                      0x0306
   159 #define GL_ONE_MINUS_DST_COLOR            0x0307
   160 #define GL_SRC_ALPHA_SATURATE             0x0308
   161 /*      GL_SRC_ALPHA */
   162 /*      GL_ONE_MINUS_SRC_ALPHA */
   163 /*      GL_DST_ALPHA */
   164 /*      GL_ONE_MINUS_DST_ALPHA */
   165 
   166 /* ClipPlaneName */
   167 #define GL_CLIP_PLANE0                    0x3000
   168 #define GL_CLIP_PLANE1                    0x3001
   169 #define GL_CLIP_PLANE2                    0x3002
   170 #define GL_CLIP_PLANE3                    0x3003
   171 #define GL_CLIP_PLANE4                    0x3004
   172 #define GL_CLIP_PLANE5                    0x3005
   173 
   174 /* ColorMaterialFace */
   175 /*      GL_FRONT_AND_BACK */
   176 
   177 /* ColorMaterialParameter */
   178 /*      GL_AMBIENT_AND_DIFFUSE */
   179 
   180 /* ColorPointerType */
   181 /*      GL_UNSIGNED_BYTE */
   182 /*      GL_FLOAT */
   183 /*      GL_FIXED */
   184 
   185 /* CullFaceMode */
   186 #define GL_FRONT                          0x0404
   187 #define GL_BACK                           0x0405
   188 #define GL_FRONT_AND_BACK                 0x0408
   189 
   190 /* DepthFunction */
   191 /*      GL_NEVER */
   192 /*      GL_LESS */
   193 /*      GL_EQUAL */
   194 /*      GL_LEQUAL */
   195 /*      GL_GREATER */
   196 /*      GL_NOTEQUAL */
   197 /*      GL_GEQUAL */
   198 /*      GL_ALWAYS */
   199 
   200 /* EnableCap */
   201 #define GL_FOG                            0x0B60
   202 #define GL_LIGHTING                       0x0B50
   203 #define GL_TEXTURE_2D                     0x0DE1
   204 #define GL_CULL_FACE                      0x0B44
   205 #define GL_ALPHA_TEST                     0x0BC0
   206 #define GL_BLEND                          0x0BE2
   207 #define GL_COLOR_LOGIC_OP                 0x0BF2
   208 #define GL_DITHER                         0x0BD0
   209 #define GL_STENCIL_TEST                   0x0B90
   210 #define GL_DEPTH_TEST                     0x0B71
   211 /*      GL_LIGHT0 */
   212 /*      GL_LIGHT1 */
   213 /*      GL_LIGHT2 */
   214 /*      GL_LIGHT3 */
   215 /*      GL_LIGHT4 */
   216 /*      GL_LIGHT5 */
   217 /*      GL_LIGHT6 */
   218 /*      GL_LIGHT7 */
   219 #define GL_POINT_SMOOTH                   0x0B10
   220 #define GL_LINE_SMOOTH                    0x0B20
   221 #define GL_SCISSOR_TEST                   0x0C11
   222 #define GL_COLOR_MATERIAL                 0x0B57
   223 #define GL_NORMALIZE                      0x0BA1
   224 #define GL_RESCALE_NORMAL                 0x803A
   225 #define GL_POLYGON_OFFSET_FILL            0x8037
   226 #define GL_VERTEX_ARRAY                   0x8074
   227 #define GL_NORMAL_ARRAY                   0x8075
   228 #define GL_COLOR_ARRAY                    0x8076
   229 #define GL_TEXTURE_COORD_ARRAY            0x8078
   230 #define GL_MULTISAMPLE                    0x809D
   231 #define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
   232 #define GL_SAMPLE_ALPHA_TO_ONE            0x809F
   233 #define GL_SAMPLE_COVERAGE                0x80A0
   234 
   235 /* ErrorCode */
   236 #define GL_NO_ERROR                       0
   237 #define GL_INVALID_ENUM                   0x0500
   238 #define GL_INVALID_VALUE                  0x0501
   239 #define GL_INVALID_OPERATION              0x0502
   240 #define GL_STACK_OVERFLOW                 0x0503
   241 #define GL_STACK_UNDERFLOW                0x0504
   242 #define GL_OUT_OF_MEMORY                  0x0505
   243 
   244 /* FogMode */
   245 /*      GL_LINEAR */
   246 #define GL_EXP                            0x0800
   247 #define GL_EXP2                           0x0801
   248 
   249 /* FogParameter */
   250 #define GL_FOG_DENSITY                    0x0B62
   251 #define GL_FOG_START                      0x0B63
   252 #define GL_FOG_END                        0x0B64
   253 #define GL_FOG_MODE                       0x0B65
   254 #define GL_FOG_COLOR                      0x0B66
   255 
   256 /* FrontFaceDirection */
   257 #define GL_CW                             0x0900
   258 #define GL_CCW                            0x0901
   259 
   260 /* GetPName */
   261 #define GL_CURRENT_COLOR                  0x0B00
   262 #define GL_CURRENT_NORMAL                 0x0B02
   263 #define GL_CURRENT_TEXTURE_COORDS         0x0B03
   264 #define GL_POINT_SIZE                     0x0B11
   265 #define GL_POINT_SIZE_MIN                 0x8126
   266 #define GL_POINT_SIZE_MAX                 0x8127
   267 #define GL_POINT_FADE_THRESHOLD_SIZE      0x8128
   268 #define GL_POINT_DISTANCE_ATTENUATION     0x8129
   269 #define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12
   270 #define GL_LINE_WIDTH                     0x0B21
   271 #define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22
   272 #define GL_ALIASED_POINT_SIZE_RANGE       0x846D
   273 #define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
   274 #define GL_CULL_FACE_MODE                 0x0B45
   275 #define GL_FRONT_FACE                     0x0B46
   276 #define GL_SHADE_MODEL                    0x0B54
   277 #define GL_DEPTH_RANGE                    0x0B70
   278 #define GL_DEPTH_WRITEMASK                0x0B72
   279 #define GL_DEPTH_CLEAR_VALUE              0x0B73
   280 #define GL_DEPTH_FUNC                     0x0B74
   281 #define GL_STENCIL_CLEAR_VALUE            0x0B91
   282 #define GL_STENCIL_FUNC                   0x0B92
   283 #define GL_STENCIL_VALUE_MASK             0x0B93
   284 #define GL_STENCIL_FAIL                   0x0B94
   285 #define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
   286 #define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
   287 #define GL_STENCIL_REF                    0x0B97
   288 #define GL_STENCIL_WRITEMASK              0x0B98
   289 #define GL_MATRIX_MODE                    0x0BA0
   290 #define GL_VIEWPORT                       0x0BA2
   291 #define GL_MODELVIEW_STACK_DEPTH          0x0BA3
   292 #define GL_PROJECTION_STACK_DEPTH         0x0BA4
   293 #define GL_TEXTURE_STACK_DEPTH            0x0BA5
   294 #define GL_MODELVIEW_MATRIX               0x0BA6
   295 #define GL_PROJECTION_MATRIX              0x0BA7
   296 #define GL_TEXTURE_MATRIX                 0x0BA8
   297 #define GL_ALPHA_TEST_FUNC                0x0BC1
   298 #define GL_ALPHA_TEST_REF                 0x0BC2
   299 #define GL_BLEND_DST                      0x0BE0
   300 #define GL_BLEND_SRC                      0x0BE1
   301 #define GL_LOGIC_OP_MODE                  0x0BF0
   302 #define GL_SCISSOR_BOX                    0x0C10
   303 #define GL_SCISSOR_TEST                   0x0C11
   304 #define GL_COLOR_CLEAR_VALUE              0x0C22
   305 #define GL_COLOR_WRITEMASK                0x0C23
   306 #define GL_UNPACK_ALIGNMENT               0x0CF5
   307 #define GL_PACK_ALIGNMENT                 0x0D05
   308 #define GL_MAX_LIGHTS                     0x0D31
   309 #define GL_MAX_CLIP_PLANES                0x0D32
   310 #define GL_MAX_TEXTURE_SIZE               0x0D33
   311 #define GL_MAX_MODELVIEW_STACK_DEPTH      0x0D36
   312 #define GL_MAX_PROJECTION_STACK_DEPTH     0x0D38
   313 #define GL_MAX_TEXTURE_STACK_DEPTH        0x0D39
   314 #define GL_MAX_VIEWPORT_DIMS              0x0D3A
   315 #define GL_MAX_TEXTURE_UNITS              0x84E2
   316 #define GL_SUBPIXEL_BITS                  0x0D50
   317 #define GL_RED_BITS                       0x0D52
   318 #define GL_GREEN_BITS                     0x0D53
   319 #define GL_BLUE_BITS                      0x0D54
   320 #define GL_ALPHA_BITS                     0x0D55
   321 #define GL_DEPTH_BITS                     0x0D56
   322 #define GL_STENCIL_BITS                   0x0D57
   323 #define GL_POLYGON_OFFSET_UNITS           0x2A00
   324 #define GL_POLYGON_OFFSET_FILL            0x8037
   325 #define GL_POLYGON_OFFSET_FACTOR          0x8038
   326 #define GL_TEXTURE_BINDING_2D             0x8069
   327 #define GL_VERTEX_ARRAY_SIZE              0x807A
   328 #define GL_VERTEX_ARRAY_TYPE              0x807B
   329 #define GL_VERTEX_ARRAY_STRIDE            0x807C
   330 #define GL_NORMAL_ARRAY_TYPE              0x807E
   331 #define GL_NORMAL_ARRAY_STRIDE            0x807F
   332 #define GL_COLOR_ARRAY_SIZE               0x8081
   333 #define GL_COLOR_ARRAY_TYPE               0x8082
   334 #define GL_COLOR_ARRAY_STRIDE             0x8083
   335 #define GL_TEXTURE_COORD_ARRAY_SIZE       0x8088
   336 #define GL_TEXTURE_COORD_ARRAY_TYPE       0x8089
   337 #define GL_TEXTURE_COORD_ARRAY_STRIDE     0x808A
   338 #define GL_VERTEX_ARRAY_POINTER           0x808E
   339 #define GL_NORMAL_ARRAY_POINTER           0x808F
   340 #define GL_COLOR_ARRAY_POINTER            0x8090
   341 #define GL_TEXTURE_COORD_ARRAY_POINTER    0x8092
   342 #define GL_SAMPLE_BUFFERS                 0x80A8
   343 #define GL_SAMPLES                        0x80A9
   344 #define GL_SAMPLE_COVERAGE_VALUE          0x80AA
   345 #define GL_SAMPLE_COVERAGE_INVERT         0x80AB
   346 
   347 /* GetTextureParameter */
   348 /*      GL_TEXTURE_MAG_FILTER */
   349 /*      GL_TEXTURE_MIN_FILTER */
   350 /*      GL_TEXTURE_WRAP_S */
   351 /*      GL_TEXTURE_WRAP_T */
   352 
   353 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
   354 #define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
   355 
   356 /* HintMode */
   357 #define GL_DONT_CARE                      0x1100
   358 #define GL_FASTEST                        0x1101
   359 #define GL_NICEST                         0x1102
   360 
   361 /* HintTarget */
   362 #define GL_PERSPECTIVE_CORRECTION_HINT    0x0C50
   363 #define GL_POINT_SMOOTH_HINT              0x0C51
   364 #define GL_LINE_SMOOTH_HINT               0x0C52
   365 #define GL_FOG_HINT                       0x0C54
   366 #define GL_GENERATE_MIPMAP_HINT           0x8192
   367 
   368 /* LightModelParameter */
   369 #define GL_LIGHT_MODEL_AMBIENT            0x0B53
   370 #define GL_LIGHT_MODEL_TWO_SIDE           0x0B52
   371 
   372 /* LightParameter */
   373 #define GL_AMBIENT                        0x1200
   374 #define GL_DIFFUSE                        0x1201
   375 #define GL_SPECULAR                       0x1202
   376 #define GL_POSITION                       0x1203
   377 #define GL_SPOT_DIRECTION                 0x1204
   378 #define GL_SPOT_EXPONENT                  0x1205
   379 #define GL_SPOT_CUTOFF                    0x1206
   380 #define GL_CONSTANT_ATTENUATION           0x1207
   381 #define GL_LINEAR_ATTENUATION             0x1208
   382 #define GL_QUADRATIC_ATTENUATION          0x1209
   383 
   384 /* DataType */
   385 #define GL_BYTE                           0x1400
   386 #define GL_UNSIGNED_BYTE                  0x1401
   387 #define GL_SHORT                          0x1402
   388 #define GL_UNSIGNED_SHORT                 0x1403
   389 #define GL_FLOAT                          0x1406
   390 #define GL_FIXED                          0x140C
   391 
   392 /* LogicOp */
   393 #define GL_CLEAR                          0x1500
   394 #define GL_AND                            0x1501
   395 #define GL_AND_REVERSE                    0x1502
   396 #define GL_COPY                           0x1503
   397 #define GL_AND_INVERTED                   0x1504
   398 #define GL_NOOP                           0x1505
   399 #define GL_XOR                            0x1506
   400 #define GL_OR                             0x1507
   401 #define GL_NOR                            0x1508
   402 #define GL_EQUIV                          0x1509
   403 #define GL_INVERT                         0x150A
   404 #define GL_OR_REVERSE                     0x150B
   405 #define GL_COPY_INVERTED                  0x150C
   406 #define GL_OR_INVERTED                    0x150D
   407 #define GL_NAND                           0x150E
   408 #define GL_SET                            0x150F
   409 
   410 /* MaterialFace */
   411 /*      GL_FRONT_AND_BACK */
   412 
   413 /* MaterialParameter */
   414 #define GL_EMISSION                       0x1600
   415 #define GL_SHININESS                      0x1601
   416 #define GL_AMBIENT_AND_DIFFUSE            0x1602
   417 /*      GL_AMBIENT */
   418 /*      GL_DIFFUSE */
   419 /*      GL_SPECULAR */
   420 
   421 /* MatrixMode */
   422 #define GL_MODELVIEW                      0x1700
   423 #define GL_PROJECTION                     0x1701
   424 #define GL_TEXTURE                        0x1702
   425 
   426 /* NormalPointerType */
   427 /*      GL_BYTE */
   428 /*      GL_SHORT */
   429 /*      GL_FLOAT */
   430 /*      GL_FIXED */
   431 
   432 /* PixelFormat */
   433 #define GL_ALPHA                          0x1906
   434 #define GL_RGB                            0x1907
   435 #define GL_RGBA                           0x1908
   436 #define GL_LUMINANCE                      0x1909
   437 #define GL_LUMINANCE_ALPHA                0x190A
   438 
   439 /* PixelStoreParameter */
   440 #define GL_UNPACK_ALIGNMENT               0x0CF5
   441 #define GL_PACK_ALIGNMENT                 0x0D05
   442 
   443 /* PixelType */
   444 /*      GL_UNSIGNED_BYTE */
   445 #define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
   446 #define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
   447 #define GL_UNSIGNED_SHORT_5_6_5           0x8363
   448 
   449 /* ShadingModel */
   450 #define GL_FLAT                           0x1D00
   451 #define GL_SMOOTH                         0x1D01
   452 
   453 /* StencilFunction */
   454 /*      GL_NEVER */
   455 /*      GL_LESS */
   456 /*      GL_EQUAL */
   457 /*      GL_LEQUAL */
   458 /*      GL_GREATER */
   459 /*      GL_NOTEQUAL */
   460 /*      GL_GEQUAL */
   461 /*      GL_ALWAYS */
   462 
   463 /* StencilOp */
   464 /*      GL_ZERO */
   465 #define GL_KEEP                           0x1E00
   466 #define GL_REPLACE                        0x1E01
   467 #define GL_INCR                           0x1E02
   468 #define GL_DECR                           0x1E03
   469 /*      GL_INVERT */
   470 
   471 /* StringName */
   472 #define GL_VENDOR                         0x1F00
   473 #define GL_RENDERER                       0x1F01
   474 #define GL_VERSION                        0x1F02
   475 #define GL_EXTENSIONS                     0x1F03
   476 
   477 /* TexCoordPointerType */
   478 /*      GL_SHORT */
   479 /*      GL_FLOAT */
   480 /*      GL_FIXED */
   481 /*      GL_BYTE */
   482 
   483 /* TextureEnvMode */
   484 #define GL_MODULATE                       0x2100
   485 #define GL_DECAL                          0x2101
   486 /*      GL_BLEND */
   487 #define GL_ADD                            0x0104
   488 /*      GL_REPLACE */
   489 
   490 /* TextureEnvParameter */
   491 #define GL_TEXTURE_ENV_MODE               0x2200
   492 #define GL_TEXTURE_ENV_COLOR              0x2201
   493 
   494 /* TextureEnvTarget */
   495 #define GL_TEXTURE_ENV                    0x2300
   496 
   497 /* TextureMagFilter */
   498 #define GL_NEAREST                        0x2600
   499 #define GL_LINEAR                         0x2601
   500 
   501 /* TextureMinFilter */
   502 /*      GL_NEAREST */
   503 /*      GL_LINEAR */
   504 #define GL_NEAREST_MIPMAP_NEAREST         0x2700
   505 #define GL_LINEAR_MIPMAP_NEAREST          0x2701
   506 #define GL_NEAREST_MIPMAP_LINEAR          0x2702
   507 #define GL_LINEAR_MIPMAP_LINEAR           0x2703
   508 
   509 /* TextureParameterName */
   510 #define GL_TEXTURE_MAG_FILTER             0x2800
   511 #define GL_TEXTURE_MIN_FILTER             0x2801
   512 #define GL_TEXTURE_WRAP_S                 0x2802
   513 #define GL_TEXTURE_WRAP_T                 0x2803
   514 #define GL_GENERATE_MIPMAP                0x8191
   515 
   516 /* TextureTarget */
   517 /*      GL_TEXTURE_2D */
   518 
   519 /* TextureUnit */
   520 #define GL_TEXTURE0                       0x84C0
   521 #define GL_TEXTURE1                       0x84C1
   522 #define GL_TEXTURE2                       0x84C2
   523 #define GL_TEXTURE3                       0x84C3
   524 #define GL_TEXTURE4                       0x84C4
   525 #define GL_TEXTURE5                       0x84C5
   526 #define GL_TEXTURE6                       0x84C6
   527 #define GL_TEXTURE7                       0x84C7
   528 #define GL_TEXTURE8                       0x84C8
   529 #define GL_TEXTURE9                       0x84C9
   530 #define GL_TEXTURE10                      0x84CA
   531 #define GL_TEXTURE11                      0x84CB
   532 #define GL_TEXTURE12                      0x84CC
   533 #define GL_TEXTURE13                      0x84CD
   534 #define GL_TEXTURE14                      0x84CE
   535 #define GL_TEXTURE15                      0x84CF
   536 #define GL_TEXTURE16                      0x84D0
   537 #define GL_TEXTURE17                      0x84D1
   538 #define GL_TEXTURE18                      0x84D2
   539 #define GL_TEXTURE19                      0x84D3
   540 #define GL_TEXTURE20                      0x84D4
   541 #define GL_TEXTURE21                      0x84D5
   542 #define GL_TEXTURE22                      0x84D6
   543 #define GL_TEXTURE23                      0x84D7
   544 #define GL_TEXTURE24                      0x84D8
   545 #define GL_TEXTURE25                      0x84D9
   546 #define GL_TEXTURE26                      0x84DA
   547 #define GL_TEXTURE27                      0x84DB
   548 #define GL_TEXTURE28                      0x84DC
   549 #define GL_TEXTURE29                      0x84DD
   550 #define GL_TEXTURE30                      0x84DE
   551 #define GL_TEXTURE31                      0x84DF
   552 #define GL_ACTIVE_TEXTURE                 0x84E0
   553 #define GL_CLIENT_ACTIVE_TEXTURE          0x84E1
   554 
   555 /* TextureWrapMode */
   556 #define GL_REPEAT                         0x2901
   557 #define GL_CLAMP_TO_EDGE                  0x812F
   558 
   559 /* VertexPointerType */
   560 /*      GL_SHORT */
   561 /*      GL_FLOAT */
   562 /*      GL_FIXED */
   563 /*      GL_BYTE */
   564 
   565 /* LightName */
   566 #define GL_LIGHT0                         0x4000
   567 #define GL_LIGHT1                         0x4001
   568 #define GL_LIGHT2                         0x4002
   569 #define GL_LIGHT3                         0x4003
   570 #define GL_LIGHT4                         0x4004
   571 #define GL_LIGHT5                         0x4005
   572 #define GL_LIGHT6                         0x4006
   573 #define GL_LIGHT7                         0x4007
   574 
   575 /* Buffer Objects */
   576 #define GL_ARRAY_BUFFER                   0x8892
   577 #define GL_ELEMENT_ARRAY_BUFFER           0x8893
   578 
   579 #define GL_ARRAY_BUFFER_BINDING               0x8894
   580 #define GL_ELEMENT_ARRAY_BUFFER_BINDING       0x8895
   581 #define GL_VERTEX_ARRAY_BUFFER_BINDING        0x8896
   582 #define GL_NORMAL_ARRAY_BUFFER_BINDING        0x8897
   583 #define GL_COLOR_ARRAY_BUFFER_BINDING         0x8898
   584 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
   585 
   586 #define GL_STATIC_DRAW                    0x88E4
   587 #define GL_DYNAMIC_DRAW                   0x88E8
   588 
   589 #define GL_BUFFER_SIZE                    0x8764
   590 #define GL_BUFFER_USAGE                   0x8765
   591 
   592 /* Texture combine + dot3 */
   593 #define GL_SUBTRACT                       0x84E7
   594 #define GL_COMBINE                        0x8570
   595 #define GL_COMBINE_RGB                    0x8571
   596 #define GL_COMBINE_ALPHA                  0x8572
   597 #define GL_RGB_SCALE                      0x8573
   598 #define GL_ADD_SIGNED                     0x8574
   599 #define GL_INTERPOLATE                    0x8575
   600 #define GL_CONSTANT                       0x8576
   601 #define GL_PRIMARY_COLOR                  0x8577
   602 #define GL_PREVIOUS                       0x8578
   603 #define GL_OPERAND0_RGB                   0x8590
   604 #define GL_OPERAND1_RGB                   0x8591
   605 #define GL_OPERAND2_RGB                   0x8592
   606 #define GL_OPERAND0_ALPHA                 0x8598
   607 #define GL_OPERAND1_ALPHA                 0x8599
   608 #define GL_OPERAND2_ALPHA                 0x859A
   609 
   610 #define GL_ALPHA_SCALE                    0x0D1C
   611 
   612 #define GL_SRC0_RGB                       0x8580
   613 #define GL_SRC1_RGB                       0x8581
   614 #define GL_SRC2_RGB                       0x8582
   615 #define GL_SRC0_ALPHA                     0x8588
   616 #define GL_SRC1_ALPHA                     0x8589
   617 #define GL_SRC2_ALPHA                     0x858A
   618 
   619 #define GL_DOT3_RGB                       0x86AE
   620 #define GL_DOT3_RGBA                      0x86AF
   621 
   622 /*------------------------------------------------------------------------*
   623  * required OES extension tokens
   624  *------------------------------------------------------------------------*/
   625 
   626 /* OES_read_format */
   627 #ifndef GL_OES_read_format
   628 #define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES                   0x8B9A
   629 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES                 0x8B9B
   630 #endif
   631 
   632 /* GL_OES_compressed_paletted_texture */
   633 #ifndef GL_OES_compressed_paletted_texture
   634 #define GL_PALETTE4_RGB8_OES                                    0x8B90
   635 #define GL_PALETTE4_RGBA8_OES                                   0x8B91
   636 #define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
   637 #define GL_PALETTE4_RGBA4_OES                                   0x8B93
   638 #define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
   639 #define GL_PALETTE8_RGB8_OES                                    0x8B95
   640 #define GL_PALETTE8_RGBA8_OES                                   0x8B96
   641 #define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
   642 #define GL_PALETTE8_RGBA4_OES                                   0x8B98
   643 #define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
   644 #endif
   645 
   646 /* OES_point_size_array */
   647 #ifndef GL_OES_point_size_array
   648 #define GL_POINT_SIZE_ARRAY_OES                                 0x8B9C
   649 #define GL_POINT_SIZE_ARRAY_TYPE_OES                            0x898A
   650 #define GL_POINT_SIZE_ARRAY_STRIDE_OES                          0x898B
   651 #define GL_POINT_SIZE_ARRAY_POINTER_OES                         0x898C
   652 #define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES                  0x8B9F
   653 #endif
   654 
   655 /* GL_OES_point_sprite */
   656 #ifndef GL_OES_point_sprite
   657 #define GL_POINT_SPRITE_OES                                     0x8861
   658 #define GL_COORD_REPLACE_OES                                    0x8862
   659 #endif
   660 
   661 /* GL_OES_draw_texture */
   662 #ifndef GL_OES_draw_texture
   663 #define GL_TEXTURE_CROP_RECT_OES                                0x8B9D
   664 #endif /* GL_OES_draw_texture */
   665 
   666 /*  GL_OES_vertex_buffer_object */
   667 #ifndef GL_OES_vertex_buffer_object
   668 #define GL_ARRAY_BUFFER_OES                                     0x8892
   669 #define GL_ELEMENT_ARRAY_BUFFER_OES                             0x8893
   670 #define GL_ARRAY_BUFFER_BINDING_OES                             0x8894
   671 #define GL_ELEMENT_ARRAY_BUFFER_BINDING_OES                     0x8895
   672 #define GL_VERTEX_ARRAY_BUFFER_BINDING_OES                      0x8896
   673 #define GL_NORMAL_ARRAY_BUFFER_BINDING_OES                      0x8897
   674 #define GL_COLOR_ARRAY_BUFFER_BINDING_OES                       0x8898
   675 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_OES               0x889A
   676 #define GL_STATIC_DRAW_OES                                      0x88E4
   677 #define GL_DYNAMIC_DRAW_OES                                     0x88E8
   678 #define GL_WRITE_ONLY_OES                                       0x88B9
   679 #define GL_BUFFER_SIZE_OES                                      0x8764
   680 #define GL_BUFFER_USAGE_OES                                     0x8765
   681 #define GL_BUFFER_ACCESS_OES                                    0x88BB
   682 #endif /* GL_OES_vertex_buffer_object */
   683 
   684 /*************************************************************/
   685 
   686 /* Available only in Common profile */
   687     GL_API void GL_APIENTRY glAlphaFunc(GLenum func, GLclampf ref);
   688     GL_API void GL_APIENTRY glClearColor(GLclampf red, GLclampf green,
   689                                          GLclampf blue, GLclampf alpha);
   690     GL_API void GL_APIENTRY glClearDepthf(GLclampf depth);
   691     GL_API void GL_APIENTRY glClipPlanef(GLenum plane,
   692                                          const GLfloat * equation);
   693     GL_API void GL_APIENTRY glColor4f(GLfloat red, GLfloat green,
   694                                       GLfloat blue, GLfloat alpha);
   695     GL_API void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar);
   696     GL_API void GL_APIENTRY glFogf(GLenum pname, GLfloat param);
   697     GL_API void GL_APIENTRY glFogfv(GLenum pname, const GLfloat * params);
   698     GL_API void GL_APIENTRY glFrustumf(GLfloat left, GLfloat right,
   699                                        GLfloat bottom, GLfloat top,
   700                                        GLfloat zNear, GLfloat zFar);
   701     GL_API void GL_APIENTRY glGetClipPlanef(GLenum pname, GLfloat eqn[4]);
   702     GL_API void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat * params);
   703     GL_API void GL_APIENTRY glGetLightfv(GLenum light, GLenum pname,
   704                                          GLfloat * params);
   705     GL_API void GL_APIENTRY glGetMaterialfv(GLenum face, GLenum pname,
   706                                             GLfloat * params);
   707     GL_API void GL_APIENTRY glGetTexEnvfv(GLenum env, GLenum pname,
   708                                           GLfloat * params);
   709     GL_API void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname,
   710                                                 GLfloat * params);
   711     GL_API void GL_APIENTRY glLightModelf(GLenum pname, GLfloat param);
   712     GL_API void GL_APIENTRY glLightModelfv(GLenum pname,
   713                                            const GLfloat * params);
   714     GL_API void GL_APIENTRY glLightf(GLenum light, GLenum pname,
   715                                      GLfloat param);
   716     GL_API void GL_APIENTRY glLightfv(GLenum light, GLenum pname,
   717                                       const GLfloat * params);
   718     GL_API void GL_APIENTRY glLineWidth(GLfloat width);
   719     GL_API void GL_APIENTRY glLoadMatrixf(const GLfloat * m);
   720     GL_API void GL_APIENTRY glMaterialf(GLenum face, GLenum pname,
   721                                         GLfloat param);
   722     GL_API void GL_APIENTRY glMaterialfv(GLenum face, GLenum pname,
   723                                          const GLfloat * params);
   724     GL_API void GL_APIENTRY glMultMatrixf(const GLfloat * m);
   725     GL_API void GL_APIENTRY glMultiTexCoord4f(GLenum target, GLfloat s,
   726                                               GLfloat t, GLfloat r,
   727                                               GLfloat q);
   728     GL_API void GL_APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
   729     GL_API void GL_APIENTRY glOrthof(GLfloat left, GLfloat right,
   730                                      GLfloat bottom, GLfloat top,
   731                                      GLfloat zNear, GLfloat zFar);
   732     GL_API void GL_APIENTRY glPointParameterf(GLenum pname, GLfloat param);
   733     GL_API void GL_APIENTRY glPointParameterfv(GLenum pname,
   734                                                const GLfloat * params);
   735     GL_API void GL_APIENTRY glPointSize(GLfloat size);
   736     GL_API void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units);
   737     GL_API void GL_APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y,
   738                                       GLfloat z);
   739     GL_API void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z);
   740     GL_API void GL_APIENTRY glTexEnvf(GLenum target, GLenum pname,
   741                                       GLfloat param);
   742     GL_API void GL_APIENTRY glTexEnvfv(GLenum target, GLenum pname,
   743                                        const GLfloat * params);
   744     GL_API void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname,
   745                                             GLfloat param);
   746     GL_API void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname,
   747                                              const GLfloat * params);
   748     GL_API void GL_APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z);
   749 
   750 /* Available in both Common and Common-Lite profiles */
   751     GL_API void GL_APIENTRY glActiveTexture(GLenum texture);
   752     GL_API void GL_APIENTRY glAlphaFuncx(GLenum func, GLclampx ref);
   753     GL_API void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer);
   754     GL_API void GL_APIENTRY glBindTexture(GLenum target, GLuint texture);
   755     GL_API void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor);
   756     GL_API void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size,
   757                                          const GLvoid * data, GLenum usage);
   758     GL_API void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset,
   759                                             GLsizeiptr size,
   760                                             const GLvoid * data);
   761     GL_API void GL_APIENTRY glClear(GLbitfield mask);
   762     GL_API void GL_APIENTRY glClearColorx(GLclampx red, GLclampx green,
   763                                           GLclampx blue, GLclampx alpha);
   764     GL_API void GL_APIENTRY glClearDepthx(GLclampx depth);
   765     GL_API void GL_APIENTRY glClearStencil(GLint s);
   766     GL_API void GL_APIENTRY glClientActiveTexture(GLenum texture);
   767     GL_API void GL_APIENTRY glClipPlanex(GLenum plane,
   768                                          const GLfixed * equation);
   769     GL_API void GL_APIENTRY glColor4ub(GLubyte red, GLubyte green,
   770                                        GLubyte blue, GLubyte alpha);
   771     GL_API void GL_APIENTRY glColor4x(GLfixed red, GLfixed green,
   772                                       GLfixed blue, GLfixed alpha);
   773     GL_API void GL_APIENTRY glColorMask(GLboolean red, GLboolean green,
   774                                         GLboolean blue, GLboolean alpha);
   775     GL_API void GL_APIENTRY glColorPointer(GLint size, GLenum type,
   776                                            GLsizei stride,
   777                                            const GLvoid * pointer);
   778     GL_API void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level,
   779                                                    GLenum internalformat,
   780                                                    GLsizei width,
   781                                                    GLsizei height,
   782                                                    GLint border,
   783                                                    GLsizei imageSize,
   784                                                    const GLvoid * data);
   785     GL_API void GL_APIENTRY glCompressedTexSubImage2D(GLenum target,
   786                                                       GLint level,
   787                                                       GLint xoffset,
   788                                                       GLint yoffset,
   789                                                       GLsizei width,
   790                                                       GLsizei height,
   791                                                       GLenum format,
   792                                                       GLsizei imageSize,
   793                                                       const GLvoid * data);
   794     GL_API void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level,
   795                                              GLenum internalformat, GLint x,
   796                                              GLint y, GLsizei width,
   797                                              GLsizei height, GLint border);
   798     GL_API void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level,
   799                                                 GLint xoffset, GLint yoffset,
   800                                                 GLint x, GLint y,
   801                                                 GLsizei width,
   802                                                 GLsizei height);
   803     GL_API void GL_APIENTRY glCullFace(GLenum mode);
   804     GL_API void GL_APIENTRY glDeleteBuffers(GLsizei n,
   805                                             const GLuint * buffers);
   806     GL_API void GL_APIENTRY glDeleteTextures(GLsizei n,
   807                                              const GLuint * textures);
   808     GL_API void GL_APIENTRY glDepthFunc(GLenum func);
   809     GL_API void GL_APIENTRY glDepthMask(GLboolean flag);
   810     GL_API void GL_APIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar);
   811     GL_API void GL_APIENTRY glDisable(GLenum cap);
   812     GL_API void GL_APIENTRY glDisableClientState(GLenum array);
   813     GL_API void GL_APIENTRY glDrawArrays(GLenum mode, GLint first,
   814                                          GLsizei count);
   815     GL_API void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count,
   816                                            GLenum type,
   817                                            const GLvoid * indices);
   818     GL_API void GL_APIENTRY glEnable(GLenum cap);
   819     GL_API void GL_APIENTRY glEnableClientState(GLenum array);
   820     GL_API void GL_APIENTRY glFinish(void);
   821     GL_API void GL_APIENTRY glFlush(void);
   822     GL_API void GL_APIENTRY glFogx(GLenum pname, GLfixed param);
   823     GL_API void GL_APIENTRY glFogxv(GLenum pname, const GLfixed * params);
   824     GL_API void GL_APIENTRY glFrontFace(GLenum mode);
   825     GL_API void GL_APIENTRY glFrustumx(GLfixed left, GLfixed right,
   826                                        GLfixed bottom, GLfixed top,
   827                                        GLfixed zNear, GLfixed zFar);
   828     GL_API void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean * params);
   829     GL_API void GL_APIENTRY glGetBufferParameteriv(GLenum target,
   830                                                    GLenum pname,
   831                                                    GLint * params);
   832     GL_API void GL_APIENTRY glGetClipPlanex(GLenum pname, GLfixed eqn[4]);
   833     GL_API void GL_APIENTRY glGenBuffers(GLsizei n, GLuint * buffers);
   834     GL_API void GL_APIENTRY glGenTextures(GLsizei n, GLuint * textures);
   835     GL_API GLenum GL_APIENTRY glGetError(void);
   836     GL_API void GL_APIENTRY glGetFixedv(GLenum pname, GLfixed * params);
   837     GL_API void GL_APIENTRY glGetIntegerv(GLenum pname, GLint * params);
   838     GL_API void GL_APIENTRY glGetLightxv(GLenum light, GLenum pname,
   839                                          GLfixed * params);
   840     GL_API void GL_APIENTRY glGetMaterialxv(GLenum face, GLenum pname,
   841                                             GLfixed * params);
   842     GL_API void GL_APIENTRY glGetPointerv(GLenum pname, void **params);
   843     GL_API const GLubyte *GL_APIENTRY glGetString(GLenum name);
   844     GL_API void GL_APIENTRY glGetTexEnviv(GLenum env, GLenum pname,
   845                                           GLint * params);
   846     GL_API void GL_APIENTRY glGetTexEnvxv(GLenum env, GLenum pname,
   847                                           GLfixed * params);
   848     GL_API void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname,
   849                                                 GLint * params);
   850     GL_API void GL_APIENTRY glGetTexParameterxv(GLenum target, GLenum pname,
   851                                                 GLfixed * params);
   852     GL_API void GL_APIENTRY glHint(GLenum target, GLenum mode);
   853     GL_API GLboolean GL_APIENTRY glIsBuffer(GLuint buffer);
   854     GL_API GLboolean GL_APIENTRY glIsEnabled(GLenum cap);
   855     GL_API GLboolean GL_APIENTRY glIsTexture(GLuint texture);
   856     GL_API void GL_APIENTRY glLightModelx(GLenum pname, GLfixed param);
   857     GL_API void GL_APIENTRY glLightModelxv(GLenum pname,
   858                                            const GLfixed * params);
   859     GL_API void GL_APIENTRY glLightx(GLenum light, GLenum pname,
   860                                      GLfixed param);
   861     GL_API void GL_APIENTRY glLightxv(GLenum light, GLenum pname,
   862                                       const GLfixed * params);
   863     GL_API void GL_APIENTRY glLineWidthx(GLfixed width);
   864     GL_API void GL_APIENTRY glLoadIdentity(void);
   865     GL_API void GL_APIENTRY glLoadMatrixx(const GLfixed * m);
   866     GL_API void GL_APIENTRY glLogicOp(GLenum opcode);
   867     GL_API void GL_APIENTRY glMaterialx(GLenum face, GLenum pname,
   868                                         GLfixed param);
   869     GL_API void GL_APIENTRY glMaterialxv(GLenum face, GLenum pname,
   870                                          const GLfixed * params);
   871     GL_API void GL_APIENTRY glMatrixMode(GLenum mode);
   872     GL_API void GL_APIENTRY glMultMatrixx(const GLfixed * m);
   873     GL_API void GL_APIENTRY glMultiTexCoord4x(GLenum target, GLfixed s,
   874                                               GLfixed t, GLfixed r,
   875                                               GLfixed q);
   876     GL_API void GL_APIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz);
   877     GL_API void GL_APIENTRY glNormalPointer(GLenum type, GLsizei stride,
   878                                             const GLvoid * pointer);
   879     GL_API void GL_APIENTRY glOrthox(GLfixed left, GLfixed right,
   880                                      GLfixed bottom, GLfixed top,
   881                                      GLfixed zNear, GLfixed zFar);
   882     GL_API void GL_APIENTRY glPixelStorei(GLenum pname, GLint param);
   883     GL_API void GL_APIENTRY glPointParameterx(GLenum pname, GLfixed param);
   884     GL_API void GL_APIENTRY glPointParameterxv(GLenum pname,
   885                                                const GLfixed * params);
   886     GL_API void GL_APIENTRY glPointSizex(GLfixed size);
   887     GL_API void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units);
   888     GL_API void GL_APIENTRY glPopMatrix(void);
   889     GL_API void GL_APIENTRY glPushMatrix(void);
   890     GL_API void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width,
   891                                          GLsizei height, GLenum format,
   892                                          GLenum type, GLvoid * pixels);
   893     GL_API void GL_APIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y,
   894                                       GLfixed z);
   895     GL_API void GL_APIENTRY glSampleCoverage(GLclampf value,
   896                                              GLboolean invert);
   897     GL_API void GL_APIENTRY glSampleCoveragex(GLclampx value,
   898                                               GLboolean invert);
   899     GL_API void GL_APIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z);
   900     GL_API void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width,
   901                                       GLsizei height);
   902     GL_API void GL_APIENTRY glShadeModel(GLenum mode);
   903     GL_API void GL_APIENTRY glStencilFunc(GLenum func, GLint ref,
   904                                           GLuint mask);
   905     GL_API void GL_APIENTRY glStencilMask(GLuint mask);
   906     GL_API void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail,
   907                                         GLenum zpass);
   908     GL_API void GL_APIENTRY glTexCoordPointer(GLint size, GLenum type,
   909                                               GLsizei stride,
   910                                               const GLvoid * pointer);
   911     GL_API void GL_APIENTRY glTexEnvi(GLenum target, GLenum pname,
   912                                       GLint param);
   913     GL_API void GL_APIENTRY glTexEnvx(GLenum target, GLenum pname,
   914                                       GLfixed param);
   915     GL_API void GL_APIENTRY glTexEnviv(GLenum target, GLenum pname,
   916                                        const GLint * params);
   917     GL_API void GL_APIENTRY glTexEnvxv(GLenum target, GLenum pname,
   918                                        const GLfixed * params);
   919     GL_API void GL_APIENTRY glTexImage2D(GLenum target, GLint level,
   920                                          GLint internalformat, GLsizei width,
   921                                          GLsizei height, GLint border,
   922                                          GLenum format, GLenum type,
   923                                          const GLvoid * pixels);
   924     GL_API void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname,
   925                                             GLint param);
   926     GL_API void GL_APIENTRY glTexParameterx(GLenum target, GLenum pname,
   927                                             GLfixed param);
   928     GL_API void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname,
   929                                              const GLint * params);
   930     GL_API void GL_APIENTRY glTexParameterxv(GLenum target, GLenum pname,
   931                                              const GLfixed * params);
   932     GL_API void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level,
   933                                             GLint xoffset, GLint yoffset,
   934                                             GLsizei width, GLsizei height,
   935                                             GLenum format, GLenum type,
   936                                             const GLvoid * pixels);
   937     GL_API void GL_APIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z);
   938     GL_API void GL_APIENTRY glVertexPointer(GLint size, GLenum type,
   939                                             GLsizei stride,
   940                                             const GLvoid * pointer);
   941     GL_API void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width,
   942                                        GLsizei height);
   943 
   944 /*------------------------------------------------------------------------*
   945  * Required OES extension functions
   946  *------------------------------------------------------------------------*/
   947 
   948 /* GL_OES_read_format */
   949 #ifndef GL_OES_read_format
   950 #define GL_OES_read_format 1
   951 #endif
   952 
   953 /* GL_OES_compressed_paletted_texture */
   954 #ifndef GL_OES_compressed_paletted_texture
   955 #define GL_OES_compressed_paletted_texture 1
   956 #endif
   957 
   958 /* GL_OES_point_size_array */
   959 #ifndef GL_OES_point_size_array
   960 #define GL_OES_point_size_array 1
   961     GL_API void GL_APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride,
   962                                                   const GLvoid * pointer);
   963 #endif
   964 
   965 /* GL_OES_query_matrix */
   966 #ifndef GL_OES_query_matrix
   967 #define GL_OES_query_matrix 1
   968     GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]);
   969 #endif /* GL_OES_query_matrix */
   970 
   971 /* GL_OES_point_sprite */
   972 #ifndef GL_OES_point_sprite
   973 #define GL_OES_point_sprite 1
   974 #endif
   975 
   976 /* GL_OES_draw_texture */
   977 #ifndef GL_OES_draw_texture
   978 #define GL_OES_draw_texture 1
   979     GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
   980     GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
   981     GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
   982     GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
   983     GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
   984     GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
   985     GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
   986     GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
   987 #endif /* GL_OES_draw_texture */
   988 
   989 /* GL_OES_single_precision */
   990 #ifndef GL_OES_single_precision
   991 #define GL_OES_single_precision 1
   992     GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar);
   993     GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
   994     GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
   995     GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
   996     GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]);
   997     GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
   998 #endif /* GL_OES_single_precision */
   999 
  1000 /* GL_OES_vertex_buffer_object */
  1001 #ifndef GL_OES_vertex_buffer_object
  1002 #define GL_OES_vertex_buffer_object 1
  1003     GL_API void APIENTRY glBindBufferOES(GLenum, GLuint);
  1004     GL_API void APIENTRY glDeleteBuffersOES(GLsizei, const GLuint *);
  1005     GL_API void APIENTRY glGenBuffersOES(GLsizei, GLuint *);
  1006     GL_API GLboolean APIENTRY glIsBufferOES(GLuint);
  1007     GL_API void APIENTRY glBufferDataOES(GLenum, GLsizeiptr, const GLvoid *, GLenum);
  1008     GL_API void APIENTRY glBufferSubDataOES(GLenum, GLintptr, GLsizeiptr, const GLvoid *);
  1009     GL_API void APIENTRY glGetBufferParameterivOES(GLenum, GLenum, GLint *);
  1010 #endif /* GL_OES_vertex_buffer_object */
  1011 
  1012 #ifdef __cplusplus
  1013 }
  1014 #endif
  1015 
  1016 #endif                          /* __gles_h_ */