├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── Main.cpp ├── README.md ├── demo-config.h.in ├── gl2 ├── Context.cpp ├── Context.h ├── Funcs.h ├── gl2.h ├── gl2ext.h ├── gl2platform.h └── khrplatform.h ├── modules └── FindSDL2.cmake └── setup-win32.py /.gitignore: -------------------------------------------------------------------------------- 1 | *build*/ 2 | CMakeLists.txt.user 3 | *~ 4 | /**/*.xcodeproj/**/xcuserdata/ 5 | /**/*.xcodeproj/**/xcshareddata/ 6 | /extern/ 7 | *.pyc 8 | *.log 9 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | project(CMakeDemo) 3 | 4 | # Write demo-config.h 5 | message("Generating header file: ${CMAKE_BINARY_DIR}/demo-config.h") 6 | set(DEMO_ENABLE_MULTISAMPLE 0 CACHE BOOL "Enable multisample anti-aliasing") 7 | configure_file(demo-config.h.in "${CMAKE_BINARY_DIR}/demo-config.h") 8 | 9 | # Find SDL2 and OpenGL 10 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") 11 | find_package(SDL2 REQUIRED COMPONENTS main) 12 | if(NOT WIN32) 13 | find_package(OpenGL REQUIRED) 14 | endif() 15 | 16 | # Define executable target 17 | include_directories(${SDL2_INCLUDE_DIRS} ${SDL2main_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} ${CMAKE_BINARY_DIR}) 18 | add_executable(CMakeDemo Main.cpp gl2/Context.cpp) 19 | target_link_libraries(CMakeDemo ${SDL2_LIBS} ${OPENGL_LIBRARIES}) 20 | 21 | # Copy SDL2 DLLs to output folder on Windows 22 | if(WIN32) 23 | foreach(DLL ${SDL2_DLLS}) 24 | add_custom_command(TARGET CMakeDemo POST_BUILD COMMAND 25 | ${CMAKE_COMMAND} -E copy_if_different ${DLL} $) 26 | endforeach() 27 | endif() 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Some files in the gl2 folder, used only on Windows, are licensed under 2 | the SGI Free Software B License Version 2.0. For details, see 3 | http://oss.sgi.com/projects/FreeB/ 4 | 5 | SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) Copyright 6 | (C) Silicon Graphics, Inc. All Rights Reserved. 7 | Permission is hereby granted, free of charge, to any person 8 | obtaining a copy of this software and associated documentation files 9 | (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, 11 | publish, distribute, sublicense, and/or sell copies of the Software, 12 | and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice including the dates of first publication 16 | and either this permission notice or a reference to 17 | http://oss.sgi.com/projects/FreeB/ shall be included in all copies or 18 | substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE 24 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 25 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | 28 | Except as contained in this notice, the name of Silicon Graphics, 29 | Inc. shall not be used in advertising or otherwise to promote the 30 | sale, use or other dealings in this Software without prior written 31 | authorization from Silicon Graphics, Inc. 32 | 33 | ----------------- 34 | 35 | Some files in the gl2 folder, used only on Windows, were adapted from SDL2 36 | (src/render/opengles2/SDL_gles2funcs.h). 37 | 38 | Simple DirectMedia Layer 39 | Copyright (C) 1997-2016 Sam Lantinga 40 | 41 | This software is provided 'as-is', without any express or implied 42 | warranty. In no event will the authors be held liable for any damages 43 | arising from the use of this software. 44 | 45 | Permission is granted to anyone to use this software for any purpose, 46 | including commercial applications, and to alter it and redistribute it 47 | freely, subject to the following restrictions: 48 | 49 | 1. The origin of this software must not be misrepresented; you must not 50 | claim that you wrote the original software. If you use this software 51 | in a product, an acknowledgment in the product documentation would be 52 | appreciated but is not required. 53 | 2. Altered source versions must be plainly marked as such, and must not be 54 | misrepresented as being the original software. 55 | 3. This notice may not be removed or altered from any source distribution. 56 | 57 | ----------------- 58 | 59 | The rest of the code is free and unencumbered software released into the 60 | public domain. 61 | 62 | Anyone is free to copy, modify, publish, use, compile, sell, or 63 | distribute this software, either in source code form or as a compiled 64 | binary, for any purpose, commercial or non-commercial, and by any 65 | means. 66 | 67 | In jurisdictions that recognize copyright laws, the author or authors 68 | of this software dedicate any and all copyright interest in the 69 | software to the public domain. We make this dedication for the benefit 70 | of the public at large and to the detriment of our heirs and 71 | successors. We intend this dedication to be an overt act of 72 | relinquishment in perpetuity of all present and future rights to this 73 | software under copyright law. 74 | 75 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 76 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 77 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 78 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 79 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 80 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 81 | OTHER DEALINGS IN THE SOFTWARE. 82 | 83 | For more information, please refer to 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | An example cross-platform CMake-based project. 2 | 3 | This project uses SDL2 and OpenGL to render a spinning 3D logo to a desktop window. You can build it on Windows, MacOS or Linux. 4 | 5 | ![](http://preshing.com/images/cmakedemo-preview.png) 6 | 7 | ## Requirements 8 | 9 | ### Windows (Visual Studio) 10 | 11 | CMakeDemo expects to find the SDL2 headers and libraries in a subfolder named `extern\SDL-2.0.5`. You can download and extract them automatically by running the Python 3 script `setup-win32.py`. If you don't have Python installed, [download and extract them by hand](https://www.libsdl.org/release/SDL2-devel-2.0.5-VC.zip). 12 | 13 | On Windows, CMakeDemo uses its own OpenGL headers and loads `opengl32.dll` dynamically at runtime. Nothing else is needed at build time. 14 | 15 | ### MacOS (Xcode) 16 | 17 | Install the SDL2 headers and libraries using [MacPorts](https://www.macports.org/). 18 | 19 | sudo port install libsdl2 20 | 21 | OpenGL headers and libraries are installed by Xcode. CMake will find them automatically. 22 | 23 | ### Ubuntu 24 | 25 | Install the SDL2 headers and libraries. 26 | 27 | sudo apt install libsdl2-dev 28 | 29 | OpenGL headers and libraries are already present on the system. CMake will find them automatically. 30 | 31 | ## Build Instructions 32 | 33 | For build instructions, see the blog post [How to Build a CMake-Based Project](http://preshing.com/20170511/how-to-build-a-cmake-based-project). 34 | -------------------------------------------------------------------------------- /demo-config.h.in: -------------------------------------------------------------------------------- 1 | #cmakedefine01 DEMO_ENABLE_MULTISAMPLE 2 | -------------------------------------------------------------------------------- /gl2/Context.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 2 | 3 | #include 4 | #include "Context.h" 5 | 6 | GLFuncTable glFuncTable; 7 | 8 | //--------------------------------------------------------------------------- 9 | // Fill in the glFuncTable function table on Win32 10 | // This lets us avoid having to link with opengl32.lib 11 | //--------------------------------------------------------------------------- 12 | void GLFuncTable::initialize() { 13 | #define GL_FUNC(retVal, name, args) { name = (retVal (GL_APIENTRY *)args) SDL_GL_GetProcAddress("gl" #name); assert(name); } 14 | #include "Funcs.h" 15 | #undef GL_FUNC 16 | } 17 | 18 | #endif // _WIN32 19 | -------------------------------------------------------------------------------- /gl2/Context.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | 5 | //--------------------------------------------------------------------------- 6 | // On Win32, use our own GL headers and prepare a function table 7 | //--------------------------------------------------------------------------- 8 | #include "khrplatform.h" 9 | #include "gl2platform.h" 10 | #include "gl2.h" 11 | #include "gl2ext.h" 12 | #include 13 | 14 | struct GLFuncTable { 15 | #define GL_FUNC(retVal, name, args) retVal (GL_APIENTRY *name)args; 16 | #include "Funcs.h" 17 | #undef GL_FUNC 18 | void initialize(); 19 | }; 20 | extern GLFuncTable glFuncTable; 21 | #define GL_CHECK(call) do { glFuncTable.call; assert(glFuncTable.GetError() == GL_NO_ERROR); } while (0) 22 | #define GL_NO_CHECK(call) (glFuncTable.call) 23 | 24 | #else // TURF_TARGET_WIN32 25 | 26 | //--------------------------------------------------------------------------- 27 | // Otherwise, use the system's GL headers 28 | //--------------------------------------------------------------------------- 29 | #ifdef __APPLE__ 30 | #import 31 | #else 32 | #include 33 | #endif 34 | #define GL_CHECK(call) do { gl ## call; assert(glGetError() == GL_NO_ERROR); } while (0) 35 | #define GL_NO_CHECK(call) (gl ## call) 36 | 37 | #endif // TURF_TARGET_WIN32 38 | -------------------------------------------------------------------------------- /gl2/Funcs.h: -------------------------------------------------------------------------------- 1 | GL_FUNC(void, AttachShader, (GLuint, GLuint)) 2 | GL_FUNC(void, Clear, (GLbitfield)) 3 | GL_FUNC(void, ClearColor, (GLclampf, GLclampf, GLclampf, GLclampf)) 4 | GL_FUNC(void, CompileShader, (GLuint)) 5 | GL_FUNC(GLuint, CreateProgram, (void)) 6 | GL_FUNC(GLuint, CreateShader, (GLenum)) 7 | GL_FUNC(void, CullFace, (GLenum)) 8 | GL_FUNC(void, DepthMask, (GLboolean)) 9 | GL_FUNC(void, DetachShader, (GLuint, GLuint)) 10 | GL_FUNC(void, DeleteProgram, (GLuint)) 11 | GL_FUNC(void, DeleteShader, (GLuint)) 12 | GL_FUNC(void, Disable, (GLenum)) 13 | GL_FUNC(void, DrawElements, (GLenum, GLsizei, GLenum, const GLvoid*)) 14 | GL_FUNC(void, Enable, (GLenum)) 15 | GL_FUNC(void, EnableVertexAttribArray, (GLuint)) 16 | GL_FUNC(void, FrontFace, (GLenum)) 17 | GL_FUNC(const GLubyte *, GetString, (GLenum)) 18 | GL_FUNC(GLenum, GetError, (void)) 19 | GL_FUNC(void, GetProgramiv, (GLuint, GLenum, GLint *)) 20 | GL_FUNC(void, GetShaderInfoLog, (GLuint, GLsizei, GLsizei *, char *)) 21 | GL_FUNC(void, GetShaderiv, (GLuint, GLenum, GLint *)) 22 | GL_FUNC(GLint, GetUniformLocation, (GLuint, const char *)) 23 | GL_FUNC(void, LinkProgram, (GLuint)) 24 | GL_FUNC(void, ShaderSource, (GLuint, GLsizei, const GLchar* const*, const GLint *)) 25 | GL_FUNC(void, Uniform3fv, (GLint, GLsizei, const GLfloat *)) 26 | GL_FUNC(void, UniformMatrix4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) 27 | GL_FUNC(void, UseProgram, (GLuint)) 28 | GL_FUNC(void, ValidateProgram, (GLuint)) 29 | GL_FUNC(void, VertexAttribPointer, (GLuint, GLint, GLenum, GLboolean, GLsizei, const void *)) 30 | GL_FUNC(void, Viewport, (GLint, GLint, GLsizei, GLsizei)) 31 | GL_FUNC(GLint, GetAttribLocation, (GLuint, const GLchar *)) 32 | GL_FUNC(void, GenBuffers, (GLsizei, GLuint *)) 33 | GL_FUNC(void, DeleteBuffers, (GLsizei, GLuint *)) 34 | GL_FUNC(void, BindBuffer, (GLenum, GLuint)) 35 | GL_FUNC(void, BufferData, (GLenum, GLsizeiptr, const GLvoid *, GLenum)) 36 | -------------------------------------------------------------------------------- /gl2/gl2.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2_h_ 2 | #define __gl2_h_ 3 | 4 | /* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */ 5 | 6 | /*#include */ 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* 13 | * This document is licensed under the SGI Free Software B License Version 14 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 15 | */ 16 | 17 | /*------------------------------------------------------------------------- 18 | * Data type definitions 19 | *-----------------------------------------------------------------------*/ 20 | 21 | typedef void GLvoid; 22 | typedef char GLchar; 23 | typedef unsigned int GLenum; 24 | typedef unsigned char GLboolean; 25 | typedef unsigned int GLbitfield; 26 | typedef khronos_int8_t GLbyte; 27 | typedef short GLshort; 28 | typedef int GLint; 29 | typedef int GLsizei; 30 | typedef khronos_uint8_t GLubyte; 31 | typedef unsigned short GLushort; 32 | typedef unsigned int GLuint; 33 | typedef khronos_float_t GLfloat; 34 | typedef khronos_float_t GLclampf; 35 | typedef khronos_int32_t GLfixed; 36 | 37 | /* GL types for handling large vertex buffer objects */ 38 | typedef khronos_intptr_t GLintptr; 39 | typedef khronos_ssize_t GLsizeiptr; 40 | 41 | /* OpenGL ES core versions */ 42 | #define GL_ES_VERSION_2_0 1 43 | 44 | /* ClearBufferMask */ 45 | #define GL_DEPTH_BUFFER_BIT 0x00000100 46 | #define GL_STENCIL_BUFFER_BIT 0x00000400 47 | #define GL_COLOR_BUFFER_BIT 0x00004000 48 | 49 | /* Boolean */ 50 | #define GL_FALSE 0 51 | #define GL_TRUE 1 52 | 53 | /* BeginMode */ 54 | #define GL_POINTS 0x0000 55 | #define GL_LINES 0x0001 56 | #define GL_LINE_LOOP 0x0002 57 | #define GL_LINE_STRIP 0x0003 58 | #define GL_TRIANGLES 0x0004 59 | #define GL_TRIANGLE_STRIP 0x0005 60 | #define GL_TRIANGLE_FAN 0x0006 61 | 62 | /* AlphaFunction (not supported in ES20) */ 63 | /* GL_NEVER */ 64 | /* GL_LESS */ 65 | /* GL_EQUAL */ 66 | /* GL_LEQUAL */ 67 | /* GL_GREATER */ 68 | /* GL_NOTEQUAL */ 69 | /* GL_GEQUAL */ 70 | /* GL_ALWAYS */ 71 | 72 | /* BlendingFactorDest */ 73 | #define GL_ZERO 0 74 | #define GL_ONE 1 75 | #define GL_SRC_COLOR 0x0300 76 | #define GL_ONE_MINUS_SRC_COLOR 0x0301 77 | #define GL_SRC_ALPHA 0x0302 78 | #define GL_ONE_MINUS_SRC_ALPHA 0x0303 79 | #define GL_DST_ALPHA 0x0304 80 | #define GL_ONE_MINUS_DST_ALPHA 0x0305 81 | 82 | /* BlendingFactorSrc */ 83 | /* GL_ZERO */ 84 | /* GL_ONE */ 85 | #define GL_DST_COLOR 0x0306 86 | #define GL_ONE_MINUS_DST_COLOR 0x0307 87 | #define GL_SRC_ALPHA_SATURATE 0x0308 88 | /* GL_SRC_ALPHA */ 89 | /* GL_ONE_MINUS_SRC_ALPHA */ 90 | /* GL_DST_ALPHA */ 91 | /* GL_ONE_MINUS_DST_ALPHA */ 92 | 93 | /* BlendEquationSeparate */ 94 | #define GL_FUNC_ADD 0x8006 95 | #define GL_BLEND_EQUATION 0x8009 96 | #define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ 97 | #define GL_BLEND_EQUATION_ALPHA 0x883D 98 | 99 | /* BlendSubtract */ 100 | #define GL_FUNC_SUBTRACT 0x800A 101 | #define GL_FUNC_REVERSE_SUBTRACT 0x800B 102 | 103 | /* Separate Blend Functions */ 104 | #define GL_BLEND_DST_RGB 0x80C8 105 | #define GL_BLEND_SRC_RGB 0x80C9 106 | #define GL_BLEND_DST_ALPHA 0x80CA 107 | #define GL_BLEND_SRC_ALPHA 0x80CB 108 | #define GL_CONSTANT_COLOR 0x8001 109 | #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 110 | #define GL_CONSTANT_ALPHA 0x8003 111 | #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 112 | #define GL_BLEND_COLOR 0x8005 113 | 114 | /* Buffer Objects */ 115 | #define GL_ARRAY_BUFFER 0x8892 116 | #define GL_ELEMENT_ARRAY_BUFFER 0x8893 117 | #define GL_ARRAY_BUFFER_BINDING 0x8894 118 | #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 119 | 120 | #define GL_STREAM_DRAW 0x88E0 121 | #define GL_STATIC_DRAW 0x88E4 122 | #define GL_DYNAMIC_DRAW 0x88E8 123 | 124 | #define GL_BUFFER_SIZE 0x8764 125 | #define GL_BUFFER_USAGE 0x8765 126 | 127 | #define GL_CURRENT_VERTEX_ATTRIB 0x8626 128 | 129 | /* CullFaceMode */ 130 | #define GL_FRONT 0x0404 131 | #define GL_BACK 0x0405 132 | #define GL_FRONT_AND_BACK 0x0408 133 | 134 | /* DepthFunction */ 135 | /* GL_NEVER */ 136 | /* GL_LESS */ 137 | /* GL_EQUAL */ 138 | /* GL_LEQUAL */ 139 | /* GL_GREATER */ 140 | /* GL_NOTEQUAL */ 141 | /* GL_GEQUAL */ 142 | /* GL_ALWAYS */ 143 | 144 | /* EnableCap */ 145 | #define GL_TEXTURE_2D 0x0DE1 146 | #define GL_CULL_FACE 0x0B44 147 | #define GL_BLEND 0x0BE2 148 | #define GL_DITHER 0x0BD0 149 | #define GL_STENCIL_TEST 0x0B90 150 | #define GL_DEPTH_TEST 0x0B71 151 | #define GL_SCISSOR_TEST 0x0C11 152 | #define GL_POLYGON_OFFSET_FILL 0x8037 153 | #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E 154 | #define GL_SAMPLE_COVERAGE 0x80A0 155 | 156 | /* ErrorCode */ 157 | #define GL_NO_ERROR 0 158 | #define GL_INVALID_ENUM 0x0500 159 | #define GL_INVALID_VALUE 0x0501 160 | #define GL_INVALID_OPERATION 0x0502 161 | #define GL_OUT_OF_MEMORY 0x0505 162 | 163 | /* FrontFaceDirection */ 164 | #define GL_CW 0x0900 165 | #define GL_CCW 0x0901 166 | 167 | /* GetPName */ 168 | #define GL_LINE_WIDTH 0x0B21 169 | #define GL_ALIASED_POINT_SIZE_RANGE 0x846D 170 | #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E 171 | #define GL_CULL_FACE_MODE 0x0B45 172 | #define GL_FRONT_FACE 0x0B46 173 | #define GL_DEPTH_RANGE 0x0B70 174 | #define GL_DEPTH_WRITEMASK 0x0B72 175 | #define GL_DEPTH_CLEAR_VALUE 0x0B73 176 | #define GL_DEPTH_FUNC 0x0B74 177 | #define GL_STENCIL_CLEAR_VALUE 0x0B91 178 | #define GL_STENCIL_FUNC 0x0B92 179 | #define GL_STENCIL_FAIL 0x0B94 180 | #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 181 | #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 182 | #define GL_STENCIL_REF 0x0B97 183 | #define GL_STENCIL_VALUE_MASK 0x0B93 184 | #define GL_STENCIL_WRITEMASK 0x0B98 185 | #define GL_STENCIL_BACK_FUNC 0x8800 186 | #define GL_STENCIL_BACK_FAIL 0x8801 187 | #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 188 | #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 189 | #define GL_STENCIL_BACK_REF 0x8CA3 190 | #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 191 | #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 192 | #define GL_VIEWPORT 0x0BA2 193 | #define GL_SCISSOR_BOX 0x0C10 194 | /* GL_SCISSOR_TEST */ 195 | #define GL_COLOR_CLEAR_VALUE 0x0C22 196 | #define GL_COLOR_WRITEMASK 0x0C23 197 | #define GL_UNPACK_ALIGNMENT 0x0CF5 198 | #define GL_PACK_ALIGNMENT 0x0D05 199 | #define GL_MAX_TEXTURE_SIZE 0x0D33 200 | #define GL_MAX_VIEWPORT_DIMS 0x0D3A 201 | #define GL_SUBPIXEL_BITS 0x0D50 202 | #define GL_RED_BITS 0x0D52 203 | #define GL_GREEN_BITS 0x0D53 204 | #define GL_BLUE_BITS 0x0D54 205 | #define GL_ALPHA_BITS 0x0D55 206 | #define GL_DEPTH_BITS 0x0D56 207 | #define GL_STENCIL_BITS 0x0D57 208 | #define GL_POLYGON_OFFSET_UNITS 0x2A00 209 | /* GL_POLYGON_OFFSET_FILL */ 210 | #define GL_POLYGON_OFFSET_FACTOR 0x8038 211 | #define GL_TEXTURE_BINDING_2D 0x8069 212 | #define GL_SAMPLE_BUFFERS 0x80A8 213 | #define GL_SAMPLES 0x80A9 214 | #define GL_SAMPLE_COVERAGE_VALUE 0x80AA 215 | #define GL_SAMPLE_COVERAGE_INVERT 0x80AB 216 | 217 | /* GetTextureParameter */ 218 | /* GL_TEXTURE_MAG_FILTER */ 219 | /* GL_TEXTURE_MIN_FILTER */ 220 | /* GL_TEXTURE_WRAP_S */ 221 | /* GL_TEXTURE_WRAP_T */ 222 | 223 | #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 224 | #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 225 | 226 | /* HintMode */ 227 | #define GL_DONT_CARE 0x1100 228 | #define GL_FASTEST 0x1101 229 | #define GL_NICEST 0x1102 230 | 231 | /* HintTarget */ 232 | #define GL_GENERATE_MIPMAP_HINT 0x8192 233 | 234 | /* DataType */ 235 | #define GL_BYTE 0x1400 236 | #define GL_UNSIGNED_BYTE 0x1401 237 | #define GL_SHORT 0x1402 238 | #define GL_UNSIGNED_SHORT 0x1403 239 | #define GL_INT 0x1404 240 | #define GL_UNSIGNED_INT 0x1405 241 | #define GL_FLOAT 0x1406 242 | #define GL_FIXED 0x140C 243 | 244 | /* PixelFormat */ 245 | #define GL_DEPTH_COMPONENT 0x1902 246 | #define GL_ALPHA 0x1906 247 | #define GL_RGB 0x1907 248 | #define GL_RGBA 0x1908 249 | #define GL_LUMINANCE 0x1909 250 | #define GL_LUMINANCE_ALPHA 0x190A 251 | 252 | /* PixelType */ 253 | /* GL_UNSIGNED_BYTE */ 254 | #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 255 | #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 256 | #define GL_UNSIGNED_SHORT_5_6_5 0x8363 257 | 258 | /* Shaders */ 259 | #define GL_FRAGMENT_SHADER 0x8B30 260 | #define GL_VERTEX_SHADER 0x8B31 261 | #define GL_MAX_VERTEX_ATTRIBS 0x8869 262 | #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB 263 | #define GL_MAX_VARYING_VECTORS 0x8DFC 264 | #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D 265 | #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C 266 | #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 267 | #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD 268 | #define GL_SHADER_TYPE 0x8B4F 269 | #define GL_DELETE_STATUS 0x8B80 270 | #define GL_LINK_STATUS 0x8B82 271 | #define GL_VALIDATE_STATUS 0x8B83 272 | #define GL_ATTACHED_SHADERS 0x8B85 273 | #define GL_ACTIVE_UNIFORMS 0x8B86 274 | #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 275 | #define GL_ACTIVE_ATTRIBUTES 0x8B89 276 | #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A 277 | #define GL_SHADING_LANGUAGE_VERSION 0x8B8C 278 | #define GL_CURRENT_PROGRAM 0x8B8D 279 | 280 | /* StencilFunction */ 281 | #define GL_NEVER 0x0200 282 | #define GL_LESS 0x0201 283 | #define GL_EQUAL 0x0202 284 | #define GL_LEQUAL 0x0203 285 | #define GL_GREATER 0x0204 286 | #define GL_NOTEQUAL 0x0205 287 | #define GL_GEQUAL 0x0206 288 | #define GL_ALWAYS 0x0207 289 | 290 | /* StencilOp */ 291 | /* GL_ZERO */ 292 | #define GL_KEEP 0x1E00 293 | #define GL_REPLACE 0x1E01 294 | #define GL_INCR 0x1E02 295 | #define GL_DECR 0x1E03 296 | #define GL_INVERT 0x150A 297 | #define GL_INCR_WRAP 0x8507 298 | #define GL_DECR_WRAP 0x8508 299 | 300 | /* StringName */ 301 | #define GL_VENDOR 0x1F00 302 | #define GL_RENDERER 0x1F01 303 | #define GL_VERSION 0x1F02 304 | #define GL_EXTENSIONS 0x1F03 305 | 306 | /* TextureMagFilter */ 307 | #define GL_NEAREST 0x2600 308 | #define GL_LINEAR 0x2601 309 | 310 | /* TextureMinFilter */ 311 | /* GL_NEAREST */ 312 | /* GL_LINEAR */ 313 | #define GL_NEAREST_MIPMAP_NEAREST 0x2700 314 | #define GL_LINEAR_MIPMAP_NEAREST 0x2701 315 | #define GL_NEAREST_MIPMAP_LINEAR 0x2702 316 | #define GL_LINEAR_MIPMAP_LINEAR 0x2703 317 | 318 | /* TextureParameterName */ 319 | #define GL_TEXTURE_MAG_FILTER 0x2800 320 | #define GL_TEXTURE_MIN_FILTER 0x2801 321 | #define GL_TEXTURE_WRAP_S 0x2802 322 | #define GL_TEXTURE_WRAP_T 0x2803 323 | 324 | /* TextureTarget */ 325 | /* GL_TEXTURE_2D */ 326 | #define GL_TEXTURE 0x1702 327 | 328 | #define GL_TEXTURE_CUBE_MAP 0x8513 329 | #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 330 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 331 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 332 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 333 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 334 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 335 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A 336 | #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C 337 | 338 | /* TextureUnit */ 339 | #define GL_TEXTURE0 0x84C0 340 | #define GL_TEXTURE1 0x84C1 341 | #define GL_TEXTURE2 0x84C2 342 | #define GL_TEXTURE3 0x84C3 343 | #define GL_TEXTURE4 0x84C4 344 | #define GL_TEXTURE5 0x84C5 345 | #define GL_TEXTURE6 0x84C6 346 | #define GL_TEXTURE7 0x84C7 347 | #define GL_TEXTURE8 0x84C8 348 | #define GL_TEXTURE9 0x84C9 349 | #define GL_TEXTURE10 0x84CA 350 | #define GL_TEXTURE11 0x84CB 351 | #define GL_TEXTURE12 0x84CC 352 | #define GL_TEXTURE13 0x84CD 353 | #define GL_TEXTURE14 0x84CE 354 | #define GL_TEXTURE15 0x84CF 355 | #define GL_TEXTURE16 0x84D0 356 | #define GL_TEXTURE17 0x84D1 357 | #define GL_TEXTURE18 0x84D2 358 | #define GL_TEXTURE19 0x84D3 359 | #define GL_TEXTURE20 0x84D4 360 | #define GL_TEXTURE21 0x84D5 361 | #define GL_TEXTURE22 0x84D6 362 | #define GL_TEXTURE23 0x84D7 363 | #define GL_TEXTURE24 0x84D8 364 | #define GL_TEXTURE25 0x84D9 365 | #define GL_TEXTURE26 0x84DA 366 | #define GL_TEXTURE27 0x84DB 367 | #define GL_TEXTURE28 0x84DC 368 | #define GL_TEXTURE29 0x84DD 369 | #define GL_TEXTURE30 0x84DE 370 | #define GL_TEXTURE31 0x84DF 371 | #define GL_ACTIVE_TEXTURE 0x84E0 372 | 373 | /* TextureWrapMode */ 374 | #define GL_REPEAT 0x2901 375 | #define GL_CLAMP_TO_EDGE 0x812F 376 | #define GL_MIRRORED_REPEAT 0x8370 377 | 378 | /* Uniform Types */ 379 | #define GL_FLOAT_VEC2 0x8B50 380 | #define GL_FLOAT_VEC3 0x8B51 381 | #define GL_FLOAT_VEC4 0x8B52 382 | #define GL_INT_VEC2 0x8B53 383 | #define GL_INT_VEC3 0x8B54 384 | #define GL_INT_VEC4 0x8B55 385 | #define GL_BOOL 0x8B56 386 | #define GL_BOOL_VEC2 0x8B57 387 | #define GL_BOOL_VEC3 0x8B58 388 | #define GL_BOOL_VEC4 0x8B59 389 | #define GL_FLOAT_MAT2 0x8B5A 390 | #define GL_FLOAT_MAT3 0x8B5B 391 | #define GL_FLOAT_MAT4 0x8B5C 392 | #define GL_SAMPLER_2D 0x8B5E 393 | #define GL_SAMPLER_CUBE 0x8B60 394 | 395 | /* Vertex Arrays */ 396 | #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 397 | #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 398 | #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 399 | #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 400 | #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A 401 | #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 402 | #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F 403 | 404 | /* Read Format */ 405 | #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A 406 | #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B 407 | 408 | /* Shader Source */ 409 | #define GL_COMPILE_STATUS 0x8B81 410 | #define GL_INFO_LOG_LENGTH 0x8B84 411 | #define GL_SHADER_SOURCE_LENGTH 0x8B88 412 | #define GL_SHADER_COMPILER 0x8DFA 413 | 414 | /* Shader Binary */ 415 | #define GL_SHADER_BINARY_FORMATS 0x8DF8 416 | #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 417 | 418 | /* Shader Precision-Specified Types */ 419 | #define GL_LOW_FLOAT 0x8DF0 420 | #define GL_MEDIUM_FLOAT 0x8DF1 421 | #define GL_HIGH_FLOAT 0x8DF2 422 | #define GL_LOW_INT 0x8DF3 423 | #define GL_MEDIUM_INT 0x8DF4 424 | #define GL_HIGH_INT 0x8DF5 425 | 426 | /* Framebuffer Object. */ 427 | #define GL_FRAMEBUFFER 0x8D40 428 | #define GL_RENDERBUFFER 0x8D41 429 | 430 | #define GL_RGBA4 0x8056 431 | #define GL_RGB5_A1 0x8057 432 | #define GL_RGB565 0x8D62 433 | #define GL_DEPTH_COMPONENT16 0x81A5 434 | #define GL_STENCIL_INDEX8 0x8D48 435 | 436 | #define GL_RENDERBUFFER_WIDTH 0x8D42 437 | #define GL_RENDERBUFFER_HEIGHT 0x8D43 438 | #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 439 | #define GL_RENDERBUFFER_RED_SIZE 0x8D50 440 | #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 441 | #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 442 | #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 443 | #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 444 | #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 445 | 446 | #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 447 | #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 448 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 449 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 450 | 451 | #define GL_COLOR_ATTACHMENT0 0x8CE0 452 | #define GL_DEPTH_ATTACHMENT 0x8D00 453 | #define GL_STENCIL_ATTACHMENT 0x8D20 454 | 455 | #define GL_NONE 0 456 | 457 | #define GL_FRAMEBUFFER_COMPLETE 0x8CD5 458 | #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 459 | #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 460 | #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 461 | #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD 462 | 463 | #define GL_FRAMEBUFFER_BINDING 0x8CA6 464 | #define GL_RENDERBUFFER_BINDING 0x8CA7 465 | #define GL_MAX_RENDERBUFFER_SIZE 0x84E8 466 | 467 | #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 468 | 469 | /*------------------------------------------------------------------------- 470 | * GL core functions. 471 | *-----------------------------------------------------------------------*/ 472 | 473 | GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); 474 | GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); 475 | GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); 476 | GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); 477 | GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); 478 | GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); 479 | GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); 480 | GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 481 | GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); 482 | GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); 483 | GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); 484 | GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); 485 | GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); 486 | GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); 487 | GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); 488 | GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); 489 | GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 490 | GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); 491 | GL_APICALL void GL_APIENTRY glClearStencil (GLint s); 492 | GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); 493 | GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); 494 | GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); 495 | 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); 496 | GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); 497 | GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); 498 | GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); 499 | GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); 500 | GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); 501 | GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); 502 | GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); 503 | GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); 504 | GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); 505 | GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); 506 | GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); 507 | GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); 508 | GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); 509 | GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); 510 | GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); 511 | GL_APICALL void GL_APIENTRY glDisable (GLenum cap); 512 | GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); 513 | GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); 514 | GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); 515 | GL_APICALL void GL_APIENTRY glEnable (GLenum cap); 516 | GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); 517 | GL_APICALL void GL_APIENTRY glFinish (void); 518 | GL_APICALL void GL_APIENTRY glFlush (void); 519 | GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); 520 | GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); 521 | GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); 522 | GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); 523 | GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); 524 | GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); 525 | GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); 526 | GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); 527 | GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); 528 | GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); 529 | GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); 530 | GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); 531 | GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); 532 | GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); 533 | GL_APICALL GLenum GL_APIENTRY glGetError (void); 534 | GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); 535 | GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); 536 | GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); 537 | GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); 538 | GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); 539 | GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); 540 | GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); 541 | GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); 542 | GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); 543 | GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); 544 | GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); 545 | GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); 546 | GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); 547 | GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); 548 | GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); 549 | GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); 550 | GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); 551 | GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); 552 | GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); 553 | GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); 554 | GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); 555 | GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); 556 | GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); 557 | GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); 558 | GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); 559 | GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); 560 | GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); 561 | GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); 562 | GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); 563 | GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); 564 | GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); 565 | GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); 566 | GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); 567 | GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); 568 | GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); 569 | GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); 570 | GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); 571 | GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); 572 | GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); 573 | GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); 574 | GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); 575 | GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); 576 | GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); 577 | GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); 578 | 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); 579 | GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); 580 | GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); 581 | GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); 582 | GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); 583 | 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); 584 | GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); 585 | GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); 586 | GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); 587 | GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); 588 | GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); 589 | GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); 590 | GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); 591 | GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); 592 | GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); 593 | GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); 594 | GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); 595 | GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); 596 | GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 597 | GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); 598 | GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); 599 | GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); 600 | GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 601 | GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 602 | GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 603 | GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); 604 | GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); 605 | GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); 606 | GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); 607 | GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); 608 | GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); 609 | GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); 610 | GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); 611 | GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 612 | GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); 613 | GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); 614 | GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); 615 | 616 | #ifdef __cplusplus 617 | } 618 | #endif 619 | 620 | #endif /* __gl2_h_ */ 621 | 622 | -------------------------------------------------------------------------------- /gl2/gl2ext.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2ext_h_ 2 | #define __gl2ext_h_ 3 | 4 | /* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | * This document is licensed under the SGI Free Software B License Version 12 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 13 | */ 14 | 15 | #ifndef GL_APIENTRYP 16 | # define GL_APIENTRYP GL_APIENTRY* 17 | #endif 18 | 19 | /* New types shared by several extensions */ 20 | 21 | #ifndef __gl3_h_ 22 | /* These are defined with respect to in the 23 | * Apple extension spec, but they are also used by non-APPLE 24 | * extensions, and in the Khronos header we use the Khronos 25 | * portable types in khrplatform.h, which must be defined. 26 | */ 27 | typedef khronos_int64_t GLint64; 28 | typedef khronos_uint64_t GLuint64; 29 | typedef struct __GLsync *GLsync; 30 | #endif 31 | 32 | 33 | /*------------------------------------------------------------------------* 34 | * OES extension tokens 35 | *------------------------------------------------------------------------*/ 36 | 37 | /* GL_OES_compressed_ETC1_RGB8_texture */ 38 | #ifndef GL_OES_compressed_ETC1_RGB8_texture 39 | #define GL_ETC1_RGB8_OES 0x8D64 40 | #endif 41 | 42 | /* GL_OES_compressed_paletted_texture */ 43 | #ifndef GL_OES_compressed_paletted_texture 44 | #define GL_PALETTE4_RGB8_OES 0x8B90 45 | #define GL_PALETTE4_RGBA8_OES 0x8B91 46 | #define GL_PALETTE4_R5_G6_B5_OES 0x8B92 47 | #define GL_PALETTE4_RGBA4_OES 0x8B93 48 | #define GL_PALETTE4_RGB5_A1_OES 0x8B94 49 | #define GL_PALETTE8_RGB8_OES 0x8B95 50 | #define GL_PALETTE8_RGBA8_OES 0x8B96 51 | #define GL_PALETTE8_R5_G6_B5_OES 0x8B97 52 | #define GL_PALETTE8_RGBA4_OES 0x8B98 53 | #define GL_PALETTE8_RGB5_A1_OES 0x8B99 54 | #endif 55 | 56 | /* GL_OES_depth24 */ 57 | #ifndef GL_OES_depth24 58 | #define GL_DEPTH_COMPONENT24_OES 0x81A6 59 | #endif 60 | 61 | /* GL_OES_depth32 */ 62 | #ifndef GL_OES_depth32 63 | #define GL_DEPTH_COMPONENT32_OES 0x81A7 64 | #endif 65 | 66 | /* GL_OES_depth_texture */ 67 | /* No new tokens introduced by this extension. */ 68 | 69 | /* GL_OES_EGL_image */ 70 | #ifndef GL_OES_EGL_image 71 | typedef void* GLeglImageOES; 72 | #endif 73 | 74 | /* GL_OES_EGL_image_external */ 75 | #ifndef GL_OES_EGL_image_external 76 | /* GLeglImageOES defined in GL_OES_EGL_image already. */ 77 | #define GL_TEXTURE_EXTERNAL_OES 0x8D65 78 | #define GL_SAMPLER_EXTERNAL_OES 0x8D66 79 | #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 80 | #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 81 | #endif 82 | 83 | /* GL_OES_element_index_uint */ 84 | #ifndef GL_OES_element_index_uint 85 | #define GL_UNSIGNED_INT 0x1405 86 | #endif 87 | 88 | /* GL_OES_get_program_binary */ 89 | #ifndef GL_OES_get_program_binary 90 | #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 91 | #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE 92 | #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF 93 | #endif 94 | 95 | /* GL_OES_mapbuffer */ 96 | #ifndef GL_OES_mapbuffer 97 | #define GL_WRITE_ONLY_OES 0x88B9 98 | #define GL_BUFFER_ACCESS_OES 0x88BB 99 | #define GL_BUFFER_MAPPED_OES 0x88BC 100 | #define GL_BUFFER_MAP_POINTER_OES 0x88BD 101 | #endif 102 | 103 | /* GL_OES_packed_depth_stencil */ 104 | #ifndef GL_OES_packed_depth_stencil 105 | #define GL_DEPTH_STENCIL_OES 0x84F9 106 | #define GL_UNSIGNED_INT_24_8_OES 0x84FA 107 | #define GL_DEPTH24_STENCIL8_OES 0x88F0 108 | #endif 109 | 110 | /* GL_OES_required_internalformat */ 111 | #ifndef GL_OES_required_internalformat 112 | #define GL_ALPHA8_OES 0x803C 113 | #define GL_DEPTH_COMPONENT16_OES 0x81A5 114 | /* reuse GL_DEPTH_COMPONENT24_OES */ 115 | /* reuse GL_DEPTH24_STENCIL8_OES */ 116 | /* reuse GL_DEPTH_COMPONENT32_OES */ 117 | #define GL_LUMINANCE4_ALPHA4_OES 0x8043 118 | #define GL_LUMINANCE8_ALPHA8_OES 0x8045 119 | #define GL_LUMINANCE8_OES 0x8040 120 | #define GL_RGBA4_OES 0x8056 121 | #define GL_RGB5_A1_OES 0x8057 122 | #define GL_RGB565_OES 0x8D62 123 | /* reuse GL_RGB8_OES */ 124 | /* reuse GL_RGBA8_OES */ 125 | /* reuse GL_RGB10_EXT */ 126 | /* reuse GL_RGB10_A2_EXT */ 127 | #endif 128 | 129 | /* GL_OES_rgb8_rgba8 */ 130 | #ifndef GL_OES_rgb8_rgba8 131 | #define GL_RGB8_OES 0x8051 132 | #define GL_RGBA8_OES 0x8058 133 | #endif 134 | 135 | /* GL_OES_standard_derivatives */ 136 | #ifndef GL_OES_standard_derivatives 137 | #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B 138 | #endif 139 | 140 | /* GL_OES_stencil1 */ 141 | #ifndef GL_OES_stencil1 142 | #define GL_STENCIL_INDEX1_OES 0x8D46 143 | #endif 144 | 145 | /* GL_OES_stencil4 */ 146 | #ifndef GL_OES_stencil4 147 | #define GL_STENCIL_INDEX4_OES 0x8D47 148 | #endif 149 | 150 | #ifndef GL_OES_surfaceless_context 151 | #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 152 | #endif 153 | 154 | /* GL_OES_texture_3D */ 155 | #ifndef GL_OES_texture_3D 156 | #define GL_TEXTURE_WRAP_R_OES 0x8072 157 | #define GL_TEXTURE_3D_OES 0x806F 158 | #define GL_TEXTURE_BINDING_3D_OES 0x806A 159 | #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 160 | #define GL_SAMPLER_3D_OES 0x8B5F 161 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 162 | #endif 163 | 164 | /* GL_OES_texture_float */ 165 | /* No new tokens introduced by this extension. */ 166 | 167 | /* GL_OES_texture_float_linear */ 168 | /* No new tokens introduced by this extension. */ 169 | 170 | /* GL_OES_texture_half_float */ 171 | #ifndef GL_OES_texture_half_float 172 | #define GL_HALF_FLOAT_OES 0x8D61 173 | #endif 174 | 175 | /* GL_OES_texture_half_float_linear */ 176 | /* No new tokens introduced by this extension. */ 177 | 178 | /* GL_OES_texture_npot */ 179 | /* No new tokens introduced by this extension. */ 180 | 181 | /* GL_OES_vertex_array_object */ 182 | #ifndef GL_OES_vertex_array_object 183 | #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 184 | #endif 185 | 186 | /* GL_OES_vertex_half_float */ 187 | /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ 188 | 189 | /* GL_OES_vertex_type_10_10_10_2 */ 190 | #ifndef GL_OES_vertex_type_10_10_10_2 191 | #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 192 | #define GL_INT_10_10_10_2_OES 0x8DF7 193 | #endif 194 | 195 | /*------------------------------------------------------------------------* 196 | * KHR extension tokens 197 | *------------------------------------------------------------------------*/ 198 | 199 | #ifndef GL_KHR_debug 200 | typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); 201 | #define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242 202 | #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243 203 | #define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244 204 | #define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245 205 | #define GL_DEBUG_SOURCE_API_KHR 0x8246 206 | #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247 207 | #define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248 208 | #define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249 209 | #define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A 210 | #define GL_DEBUG_SOURCE_OTHER_KHR 0x824B 211 | #define GL_DEBUG_TYPE_ERROR_KHR 0x824C 212 | #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D 213 | #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E 214 | #define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F 215 | #define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250 216 | #define GL_DEBUG_TYPE_OTHER_KHR 0x8251 217 | #define GL_DEBUG_TYPE_MARKER_KHR 0x8268 218 | #define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269 219 | #define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A 220 | #define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B 221 | #define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C 222 | #define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D 223 | #define GL_BUFFER_KHR 0x82E0 224 | #define GL_SHADER_KHR 0x82E1 225 | #define GL_PROGRAM_KHR 0x82E2 226 | #define GL_QUERY_KHR 0x82E3 227 | /* PROGRAM_PIPELINE only in GL */ 228 | #define GL_SAMPLER_KHR 0x82E6 229 | /* DISPLAY_LIST only in GL */ 230 | #define GL_MAX_LABEL_LENGTH_KHR 0x82E8 231 | #define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143 232 | #define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144 233 | #define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145 234 | #define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146 235 | #define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147 236 | #define GL_DEBUG_SEVERITY_LOW_KHR 0x9148 237 | #define GL_DEBUG_OUTPUT_KHR 0x92E0 238 | #define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002 239 | #define GL_STACK_OVERFLOW_KHR 0x0503 240 | #define GL_STACK_UNDERFLOW_KHR 0x0504 241 | #endif 242 | 243 | #ifndef GL_KHR_texture_compression_astc_ldr 244 | #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 245 | #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 246 | #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 247 | #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 248 | #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 249 | #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 250 | #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 251 | #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 252 | #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 253 | #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 254 | #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA 255 | #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB 256 | #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC 257 | #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD 258 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 259 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 260 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 261 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 262 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 263 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 264 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 265 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 266 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 267 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 268 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA 269 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB 270 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC 271 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD 272 | #endif 273 | 274 | /*------------------------------------------------------------------------* 275 | * AMD extension tokens 276 | *------------------------------------------------------------------------*/ 277 | 278 | /* GL_AMD_compressed_3DC_texture */ 279 | #ifndef GL_AMD_compressed_3DC_texture 280 | #define GL_3DC_X_AMD 0x87F9 281 | #define GL_3DC_XY_AMD 0x87FA 282 | #endif 283 | 284 | /* GL_AMD_compressed_ATC_texture */ 285 | #ifndef GL_AMD_compressed_ATC_texture 286 | #define GL_ATC_RGB_AMD 0x8C92 287 | #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 288 | #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE 289 | #endif 290 | 291 | /* GL_AMD_performance_monitor */ 292 | #ifndef GL_AMD_performance_monitor 293 | #define GL_COUNTER_TYPE_AMD 0x8BC0 294 | #define GL_COUNTER_RANGE_AMD 0x8BC1 295 | #define GL_UNSIGNED_INT64_AMD 0x8BC2 296 | #define GL_PERCENTAGE_AMD 0x8BC3 297 | #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 298 | #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 299 | #define GL_PERFMON_RESULT_AMD 0x8BC6 300 | #endif 301 | 302 | /* GL_AMD_program_binary_Z400 */ 303 | #ifndef GL_AMD_program_binary_Z400 304 | #define GL_Z400_BINARY_AMD 0x8740 305 | #endif 306 | 307 | /*------------------------------------------------------------------------* 308 | * ANGLE extension tokens 309 | *------------------------------------------------------------------------*/ 310 | 311 | /* GL_ANGLE_depth_texture */ 312 | #ifndef GL_ANGLE_depth_texture 313 | #define GL_DEPTH_COMPONENT 0x1902 314 | #define GL_DEPTH_STENCIL_OES 0x84F9 315 | #define GL_UNSIGNED_SHORT 0x1403 316 | #define GL_UNSIGNED_INT 0x1405 317 | #define GL_UNSIGNED_INT_24_8_OES 0x84FA 318 | #define GL_DEPTH_COMPONENT16 0x81A5 319 | #define GL_DEPTH_COMPONENT32_OES 0x81A7 320 | #define GL_DEPTH24_STENCIL8_OES 0x88F0 321 | #endif 322 | 323 | /* GL_ANGLE_framebuffer_blit */ 324 | #ifndef GL_ANGLE_framebuffer_blit 325 | #define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 326 | #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 327 | #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 328 | #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA 329 | #endif 330 | 331 | /* GL_ANGLE_framebuffer_multisample */ 332 | #ifndef GL_ANGLE_framebuffer_multisample 333 | #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB 334 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 335 | #define GL_MAX_SAMPLES_ANGLE 0x8D57 336 | #endif 337 | 338 | /* GL_ANGLE_instanced_arrays */ 339 | #ifndef GL_ANGLE_instanced_arrays 340 | #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE 341 | #endif 342 | 343 | /* GL_ANGLE_pack_reverse_row_order */ 344 | #ifndef GL_ANGLE_pack_reverse_row_order 345 | #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 346 | #endif 347 | 348 | /* GL_ANGLE_program_binary */ 349 | #ifndef GL_ANGLE_program_binary 350 | #define GL_PROGRAM_BINARY_ANGLE 0x93A6 351 | #endif 352 | 353 | /* GL_ANGLE_texture_compression_dxt3 */ 354 | #ifndef GL_ANGLE_texture_compression_dxt3 355 | #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 356 | #endif 357 | 358 | /* GL_ANGLE_texture_compression_dxt5 */ 359 | #ifndef GL_ANGLE_texture_compression_dxt5 360 | #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 361 | #endif 362 | 363 | /* GL_ANGLE_texture_usage */ 364 | #ifndef GL_ANGLE_texture_usage 365 | #define GL_TEXTURE_USAGE_ANGLE 0x93A2 366 | #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 367 | #endif 368 | 369 | /* GL_ANGLE_translated_shader_source */ 370 | #ifndef GL_ANGLE_translated_shader_source 371 | #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 372 | #endif 373 | 374 | /*------------------------------------------------------------------------* 375 | * APPLE extension tokens 376 | *------------------------------------------------------------------------*/ 377 | 378 | /* GL_APPLE_copy_texture_levels */ 379 | /* No new tokens introduced by this extension. */ 380 | 381 | /* GL_APPLE_framebuffer_multisample */ 382 | #ifndef GL_APPLE_framebuffer_multisample 383 | #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB 384 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 385 | #define GL_MAX_SAMPLES_APPLE 0x8D57 386 | #define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 387 | #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 388 | #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 389 | #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA 390 | #endif 391 | 392 | /* GL_APPLE_rgb_422 */ 393 | #ifndef GL_APPLE_rgb_422 394 | #define GL_RGB_422_APPLE 0x8A1F 395 | #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA 396 | #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB 397 | #endif 398 | 399 | /* GL_APPLE_sync */ 400 | #ifndef GL_APPLE_sync 401 | 402 | #define GL_SYNC_OBJECT_APPLE 0x8A53 403 | #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 404 | #define GL_OBJECT_TYPE_APPLE 0x9112 405 | #define GL_SYNC_CONDITION_APPLE 0x9113 406 | #define GL_SYNC_STATUS_APPLE 0x9114 407 | #define GL_SYNC_FLAGS_APPLE 0x9115 408 | #define GL_SYNC_FENCE_APPLE 0x9116 409 | #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 410 | #define GL_UNSIGNALED_APPLE 0x9118 411 | #define GL_SIGNALED_APPLE 0x9119 412 | #define GL_ALREADY_SIGNALED_APPLE 0x911A 413 | #define GL_TIMEOUT_EXPIRED_APPLE 0x911B 414 | #define GL_CONDITION_SATISFIED_APPLE 0x911C 415 | #define GL_WAIT_FAILED_APPLE 0x911D 416 | #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 417 | #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull 418 | #endif 419 | 420 | /* GL_APPLE_texture_format_BGRA8888 */ 421 | #ifndef GL_APPLE_texture_format_BGRA8888 422 | #define GL_BGRA_EXT 0x80E1 423 | #endif 424 | 425 | /* GL_APPLE_texture_max_level */ 426 | #ifndef GL_APPLE_texture_max_level 427 | #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D 428 | #endif 429 | 430 | /*------------------------------------------------------------------------* 431 | * ARM extension tokens 432 | *------------------------------------------------------------------------*/ 433 | 434 | /* GL_ARM_mali_program_binary */ 435 | #ifndef GL_ARM_mali_program_binary 436 | #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 437 | #endif 438 | 439 | /* GL_ARM_mali_shader_binary */ 440 | #ifndef GL_ARM_mali_shader_binary 441 | #define GL_MALI_SHADER_BINARY_ARM 0x8F60 442 | #endif 443 | 444 | /* GL_ARM_rgba8 */ 445 | /* No new tokens introduced by this extension. */ 446 | 447 | /*------------------------------------------------------------------------* 448 | * EXT extension tokens 449 | *------------------------------------------------------------------------*/ 450 | 451 | /* GL_EXT_blend_minmax */ 452 | #ifndef GL_EXT_blend_minmax 453 | #define GL_MIN_EXT 0x8007 454 | #define GL_MAX_EXT 0x8008 455 | #endif 456 | 457 | /* GL_EXT_color_buffer_half_float */ 458 | #ifndef GL_EXT_color_buffer_half_float 459 | #define GL_RGBA16F_EXT 0x881A 460 | #define GL_RGB16F_EXT 0x881B 461 | #define GL_RG16F_EXT 0x822F 462 | #define GL_R16F_EXT 0x822D 463 | #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 464 | #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 465 | #endif 466 | 467 | /* GL_EXT_debug_label */ 468 | #ifndef GL_EXT_debug_label 469 | #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F 470 | #define GL_PROGRAM_OBJECT_EXT 0x8B40 471 | #define GL_SHADER_OBJECT_EXT 0x8B48 472 | #define GL_BUFFER_OBJECT_EXT 0x9151 473 | #define GL_QUERY_OBJECT_EXT 0x9153 474 | #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 475 | #endif 476 | 477 | /* GL_EXT_debug_marker */ 478 | /* No new tokens introduced by this extension. */ 479 | 480 | /* GL_EXT_discard_framebuffer */ 481 | #ifndef GL_EXT_discard_framebuffer 482 | #define GL_COLOR_EXT 0x1800 483 | #define GL_DEPTH_EXT 0x1801 484 | #define GL_STENCIL_EXT 0x1802 485 | #endif 486 | 487 | #ifndef GL_EXT_disjoint_timer_query 488 | #define GL_QUERY_COUNTER_BITS_EXT 0x8864 489 | #define GL_CURRENT_QUERY_EXT 0x8865 490 | #define GL_QUERY_RESULT_EXT 0x8866 491 | #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 492 | #define GL_TIME_ELAPSED_EXT 0x88BF 493 | #define GL_TIMESTAMP_EXT 0x8E28 494 | #define GL_GPU_DISJOINT_EXT 0x8FBB 495 | #endif 496 | 497 | #ifndef GL_EXT_draw_buffers 498 | #define GL_EXT_draw_buffers 1 499 | #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF 500 | #define GL_MAX_DRAW_BUFFERS_EXT 0x8824 501 | #define GL_DRAW_BUFFER0_EXT 0x8825 502 | #define GL_DRAW_BUFFER1_EXT 0x8826 503 | #define GL_DRAW_BUFFER2_EXT 0x8827 504 | #define GL_DRAW_BUFFER3_EXT 0x8828 505 | #define GL_DRAW_BUFFER4_EXT 0x8829 506 | #define GL_DRAW_BUFFER5_EXT 0x882A 507 | #define GL_DRAW_BUFFER6_EXT 0x882B 508 | #define GL_DRAW_BUFFER7_EXT 0x882C 509 | #define GL_DRAW_BUFFER8_EXT 0x882D 510 | #define GL_DRAW_BUFFER9_EXT 0x882E 511 | #define GL_DRAW_BUFFER10_EXT 0x882F 512 | #define GL_DRAW_BUFFER11_EXT 0x8830 513 | #define GL_DRAW_BUFFER12_EXT 0x8831 514 | #define GL_DRAW_BUFFER13_EXT 0x8832 515 | #define GL_DRAW_BUFFER14_EXT 0x8833 516 | #define GL_DRAW_BUFFER15_EXT 0x8834 517 | #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 518 | #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 519 | #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 520 | #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 521 | #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 522 | #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 523 | #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 524 | #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 525 | #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 526 | #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 527 | #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA 528 | #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB 529 | #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC 530 | #define GL_COLOR_ATTACHMENT13_EXT 0x8CED 531 | #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE 532 | #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF 533 | #endif 534 | 535 | /* GL_EXT_map_buffer_range */ 536 | #ifndef GL_EXT_map_buffer_range 537 | #define GL_MAP_READ_BIT_EXT 0x0001 538 | #define GL_MAP_WRITE_BIT_EXT 0x0002 539 | #define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 540 | #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 541 | #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 542 | #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 543 | #endif 544 | 545 | /* GL_EXT_multisampled_render_to_texture */ 546 | #ifndef GL_EXT_multisampled_render_to_texture 547 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C 548 | /* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */ 549 | #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB 550 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 551 | #define GL_MAX_SAMPLES_EXT 0x8D57 552 | #endif 553 | 554 | /* GL_EXT_multiview_draw_buffers */ 555 | #ifndef GL_EXT_multiview_draw_buffers 556 | #define GL_COLOR_ATTACHMENT_EXT 0x90F0 557 | #define GL_MULTIVIEW_EXT 0x90F1 558 | #define GL_DRAW_BUFFER_EXT 0x0C01 559 | #define GL_READ_BUFFER_EXT 0x0C02 560 | #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 561 | #endif 562 | 563 | /* GL_EXT_multi_draw_arrays */ 564 | /* No new tokens introduced by this extension. */ 565 | 566 | /* GL_EXT_occlusion_query_boolean */ 567 | #ifndef GL_EXT_occlusion_query_boolean 568 | #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F 569 | #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A 570 | #define GL_CURRENT_QUERY_EXT 0x8865 571 | #define GL_QUERY_RESULT_EXT 0x8866 572 | #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 573 | #endif 574 | 575 | /* GL_EXT_read_format_bgra */ 576 | #ifndef GL_EXT_read_format_bgra 577 | #define GL_BGRA_EXT 0x80E1 578 | #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 579 | #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 580 | #endif 581 | 582 | /* GL_EXT_robustness */ 583 | #ifndef GL_EXT_robustness 584 | /* reuse GL_NO_ERROR */ 585 | #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 586 | #define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 587 | #define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 588 | #define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 589 | #define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 590 | #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 591 | #define GL_NO_RESET_NOTIFICATION_EXT 0x8261 592 | #endif 593 | 594 | /* GL_EXT_separate_shader_objects */ 595 | #ifndef GL_EXT_separate_shader_objects 596 | #define GL_VERTEX_SHADER_BIT_EXT 0x00000001 597 | #define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 598 | #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF 599 | #define GL_PROGRAM_SEPARABLE_EXT 0x8258 600 | #define GL_ACTIVE_PROGRAM_EXT 0x8259 601 | #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A 602 | #endif 603 | 604 | /* GL_EXT_shader_framebuffer_fetch */ 605 | #ifndef GL_EXT_shader_framebuffer_fetch 606 | #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 607 | #endif 608 | 609 | /* GL_EXT_shader_texture_lod */ 610 | /* No new tokens introduced by this extension. */ 611 | 612 | /* GL_EXT_shadow_samplers */ 613 | #ifndef GL_EXT_shadow_samplers 614 | #define GL_TEXTURE_COMPARE_MODE_EXT 0x884C 615 | #define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D 616 | #define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E 617 | #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 618 | #endif 619 | 620 | /* GL_EXT_sRGB */ 621 | #ifndef GL_EXT_sRGB 622 | #define GL_SRGB_EXT 0x8C40 623 | #define GL_SRGB_ALPHA_EXT 0x8C42 624 | #define GL_SRGB8_ALPHA8_EXT 0x8C43 625 | #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 626 | #endif 627 | 628 | /* GL_EXT_sRGB_write_control */ 629 | #ifndef GL_EXT_sRGB_write_control 630 | #define GL_EXT_sRGB_write_control 1 631 | #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 632 | #endif 633 | 634 | /* GL_EXT_texture_compression_dxt1 */ 635 | #ifndef GL_EXT_texture_compression_dxt1 636 | #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 637 | #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 638 | #endif 639 | 640 | /* GL_EXT_texture_filter_anisotropic */ 641 | #ifndef GL_EXT_texture_filter_anisotropic 642 | #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE 643 | #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF 644 | #endif 645 | 646 | /* GL_EXT_texture_format_BGRA8888 */ 647 | #ifndef GL_EXT_texture_format_BGRA8888 648 | #define GL_BGRA_EXT 0x80E1 649 | #endif 650 | 651 | /* GL_EXT_texture_rg */ 652 | #ifndef GL_EXT_texture_rg 653 | #define GL_RED_EXT 0x1903 654 | #define GL_RG_EXT 0x8227 655 | #define GL_R8_EXT 0x8229 656 | #define GL_RG8_EXT 0x822B 657 | #endif 658 | 659 | /* GL_EXT_texture_sRGB_decode */ 660 | #ifndef GL_EXT_texture_sRGB_decode 661 | #define GL_EXT_texture_sRGB_decode 1 662 | #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 663 | #define GL_DECODE_EXT 0x8A49 664 | #define GL_SKIP_DECODE_EXT 0x8A4A 665 | #endif 666 | 667 | /* GL_EXT_texture_storage */ 668 | #ifndef GL_EXT_texture_storage 669 | #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F 670 | #define GL_ALPHA8_EXT 0x803C 671 | #define GL_LUMINANCE8_EXT 0x8040 672 | #define GL_LUMINANCE8_ALPHA8_EXT 0x8045 673 | #define GL_RGBA32F_EXT 0x8814 674 | #define GL_RGB32F_EXT 0x8815 675 | #define GL_ALPHA32F_EXT 0x8816 676 | #define GL_LUMINANCE32F_EXT 0x8818 677 | #define GL_LUMINANCE_ALPHA32F_EXT 0x8819 678 | /* reuse GL_RGBA16F_EXT */ 679 | /* reuse GL_RGB16F_EXT */ 680 | #define GL_ALPHA16F_EXT 0x881C 681 | #define GL_LUMINANCE16F_EXT 0x881E 682 | #define GL_LUMINANCE_ALPHA16F_EXT 0x881F 683 | #define GL_RGB10_A2_EXT 0x8059 684 | #define GL_RGB10_EXT 0x8052 685 | #define GL_BGRA8_EXT 0x93A1 686 | #define GL_R8_EXT 0x8229 687 | #define GL_RG8_EXT 0x822B 688 | #define GL_R32F_EXT 0x822E 689 | #define GL_RG32F_EXT 0x8230 690 | #define GL_R16F_EXT 0x822D 691 | #define GL_RG16F_EXT 0x822F 692 | #endif 693 | 694 | /* GL_EXT_texture_type_2_10_10_10_REV */ 695 | #ifndef GL_EXT_texture_type_2_10_10_10_REV 696 | #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 697 | #endif 698 | 699 | /* GL_EXT_unpack_subimage */ 700 | #ifndef GL_EXT_unpack_subimage 701 | #define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2 702 | #define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3 703 | #define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 704 | #endif 705 | 706 | /*------------------------------------------------------------------------* 707 | * DMP extension tokens 708 | *------------------------------------------------------------------------*/ 709 | 710 | /* GL_DMP_shader_binary */ 711 | #ifndef GL_DMP_shader_binary 712 | #define GL_SHADER_BINARY_DMP 0x9250 713 | #endif 714 | 715 | /*------------------------------------------------------------------------* 716 | * FJ extension tokens 717 | *------------------------------------------------------------------------*/ 718 | 719 | /* GL_FJ_shader_binary_GCCSO */ 720 | #ifndef GL_FJ_shader_binary_GCCSO 721 | #define GL_GCCSO_SHADER_BINARY_FJ 0x9260 722 | #endif 723 | 724 | /*------------------------------------------------------------------------* 725 | * IMG extension tokens 726 | *------------------------------------------------------------------------*/ 727 | 728 | /* GL_IMG_program_binary */ 729 | #ifndef GL_IMG_program_binary 730 | #define GL_SGX_PROGRAM_BINARY_IMG 0x9130 731 | #endif 732 | 733 | /* GL_IMG_read_format */ 734 | #ifndef GL_IMG_read_format 735 | #define GL_BGRA_IMG 0x80E1 736 | #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 737 | #endif 738 | 739 | /* GL_IMG_shader_binary */ 740 | #ifndef GL_IMG_shader_binary 741 | #define GL_SGX_BINARY_IMG 0x8C0A 742 | #endif 743 | 744 | /* GL_IMG_texture_compression_pvrtc */ 745 | #ifndef GL_IMG_texture_compression_pvrtc 746 | #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 747 | #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 748 | #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 749 | #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 750 | #endif 751 | 752 | /* GL_IMG_texture_compression_pvrtc2 */ 753 | #ifndef GL_IMG_texture_compression_pvrtc2 754 | #define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 755 | #define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 756 | #endif 757 | 758 | /* GL_IMG_multisampled_render_to_texture */ 759 | #ifndef GL_IMG_multisampled_render_to_texture 760 | #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 761 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 762 | #define GL_MAX_SAMPLES_IMG 0x9135 763 | #define GL_TEXTURE_SAMPLES_IMG 0x9136 764 | #endif 765 | 766 | /*------------------------------------------------------------------------* 767 | * NV extension tokens 768 | *------------------------------------------------------------------------*/ 769 | 770 | /* GL_NV_coverage_sample */ 771 | #ifndef GL_NV_coverage_sample 772 | #define GL_COVERAGE_COMPONENT_NV 0x8ED0 773 | #define GL_COVERAGE_COMPONENT4_NV 0x8ED1 774 | #define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 775 | #define GL_COVERAGE_BUFFERS_NV 0x8ED3 776 | #define GL_COVERAGE_SAMPLES_NV 0x8ED4 777 | #define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 778 | #define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 779 | #define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 780 | #define GL_COVERAGE_BUFFER_BIT_NV 0x00008000 781 | #endif 782 | 783 | /* GL_NV_depth_nonlinear */ 784 | #ifndef GL_NV_depth_nonlinear 785 | #define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C 786 | #endif 787 | 788 | /* GL_NV_draw_buffers */ 789 | #ifndef GL_NV_draw_buffers 790 | #define GL_MAX_DRAW_BUFFERS_NV 0x8824 791 | #define GL_DRAW_BUFFER0_NV 0x8825 792 | #define GL_DRAW_BUFFER1_NV 0x8826 793 | #define GL_DRAW_BUFFER2_NV 0x8827 794 | #define GL_DRAW_BUFFER3_NV 0x8828 795 | #define GL_DRAW_BUFFER4_NV 0x8829 796 | #define GL_DRAW_BUFFER5_NV 0x882A 797 | #define GL_DRAW_BUFFER6_NV 0x882B 798 | #define GL_DRAW_BUFFER7_NV 0x882C 799 | #define GL_DRAW_BUFFER8_NV 0x882D 800 | #define GL_DRAW_BUFFER9_NV 0x882E 801 | #define GL_DRAW_BUFFER10_NV 0x882F 802 | #define GL_DRAW_BUFFER11_NV 0x8830 803 | #define GL_DRAW_BUFFER12_NV 0x8831 804 | #define GL_DRAW_BUFFER13_NV 0x8832 805 | #define GL_DRAW_BUFFER14_NV 0x8833 806 | #define GL_DRAW_BUFFER15_NV 0x8834 807 | #define GL_COLOR_ATTACHMENT0_NV 0x8CE0 808 | #define GL_COLOR_ATTACHMENT1_NV 0x8CE1 809 | #define GL_COLOR_ATTACHMENT2_NV 0x8CE2 810 | #define GL_COLOR_ATTACHMENT3_NV 0x8CE3 811 | #define GL_COLOR_ATTACHMENT4_NV 0x8CE4 812 | #define GL_COLOR_ATTACHMENT5_NV 0x8CE5 813 | #define GL_COLOR_ATTACHMENT6_NV 0x8CE6 814 | #define GL_COLOR_ATTACHMENT7_NV 0x8CE7 815 | #define GL_COLOR_ATTACHMENT8_NV 0x8CE8 816 | #define GL_COLOR_ATTACHMENT9_NV 0x8CE9 817 | #define GL_COLOR_ATTACHMENT10_NV 0x8CEA 818 | #define GL_COLOR_ATTACHMENT11_NV 0x8CEB 819 | #define GL_COLOR_ATTACHMENT12_NV 0x8CEC 820 | #define GL_COLOR_ATTACHMENT13_NV 0x8CED 821 | #define GL_COLOR_ATTACHMENT14_NV 0x8CEE 822 | #define GL_COLOR_ATTACHMENT15_NV 0x8CEF 823 | #endif 824 | 825 | /* GL_NV_draw_instanced */ 826 | /* No new tokens introduced by this extension. */ 827 | 828 | /* GL_NV_fbo_color_attachments */ 829 | #ifndef GL_NV_fbo_color_attachments 830 | #define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF 831 | /* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */ 832 | #endif 833 | 834 | /* GL_NV_fence */ 835 | #ifndef GL_NV_fence 836 | #define GL_ALL_COMPLETED_NV 0x84F2 837 | #define GL_FENCE_STATUS_NV 0x84F3 838 | #define GL_FENCE_CONDITION_NV 0x84F4 839 | #endif 840 | 841 | /* GL_NV_framebuffer_blit */ 842 | #ifndef GL_NV_framebuffer_blit 843 | #define GL_READ_FRAMEBUFFER_NV 0x8CA8 844 | #define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 845 | #define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 846 | #define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA 847 | #endif 848 | 849 | /* GL_NV_framebuffer_multisample */ 850 | #ifndef GL_NV_framebuffer_multisample 851 | #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB 852 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 853 | #define GL_MAX_SAMPLES_NV 0x8D57 854 | #endif 855 | 856 | /* GL_NV_generate_mipmap_sRGB */ 857 | /* No new tokens introduced by this extension. */ 858 | 859 | /* GL_NV_instanced_arrays */ 860 | #ifndef GL_NV_instanced_arrays 861 | #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE 862 | #endif 863 | 864 | /* GL_NV_read_buffer */ 865 | #ifndef GL_NV_read_buffer 866 | #define GL_READ_BUFFER_NV 0x0C02 867 | #endif 868 | 869 | /* GL_NV_read_buffer_front */ 870 | /* No new tokens introduced by this extension. */ 871 | 872 | /* GL_NV_read_depth */ 873 | /* No new tokens introduced by this extension. */ 874 | 875 | /* GL_NV_read_depth_stencil */ 876 | /* No new tokens introduced by this extension. */ 877 | 878 | /* GL_NV_read_stencil */ 879 | /* No new tokens introduced by this extension. */ 880 | 881 | /* GL_NV_shadow_samplers_array */ 882 | #ifndef GL_NV_shadow_samplers_array 883 | #define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 884 | #endif 885 | 886 | /* GL_NV_shadow_samplers_cube */ 887 | #ifndef GL_NV_shadow_samplers_cube 888 | #define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5 889 | #endif 890 | 891 | /* GL_NV_sRGB_formats */ 892 | #ifndef GL_NV_sRGB_formats 893 | #define GL_SLUMINANCE_NV 0x8C46 894 | #define GL_SLUMINANCE_ALPHA_NV 0x8C44 895 | #define GL_SRGB8_NV 0x8C41 896 | #define GL_SLUMINANCE8_NV 0x8C47 897 | #define GL_SLUMINANCE8_ALPHA8_NV 0x8C45 898 | #define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C 899 | #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D 900 | #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E 901 | #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F 902 | #define GL_ETC1_SRGB8_NV 0x88EE 903 | #endif 904 | 905 | /* GL_NV_texture_border_clamp */ 906 | #ifndef GL_NV_texture_border_clamp 907 | #define GL_TEXTURE_BORDER_COLOR_NV 0x1004 908 | #define GL_CLAMP_TO_BORDER_NV 0x812D 909 | #endif 910 | 911 | /* GL_NV_texture_compression_s3tc_update */ 912 | /* No new tokens introduced by this extension. */ 913 | 914 | /* GL_NV_texture_npot_2D_mipmap */ 915 | /* No new tokens introduced by this extension. */ 916 | 917 | /*------------------------------------------------------------------------* 918 | * QCOM extension tokens 919 | *------------------------------------------------------------------------*/ 920 | 921 | /* GL_QCOM_alpha_test */ 922 | #ifndef GL_QCOM_alpha_test 923 | #define GL_ALPHA_TEST_QCOM 0x0BC0 924 | #define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 925 | #define GL_ALPHA_TEST_REF_QCOM 0x0BC2 926 | #endif 927 | 928 | /* GL_QCOM_binning_control */ 929 | #ifndef GL_QCOM_binning_control 930 | #define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 931 | #define GL_CPU_OPTIMIZED_QCOM 0x8FB1 932 | #define GL_GPU_OPTIMIZED_QCOM 0x8FB2 933 | #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 934 | #endif 935 | 936 | /* GL_QCOM_driver_control */ 937 | /* No new tokens introduced by this extension. */ 938 | 939 | /* GL_QCOM_extended_get */ 940 | #ifndef GL_QCOM_extended_get 941 | #define GL_TEXTURE_WIDTH_QCOM 0x8BD2 942 | #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 943 | #define GL_TEXTURE_DEPTH_QCOM 0x8BD4 944 | #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 945 | #define GL_TEXTURE_FORMAT_QCOM 0x8BD6 946 | #define GL_TEXTURE_TYPE_QCOM 0x8BD7 947 | #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 948 | #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 949 | #define GL_TEXTURE_TARGET_QCOM 0x8BDA 950 | #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB 951 | #define GL_STATE_RESTORE 0x8BDC 952 | #endif 953 | 954 | /* GL_QCOM_extended_get2 */ 955 | /* No new tokens introduced by this extension. */ 956 | 957 | /* GL_QCOM_perfmon_global_mode */ 958 | #ifndef GL_QCOM_perfmon_global_mode 959 | #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 960 | #endif 961 | 962 | /* GL_QCOM_writeonly_rendering */ 963 | #ifndef GL_QCOM_writeonly_rendering 964 | #define GL_WRITEONLY_RENDERING_QCOM 0x8823 965 | #endif 966 | 967 | /* GL_QCOM_tiled_rendering */ 968 | #ifndef GL_QCOM_tiled_rendering 969 | #define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 970 | #define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 971 | #define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 972 | #define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 973 | #define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 974 | #define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 975 | #define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 976 | #define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 977 | #define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 978 | #define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 979 | #define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 980 | #define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 981 | #define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 982 | #define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 983 | #define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 984 | #define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 985 | #define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 986 | #define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 987 | #define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 988 | #define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 989 | #define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 990 | #define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 991 | #define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 992 | #define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 993 | #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 994 | #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 995 | #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 996 | #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 997 | #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 998 | #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 999 | #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 1000 | #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 1001 | #endif 1002 | 1003 | /*------------------------------------------------------------------------* 1004 | * VIV extension tokens 1005 | *------------------------------------------------------------------------*/ 1006 | 1007 | /* GL_VIV_shader_binary */ 1008 | #ifndef GL_VIV_shader_binary 1009 | #define GL_SHADER_BINARY_VIV 0x8FC4 1010 | #endif 1011 | 1012 | /*------------------------------------------------------------------------* 1013 | * End of extension tokens, start of corresponding extension functions 1014 | *------------------------------------------------------------------------*/ 1015 | 1016 | /*------------------------------------------------------------------------* 1017 | * OES extension functions 1018 | *------------------------------------------------------------------------*/ 1019 | 1020 | /* GL_OES_compressed_ETC1_RGB8_texture */ 1021 | #ifndef GL_OES_compressed_ETC1_RGB8_texture 1022 | #define GL_OES_compressed_ETC1_RGB8_texture 1 1023 | #endif 1024 | 1025 | /* GL_OES_compressed_paletted_texture */ 1026 | #ifndef GL_OES_compressed_paletted_texture 1027 | #define GL_OES_compressed_paletted_texture 1 1028 | #endif 1029 | 1030 | /* GL_OES_depth24 */ 1031 | #ifndef GL_OES_depth24 1032 | #define GL_OES_depth24 1 1033 | #endif 1034 | 1035 | /* GL_OES_depth32 */ 1036 | #ifndef GL_OES_depth32 1037 | #define GL_OES_depth32 1 1038 | #endif 1039 | 1040 | /* GL_OES_depth_texture */ 1041 | #ifndef GL_OES_depth_texture 1042 | #define GL_OES_depth_texture 1 1043 | #endif 1044 | 1045 | /* GL_OES_EGL_image */ 1046 | #ifndef GL_OES_EGL_image 1047 | #define GL_OES_EGL_image 1 1048 | #ifdef GL_GLEXT_PROTOTYPES 1049 | GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); 1050 | GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); 1051 | #endif 1052 | typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); 1053 | typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); 1054 | #endif 1055 | 1056 | /* GL_OES_EGL_image_external */ 1057 | #ifndef GL_OES_EGL_image_external 1058 | #define GL_OES_EGL_image_external 1 1059 | /* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ 1060 | #endif 1061 | 1062 | /* GL_OES_element_index_uint */ 1063 | #ifndef GL_OES_element_index_uint 1064 | #define GL_OES_element_index_uint 1 1065 | #endif 1066 | 1067 | /* GL_OES_fbo_render_mipmap */ 1068 | #ifndef GL_OES_fbo_render_mipmap 1069 | #define GL_OES_fbo_render_mipmap 1 1070 | #endif 1071 | 1072 | /* GL_OES_fragment_precision_high */ 1073 | #ifndef GL_OES_fragment_precision_high 1074 | #define GL_OES_fragment_precision_high 1 1075 | #endif 1076 | 1077 | /* GL_OES_get_program_binary */ 1078 | #ifndef GL_OES_get_program_binary 1079 | #define GL_OES_get_program_binary 1 1080 | #ifdef GL_GLEXT_PROTOTYPES 1081 | GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); 1082 | GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); 1083 | #endif 1084 | typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); 1085 | typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); 1086 | #endif 1087 | 1088 | /* GL_OES_mapbuffer */ 1089 | #ifndef GL_OES_mapbuffer 1090 | #define GL_OES_mapbuffer 1 1091 | #ifdef GL_GLEXT_PROTOTYPES 1092 | GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); 1093 | GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); 1094 | GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params); 1095 | #endif 1096 | typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); 1097 | typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); 1098 | typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params); 1099 | #endif 1100 | 1101 | /* GL_OES_packed_depth_stencil */ 1102 | #ifndef GL_OES_packed_depth_stencil 1103 | #define GL_OES_packed_depth_stencil 1 1104 | #endif 1105 | 1106 | /* GL_OES_required_internalformat */ 1107 | #ifndef GL_OES_required_internalformat 1108 | #define GL_OES_required_internalformat 1 1109 | #endif 1110 | 1111 | /* GL_OES_rgb8_rgba8 */ 1112 | #ifndef GL_OES_rgb8_rgba8 1113 | #define GL_OES_rgb8_rgba8 1 1114 | #endif 1115 | 1116 | /* GL_OES_standard_derivatives */ 1117 | #ifndef GL_OES_standard_derivatives 1118 | #define GL_OES_standard_derivatives 1 1119 | #endif 1120 | 1121 | /* GL_OES_stencil1 */ 1122 | #ifndef GL_OES_stencil1 1123 | #define GL_OES_stencil1 1 1124 | #endif 1125 | 1126 | /* GL_OES_stencil4 */ 1127 | #ifndef GL_OES_stencil4 1128 | #define GL_OES_stencil4 1 1129 | #endif 1130 | 1131 | #ifndef GL_OES_surfaceless_context 1132 | #define GL_OES_surfaceless_context 1 1133 | #endif 1134 | 1135 | /* GL_OES_texture_3D */ 1136 | #ifndef GL_OES_texture_3D 1137 | #define GL_OES_texture_3D 1 1138 | #ifdef GL_GLEXT_PROTOTYPES 1139 | 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); 1140 | 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); 1141 | GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); 1142 | 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); 1143 | 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); 1144 | GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); 1145 | #endif 1146 | 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); 1147 | 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); 1148 | typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); 1149 | typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); 1150 | 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); 1151 | typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); 1152 | #endif 1153 | 1154 | /* GL_OES_texture_float */ 1155 | #ifndef GL_OES_texture_float 1156 | #define GL_OES_texture_float 1 1157 | #endif 1158 | 1159 | /* GL_OES_texture_float_linear */ 1160 | #ifndef GL_OES_texture_float_linear 1161 | #define GL_OES_texture_float_linear 1 1162 | #endif 1163 | 1164 | /* GL_OES_texture_half_float */ 1165 | #ifndef GL_OES_texture_half_float 1166 | #define GL_OES_texture_half_float 1 1167 | #endif 1168 | 1169 | /* GL_OES_texture_half_float_linear */ 1170 | #ifndef GL_OES_texture_half_float_linear 1171 | #define GL_OES_texture_half_float_linear 1 1172 | #endif 1173 | 1174 | /* GL_OES_texture_npot */ 1175 | #ifndef GL_OES_texture_npot 1176 | #define GL_OES_texture_npot 1 1177 | #endif 1178 | 1179 | /* GL_OES_vertex_array_object */ 1180 | #ifndef GL_OES_vertex_array_object 1181 | #define GL_OES_vertex_array_object 1 1182 | #ifdef GL_GLEXT_PROTOTYPES 1183 | GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); 1184 | GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); 1185 | GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); 1186 | GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); 1187 | #endif 1188 | typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); 1189 | typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); 1190 | typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); 1191 | typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); 1192 | #endif 1193 | 1194 | /* GL_OES_vertex_half_float */ 1195 | #ifndef GL_OES_vertex_half_float 1196 | #define GL_OES_vertex_half_float 1 1197 | #endif 1198 | 1199 | /* GL_OES_vertex_type_10_10_10_2 */ 1200 | #ifndef GL_OES_vertex_type_10_10_10_2 1201 | #define GL_OES_vertex_type_10_10_10_2 1 1202 | #endif 1203 | 1204 | /*------------------------------------------------------------------------* 1205 | * KHR extension functions 1206 | *------------------------------------------------------------------------*/ 1207 | 1208 | #ifndef GL_KHR_debug 1209 | #define GL_KHR_debug 1 1210 | #ifdef GL_GLEXT_PROTOTYPES 1211 | GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); 1212 | GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); 1213 | GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam); 1214 | GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); 1215 | GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message); 1216 | GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void); 1217 | GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); 1218 | GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); 1219 | GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label); 1220 | GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); 1221 | GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params); 1222 | #endif 1223 | typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); 1224 | typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); 1225 | typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam); 1226 | typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); 1227 | typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); 1228 | typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void); 1229 | typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); 1230 | typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); 1231 | typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label); 1232 | typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); 1233 | typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params); 1234 | #endif 1235 | 1236 | #ifndef GL_KHR_texture_compression_astc_ldr 1237 | #define GL_KHR_texture_compression_astc_ldr 1 1238 | #endif 1239 | 1240 | 1241 | /*------------------------------------------------------------------------* 1242 | * AMD extension functions 1243 | *------------------------------------------------------------------------*/ 1244 | 1245 | /* GL_AMD_compressed_3DC_texture */ 1246 | #ifndef GL_AMD_compressed_3DC_texture 1247 | #define GL_AMD_compressed_3DC_texture 1 1248 | #endif 1249 | 1250 | /* GL_AMD_compressed_ATC_texture */ 1251 | #ifndef GL_AMD_compressed_ATC_texture 1252 | #define GL_AMD_compressed_ATC_texture 1 1253 | #endif 1254 | 1255 | /* AMD_performance_monitor */ 1256 | #ifndef GL_AMD_performance_monitor 1257 | #define GL_AMD_performance_monitor 1 1258 | #ifdef GL_GLEXT_PROTOTYPES 1259 | GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); 1260 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); 1261 | GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); 1262 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); 1263 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); 1264 | GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); 1265 | GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); 1266 | GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); 1267 | GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); 1268 | GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); 1269 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); 1270 | #endif 1271 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); 1272 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); 1273 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); 1274 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); 1275 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); 1276 | typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); 1277 | typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); 1278 | typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); 1279 | typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); 1280 | typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); 1281 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); 1282 | #endif 1283 | 1284 | /* GL_AMD_program_binary_Z400 */ 1285 | #ifndef GL_AMD_program_binary_Z400 1286 | #define GL_AMD_program_binary_Z400 1 1287 | #endif 1288 | 1289 | /*------------------------------------------------------------------------* 1290 | * ANGLE extension functions 1291 | *------------------------------------------------------------------------*/ 1292 | 1293 | /* GL_ANGLE_depth_texture */ 1294 | #ifndef GL_ANGLE_depth_texture 1295 | #define GL_ANGLE_depth_texture 1 1296 | #endif 1297 | 1298 | /* GL_ANGLE_framebuffer_blit */ 1299 | #ifndef GL_ANGLE_framebuffer_blit 1300 | #define GL_ANGLE_framebuffer_blit 1 1301 | #ifdef GL_GLEXT_PROTOTYPES 1302 | 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); 1303 | #endif 1304 | 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); 1305 | #endif 1306 | 1307 | /* GL_ANGLE_framebuffer_multisample */ 1308 | #ifndef GL_ANGLE_framebuffer_multisample 1309 | #define GL_ANGLE_framebuffer_multisample 1 1310 | #ifdef GL_GLEXT_PROTOTYPES 1311 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1312 | #endif 1313 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1314 | #endif 1315 | 1316 | #ifndef GL_ANGLE_instanced_arrays 1317 | #define GL_ANGLE_instanced_arrays 1 1318 | #ifdef GL_GLEXT_PROTOTYPES 1319 | GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1320 | GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); 1321 | GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); 1322 | #endif 1323 | typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1324 | typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); 1325 | typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); 1326 | #endif 1327 | 1328 | /* GL_ANGLE_pack_reverse_row_order */ 1329 | #ifndef GL_ANGLE_pack_reverse_row_order 1330 | #define GL_ANGLE_pack_reverse_row_order 1 1331 | #endif 1332 | 1333 | /* GL_ANGLE_program_binary */ 1334 | #ifndef GL_ANGLE_program_binary 1335 | #define GL_ANGLE_program_binary 1 1336 | #endif 1337 | 1338 | /* GL_ANGLE_texture_compression_dxt3 */ 1339 | #ifndef GL_ANGLE_texture_compression_dxt3 1340 | #define GL_ANGLE_texture_compression_dxt3 1 1341 | #endif 1342 | 1343 | /* GL_ANGLE_texture_compression_dxt5 */ 1344 | #ifndef GL_ANGLE_texture_compression_dxt5 1345 | #define GL_ANGLE_texture_compression_dxt5 1 1346 | #endif 1347 | 1348 | /* GL_ANGLE_texture_usage */ 1349 | #ifndef GL_ANGLE_texture_usage 1350 | #define GL_ANGLE_texture_usage 1 1351 | #endif 1352 | 1353 | #ifndef GL_ANGLE_translated_shader_source 1354 | #define GL_ANGLE_translated_shader_source 1 1355 | #ifdef GL_GLEXT_PROTOTYPES 1356 | GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); 1357 | #endif 1358 | typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); 1359 | #endif 1360 | 1361 | /*------------------------------------------------------------------------* 1362 | * APPLE extension functions 1363 | *------------------------------------------------------------------------*/ 1364 | 1365 | /* GL_APPLE_copy_texture_levels */ 1366 | #ifndef GL_APPLE_copy_texture_levels 1367 | #define GL_APPLE_copy_texture_levels 1 1368 | #ifdef GL_GLEXT_PROTOTYPES 1369 | GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); 1370 | #endif 1371 | typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); 1372 | #endif 1373 | 1374 | /* GL_APPLE_framebuffer_multisample */ 1375 | #ifndef GL_APPLE_framebuffer_multisample 1376 | #define GL_APPLE_framebuffer_multisample 1 1377 | #ifdef GL_GLEXT_PROTOTYPES 1378 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1379 | GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); 1380 | #endif /* GL_GLEXT_PROTOTYPES */ 1381 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1382 | typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); 1383 | #endif 1384 | 1385 | /* GL_APPLE_rgb_422 */ 1386 | #ifndef GL_APPLE_rgb_422 1387 | #define GL_APPLE_rgb_422 1 1388 | #endif 1389 | 1390 | /* GL_APPLE_sync */ 1391 | #ifndef GL_APPLE_sync 1392 | #define GL_APPLE_sync 1 1393 | #ifdef GL_GLEXT_PROTOTYPES 1394 | GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); 1395 | GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); 1396 | GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); 1397 | GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); 1398 | GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); 1399 | GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); 1400 | GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); 1401 | #endif 1402 | typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); 1403 | typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); 1404 | typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); 1405 | typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); 1406 | typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); 1407 | typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); 1408 | typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); 1409 | #endif 1410 | 1411 | /* GL_APPLE_texture_format_BGRA8888 */ 1412 | #ifndef GL_APPLE_texture_format_BGRA8888 1413 | #define GL_APPLE_texture_format_BGRA8888 1 1414 | #endif 1415 | 1416 | /* GL_APPLE_texture_max_level */ 1417 | #ifndef GL_APPLE_texture_max_level 1418 | #define GL_APPLE_texture_max_level 1 1419 | #endif 1420 | 1421 | /*------------------------------------------------------------------------* 1422 | * ARM extension functions 1423 | *------------------------------------------------------------------------*/ 1424 | 1425 | /* GL_ARM_mali_program_binary */ 1426 | #ifndef GL_ARM_mali_program_binary 1427 | #define GL_ARM_mali_program_binary 1 1428 | #endif 1429 | 1430 | /* GL_ARM_mali_shader_binary */ 1431 | #ifndef GL_ARM_mali_shader_binary 1432 | #define GL_ARM_mali_shader_binary 1 1433 | #endif 1434 | 1435 | /* GL_ARM_rgba8 */ 1436 | #ifndef GL_ARM_rgba8 1437 | #define GL_ARM_rgba8 1 1438 | #endif 1439 | 1440 | /*------------------------------------------------------------------------* 1441 | * EXT extension functions 1442 | *------------------------------------------------------------------------*/ 1443 | 1444 | /* GL_EXT_blend_minmax */ 1445 | #ifndef GL_EXT_blend_minmax 1446 | #define GL_EXT_blend_minmax 1 1447 | #endif 1448 | 1449 | /* GL_EXT_color_buffer_half_float */ 1450 | #ifndef GL_EXT_color_buffer_half_float 1451 | #define GL_EXT_color_buffer_half_float 1 1452 | #endif 1453 | 1454 | /* GL_EXT_debug_label */ 1455 | #ifndef GL_EXT_debug_label 1456 | #define GL_EXT_debug_label 1 1457 | #ifdef GL_GLEXT_PROTOTYPES 1458 | GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); 1459 | GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); 1460 | #endif 1461 | typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); 1462 | typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); 1463 | #endif 1464 | 1465 | /* GL_EXT_debug_marker */ 1466 | #ifndef GL_EXT_debug_marker 1467 | #define GL_EXT_debug_marker 1 1468 | #ifdef GL_GLEXT_PROTOTYPES 1469 | GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); 1470 | GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); 1471 | GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); 1472 | #endif 1473 | typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); 1474 | typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); 1475 | typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); 1476 | #endif 1477 | 1478 | /* GL_EXT_discard_framebuffer */ 1479 | #ifndef GL_EXT_discard_framebuffer 1480 | #define GL_EXT_discard_framebuffer 1 1481 | #ifdef GL_GLEXT_PROTOTYPES 1482 | GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); 1483 | #endif 1484 | typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); 1485 | #endif 1486 | 1487 | #ifndef GL_EXT_disjoint_timer_query 1488 | #define GL_EXT_disjoint_timer_query 1 1489 | #ifdef GL_GLEXT_PROTOTYPES 1490 | GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); 1491 | GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); 1492 | GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); 1493 | GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); 1494 | GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); 1495 | GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target); 1496 | GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); 1497 | GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params); 1498 | GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); 1499 | GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); 1500 | GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); 1501 | #endif 1502 | typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); 1503 | typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); 1504 | typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); 1505 | typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); 1506 | typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); 1507 | typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target); 1508 | typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); 1509 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params); 1510 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); 1511 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); 1512 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); 1513 | #endif /* GL_EXT_disjoint_timer_query */ 1514 | 1515 | #ifndef GL_EXT_draw_buffers 1516 | #define GL_EXT_draw_buffers 1 1517 | #ifdef GL_GLEXT_PROTOTYPES 1518 | GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); 1519 | #endif 1520 | typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs); 1521 | #endif /* GL_EXT_draw_buffers */ 1522 | 1523 | /* GL_EXT_map_buffer_range */ 1524 | #ifndef GL_EXT_map_buffer_range 1525 | #define GL_EXT_map_buffer_range 1 1526 | #ifdef GL_GLEXT_PROTOTYPES 1527 | GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); 1528 | GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); 1529 | #endif 1530 | typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); 1531 | typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); 1532 | #endif 1533 | 1534 | /* GL_EXT_multisampled_render_to_texture */ 1535 | #ifndef GL_EXT_multisampled_render_to_texture 1536 | #define GL_EXT_multisampled_render_to_texture 1 1537 | #ifdef GL_GLEXT_PROTOTYPES 1538 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1539 | GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); 1540 | #endif 1541 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1542 | typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); 1543 | #endif 1544 | 1545 | /* GL_EXT_multiview_draw_buffers */ 1546 | #ifndef GL_EXT_multiview_draw_buffers 1547 | #define GL_EXT_multiview_draw_buffers 1 1548 | #ifdef GL_GLEXT_PROTOTYPES 1549 | GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); 1550 | GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); 1551 | GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); 1552 | #endif 1553 | typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); 1554 | typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); 1555 | typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); 1556 | #endif 1557 | 1558 | #ifndef GL_EXT_multi_draw_arrays 1559 | #define GL_EXT_multi_draw_arrays 1 1560 | #ifdef GL_GLEXT_PROTOTYPES 1561 | GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); 1562 | GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); 1563 | #endif /* GL_GLEXT_PROTOTYPES */ 1564 | typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); 1565 | typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); 1566 | #endif 1567 | 1568 | /* GL_EXT_occlusion_query_boolean */ 1569 | #ifndef GL_EXT_occlusion_query_boolean 1570 | #define GL_EXT_occlusion_query_boolean 1 1571 | /* All entry points also exist in GL_EXT_disjoint_timer_query */ 1572 | #endif 1573 | 1574 | /* GL_EXT_read_format_bgra */ 1575 | #ifndef GL_EXT_read_format_bgra 1576 | #define GL_EXT_read_format_bgra 1 1577 | #endif 1578 | 1579 | /* GL_EXT_robustness */ 1580 | #ifndef GL_EXT_robustness 1581 | #define GL_EXT_robustness 1 1582 | #ifdef GL_GLEXT_PROTOTYPES 1583 | GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); 1584 | GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); 1585 | GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); 1586 | GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); 1587 | #endif 1588 | typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); 1589 | typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); 1590 | typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); 1591 | typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); 1592 | #endif 1593 | 1594 | /* GL_EXT_separate_shader_objects */ 1595 | #ifndef GL_EXT_separate_shader_objects 1596 | #define GL_EXT_separate_shader_objects 1 1597 | #ifdef GL_GLEXT_PROTOTYPES 1598 | GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); 1599 | GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); 1600 | GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); 1601 | GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); 1602 | GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); 1603 | GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); 1604 | GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); 1605 | GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); 1606 | GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); 1607 | GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x); 1608 | GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y); 1609 | GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z); 1610 | GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); 1611 | GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x); 1612 | GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y); 1613 | GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); 1614 | GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 1615 | GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1616 | GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1617 | GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1618 | GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1619 | GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1620 | GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1621 | GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1622 | GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1623 | GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1624 | GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1625 | GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1626 | GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); 1627 | GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); 1628 | #endif 1629 | typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); 1630 | typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); 1631 | typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); 1632 | typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); 1633 | typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); 1634 | typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); 1635 | typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); 1636 | typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); 1637 | typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); 1638 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x); 1639 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y); 1640 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z); 1641 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); 1642 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x); 1643 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y); 1644 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); 1645 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 1646 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1647 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1648 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1649 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1650 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1651 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1652 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1653 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1654 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1655 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1656 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1657 | typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); 1658 | typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); 1659 | #endif 1660 | 1661 | /* GL_EXT_shader_framebuffer_fetch */ 1662 | #ifndef GL_EXT_shader_framebuffer_fetch 1663 | #define GL_EXT_shader_framebuffer_fetch 1 1664 | #endif 1665 | 1666 | /* GL_EXT_shader_texture_lod */ 1667 | #ifndef GL_EXT_shader_texture_lod 1668 | #define GL_EXT_shader_texture_lod 1 1669 | #endif 1670 | 1671 | /* GL_EXT_shadow_samplers */ 1672 | #ifndef GL_EXT_shadow_samplers 1673 | #define GL_EXT_shadow_samplers 1 1674 | #endif 1675 | 1676 | /* GL_EXT_sRGB */ 1677 | #ifndef GL_EXT_sRGB 1678 | #define GL_EXT_sRGB 1 1679 | #endif 1680 | 1681 | /* GL_EXT_texture_compression_dxt1 */ 1682 | #ifndef GL_EXT_texture_compression_dxt1 1683 | #define GL_EXT_texture_compression_dxt1 1 1684 | #endif 1685 | 1686 | /* GL_EXT_texture_filter_anisotropic */ 1687 | #ifndef GL_EXT_texture_filter_anisotropic 1688 | #define GL_EXT_texture_filter_anisotropic 1 1689 | #endif 1690 | 1691 | /* GL_EXT_texture_format_BGRA8888 */ 1692 | #ifndef GL_EXT_texture_format_BGRA8888 1693 | #define GL_EXT_texture_format_BGRA8888 1 1694 | #endif 1695 | 1696 | /* GL_EXT_texture_rg */ 1697 | #ifndef GL_EXT_texture_rg 1698 | #define GL_EXT_texture_rg 1 1699 | #endif 1700 | 1701 | /* GL_EXT_texture_storage */ 1702 | #ifndef GL_EXT_texture_storage 1703 | #define GL_EXT_texture_storage 1 1704 | #ifdef GL_GLEXT_PROTOTYPES 1705 | GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1706 | GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1707 | GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1708 | GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1709 | GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1710 | GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1711 | #endif 1712 | typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1713 | typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1714 | typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1715 | typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1716 | typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1717 | typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1718 | #endif 1719 | 1720 | /* GL_EXT_texture_type_2_10_10_10_REV */ 1721 | #ifndef GL_EXT_texture_type_2_10_10_10_REV 1722 | #define GL_EXT_texture_type_2_10_10_10_REV 1 1723 | #endif 1724 | 1725 | /* GL_EXT_unpack_subimage */ 1726 | #ifndef GL_EXT_unpack_subimage 1727 | #define GL_EXT_unpack_subimage 1 1728 | #endif 1729 | 1730 | /*------------------------------------------------------------------------* 1731 | * DMP extension functions 1732 | *------------------------------------------------------------------------*/ 1733 | 1734 | /* GL_DMP_shader_binary */ 1735 | #ifndef GL_DMP_shader_binary 1736 | #define GL_DMP_shader_binary 1 1737 | #endif 1738 | 1739 | /*------------------------------------------------------------------------* 1740 | * FJ extension functions 1741 | *------------------------------------------------------------------------*/ 1742 | 1743 | /* GL_FJ_shader_binary_GCCSO */ 1744 | #ifndef GL_FJ_shader_binary_GCCSO 1745 | #define GL_FJ_shader_binary_GCCSO 1 1746 | #endif 1747 | 1748 | /*------------------------------------------------------------------------* 1749 | * IMG extension functions 1750 | *------------------------------------------------------------------------*/ 1751 | 1752 | /* GL_IMG_program_binary */ 1753 | #ifndef GL_IMG_program_binary 1754 | #define GL_IMG_program_binary 1 1755 | #endif 1756 | 1757 | /* GL_IMG_read_format */ 1758 | #ifndef GL_IMG_read_format 1759 | #define GL_IMG_read_format 1 1760 | #endif 1761 | 1762 | /* GL_IMG_shader_binary */ 1763 | #ifndef GL_IMG_shader_binary 1764 | #define GL_IMG_shader_binary 1 1765 | #endif 1766 | 1767 | /* GL_IMG_texture_compression_pvrtc */ 1768 | #ifndef GL_IMG_texture_compression_pvrtc 1769 | #define GL_IMG_texture_compression_pvrtc 1 1770 | #endif 1771 | 1772 | /* GL_IMG_texture_compression_pvrtc2 */ 1773 | #ifndef GL_IMG_texture_compression_pvrtc2 1774 | #define GL_IMG_texture_compression_pvrtc2 1 1775 | #endif 1776 | 1777 | /* GL_IMG_multisampled_render_to_texture */ 1778 | #ifndef GL_IMG_multisampled_render_to_texture 1779 | #define GL_IMG_multisampled_render_to_texture 1 1780 | #ifdef GL_GLEXT_PROTOTYPES 1781 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1782 | GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); 1783 | #endif 1784 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1785 | typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); 1786 | #endif 1787 | 1788 | /*------------------------------------------------------------------------* 1789 | * NV extension functions 1790 | *------------------------------------------------------------------------*/ 1791 | 1792 | /* GL_NV_coverage_sample */ 1793 | #ifndef GL_NV_coverage_sample 1794 | #define GL_NV_coverage_sample 1 1795 | #ifdef GL_GLEXT_PROTOTYPES 1796 | GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); 1797 | GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); 1798 | #endif 1799 | typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); 1800 | typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); 1801 | #endif 1802 | 1803 | /* GL_NV_depth_nonlinear */ 1804 | #ifndef GL_NV_depth_nonlinear 1805 | #define GL_NV_depth_nonlinear 1 1806 | #endif 1807 | 1808 | /* GL_NV_draw_buffers */ 1809 | #ifndef GL_NV_draw_buffers 1810 | #define GL_NV_draw_buffers 1 1811 | #ifdef GL_GLEXT_PROTOTYPES 1812 | GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); 1813 | #endif 1814 | typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); 1815 | #endif 1816 | 1817 | /* GL_NV_draw_instanced */ 1818 | #ifndef GL_NV_draw_instanced 1819 | #define GL_NV_draw_instanced 1 1820 | #ifdef GL_GLEXT_PROTOTYPES 1821 | GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1822 | GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); 1823 | #endif 1824 | typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1825 | typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); 1826 | #endif 1827 | 1828 | /* GL_NV_fbo_color_attachments */ 1829 | #ifndef GL_NV_fbo_color_attachments 1830 | #define GL_NV_fbo_color_attachments 1 1831 | #endif 1832 | 1833 | /* GL_NV_fence */ 1834 | #ifndef GL_NV_fence 1835 | #define GL_NV_fence 1 1836 | #ifdef GL_GLEXT_PROTOTYPES 1837 | GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); 1838 | GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); 1839 | GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence); 1840 | GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence); 1841 | GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); 1842 | GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence); 1843 | GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); 1844 | #endif 1845 | typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); 1846 | typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); 1847 | typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); 1848 | typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); 1849 | typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); 1850 | typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); 1851 | typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); 1852 | #endif 1853 | 1854 | /* GL_NV_framebuffer_blit */ 1855 | #ifndef GL_NV_framebuffer_blit 1856 | #define GL_NV_framebuffer_blit 1 1857 | #ifdef GL_GLEXT_PROTOTYPES 1858 | GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 1859 | #endif 1860 | typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 1861 | #endif 1862 | 1863 | /* GL_NV_framebuffer_multisample */ 1864 | #ifndef GL_NV_framebuffer_multisample 1865 | #define GL_NV_framebuffer_multisample 1 1866 | #ifdef GL_GLEXT_PROTOTYPES 1867 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1868 | #endif 1869 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1870 | #endif 1871 | 1872 | /* GL_NV_generate_mipmap_sRGB */ 1873 | #ifndef GL_NV_generate_mipmap_sRGB 1874 | #define GL_NV_generate_mipmap_sRGB 1 1875 | #endif 1876 | 1877 | /* GL_NV_instanced_arrays */ 1878 | #ifndef GL_NV_instanced_arrays 1879 | #define GL_NV_instanced_arrays 1 1880 | #ifdef GL_GLEXT_PROTOTYPES 1881 | GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor); 1882 | #endif 1883 | typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor); 1884 | #endif 1885 | 1886 | /* GL_NV_read_buffer */ 1887 | #ifndef GL_NV_read_buffer 1888 | #define GL_NV_read_buffer 1 1889 | #ifdef GL_GLEXT_PROTOTYPES 1890 | GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); 1891 | #endif 1892 | typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); 1893 | #endif 1894 | 1895 | /* GL_NV_read_buffer_front */ 1896 | #ifndef GL_NV_read_buffer_front 1897 | #define GL_NV_read_buffer_front 1 1898 | #endif 1899 | 1900 | /* GL_NV_read_depth */ 1901 | #ifndef GL_NV_read_depth 1902 | #define GL_NV_read_depth 1 1903 | #endif 1904 | 1905 | /* GL_NV_read_depth_stencil */ 1906 | #ifndef GL_NV_read_depth_stencil 1907 | #define GL_NV_read_depth_stencil 1 1908 | #endif 1909 | 1910 | /* GL_NV_read_stencil */ 1911 | #ifndef GL_NV_read_stencil 1912 | #define GL_NV_read_stencil 1 1913 | #endif 1914 | 1915 | /* GL_NV_shadow_samplers_array */ 1916 | #ifndef GL_NV_shadow_samplers_array 1917 | #define GL_NV_shadow_samplers_array 1 1918 | #endif 1919 | 1920 | /* GL_NV_shadow_samplers_cube */ 1921 | #ifndef GL_NV_shadow_samplers_cube 1922 | #define GL_NV_shadow_samplers_cube 1 1923 | #endif 1924 | 1925 | /* GL_NV_sRGB_formats */ 1926 | #ifndef GL_NV_sRGB_formats 1927 | #define GL_NV_sRGB_formats 1 1928 | #endif 1929 | 1930 | /* GL_NV_texture_border_clamp */ 1931 | #ifndef GL_NV_texture_border_clamp 1932 | #define GL_NV_texture_border_clamp 1 1933 | #endif 1934 | 1935 | /* GL_NV_texture_compression_s3tc_update */ 1936 | #ifndef GL_NV_texture_compression_s3tc_update 1937 | #define GL_NV_texture_compression_s3tc_update 1 1938 | #endif 1939 | 1940 | /* GL_NV_texture_npot_2D_mipmap */ 1941 | #ifndef GL_NV_texture_npot_2D_mipmap 1942 | #define GL_NV_texture_npot_2D_mipmap 1 1943 | #endif 1944 | 1945 | /*------------------------------------------------------------------------* 1946 | * QCOM extension functions 1947 | *------------------------------------------------------------------------*/ 1948 | 1949 | /* GL_QCOM_alpha_test */ 1950 | #ifndef GL_QCOM_alpha_test 1951 | #define GL_QCOM_alpha_test 1 1952 | #ifdef GL_GLEXT_PROTOTYPES 1953 | GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); 1954 | #endif 1955 | typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); 1956 | #endif 1957 | 1958 | /* GL_QCOM_binning_control */ 1959 | #ifndef GL_QCOM_binning_control 1960 | #define GL_QCOM_binning_control 1 1961 | #endif 1962 | 1963 | /* GL_QCOM_driver_control */ 1964 | #ifndef GL_QCOM_driver_control 1965 | #define GL_QCOM_driver_control 1 1966 | #ifdef GL_GLEXT_PROTOTYPES 1967 | GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); 1968 | GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); 1969 | GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); 1970 | GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); 1971 | #endif 1972 | typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); 1973 | typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); 1974 | typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); 1975 | typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); 1976 | #endif 1977 | 1978 | /* GL_QCOM_extended_get */ 1979 | #ifndef GL_QCOM_extended_get 1980 | #define GL_QCOM_extended_get 1 1981 | #ifdef GL_GLEXT_PROTOTYPES 1982 | GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); 1983 | GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); 1984 | GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); 1985 | GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); 1986 | GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); 1987 | GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); 1988 | 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); 1989 | GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); 1990 | #endif 1991 | typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); 1992 | typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); 1993 | typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); 1994 | typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); 1995 | typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); 1996 | typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); 1997 | 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); 1998 | typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); 1999 | #endif 2000 | 2001 | /* GL_QCOM_extended_get2 */ 2002 | #ifndef GL_QCOM_extended_get2 2003 | #define GL_QCOM_extended_get2 1 2004 | #ifdef GL_GLEXT_PROTOTYPES 2005 | GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); 2006 | GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); 2007 | GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); 2008 | GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); 2009 | #endif 2010 | typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); 2011 | typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); 2012 | typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); 2013 | typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); 2014 | #endif 2015 | 2016 | /* GL_QCOM_perfmon_global_mode */ 2017 | #ifndef GL_QCOM_perfmon_global_mode 2018 | #define GL_QCOM_perfmon_global_mode 1 2019 | #endif 2020 | 2021 | /* GL_QCOM_writeonly_rendering */ 2022 | #ifndef GL_QCOM_writeonly_rendering 2023 | #define GL_QCOM_writeonly_rendering 1 2024 | #endif 2025 | 2026 | /* GL_QCOM_tiled_rendering */ 2027 | #ifndef GL_QCOM_tiled_rendering 2028 | #define GL_QCOM_tiled_rendering 1 2029 | #ifdef GL_GLEXT_PROTOTYPES 2030 | GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); 2031 | GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); 2032 | #endif 2033 | typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); 2034 | typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); 2035 | #endif 2036 | 2037 | /*------------------------------------------------------------------------* 2038 | * VIV extension tokens 2039 | *------------------------------------------------------------------------*/ 2040 | 2041 | /* GL_VIV_shader_binary */ 2042 | #ifndef GL_VIV_shader_binary 2043 | #define GL_VIV_shader_binary 1 2044 | #endif 2045 | 2046 | #ifdef __cplusplus 2047 | } 2048 | #endif 2049 | 2050 | #endif /* __gl2ext_h_ */ 2051 | -------------------------------------------------------------------------------- /gl2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | /*#include */ 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /gl2/khrplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __khrplatform_h_ 2 | #define __khrplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2008-2009 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Khronos platform-specific types and definitions. 28 | * 29 | * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ 30 | * 31 | * Adopters may modify this file to suit their platform. Adopters are 32 | * encouraged to submit platform specific modifications to the Khronos 33 | * group so that they can be included in future versions of this file. 34 | * Please submit changes by sending them to the public Khronos Bugzilla 35 | * (http://khronos.org/bugzilla) by filing a bug against product 36 | * "Khronos (general)" component "Registry". 37 | * 38 | * A predefined template which fills in some of the bug fields can be 39 | * reached using http://tinyurl.com/khrplatform-h-bugreport, but you 40 | * must create a Bugzilla login first. 41 | * 42 | * 43 | * See the Implementer's Guidelines for information about where this file 44 | * should be located on your system and for more details of its use: 45 | * http://www.khronos.org/registry/implementers_guide.pdf 46 | * 47 | * This file should be included as 48 | * #include 49 | * by Khronos client API header files that use its types and defines. 50 | * 51 | * The types in khrplatform.h should only be used to define API-specific types. 52 | * 53 | * Types defined in khrplatform.h: 54 | * khronos_int8_t signed 8 bit 55 | * khronos_uint8_t unsigned 8 bit 56 | * khronos_int16_t signed 16 bit 57 | * khronos_uint16_t unsigned 16 bit 58 | * khronos_int32_t signed 32 bit 59 | * khronos_uint32_t unsigned 32 bit 60 | * khronos_int64_t signed 64 bit 61 | * khronos_uint64_t unsigned 64 bit 62 | * khronos_intptr_t signed same number of bits as a pointer 63 | * khronos_uintptr_t unsigned same number of bits as a pointer 64 | * khronos_ssize_t signed size 65 | * khronos_usize_t unsigned size 66 | * khronos_float_t signed 32 bit floating point 67 | * khronos_time_ns_t unsigned 64 bit time in nanoseconds 68 | * khronos_utime_nanoseconds_t unsigned time interval or absolute time in 69 | * nanoseconds 70 | * khronos_stime_nanoseconds_t signed time interval in nanoseconds 71 | * khronos_boolean_enum_t enumerated boolean type. This should 72 | * only be used as a base type when a client API's boolean type is 73 | * an enum. Client APIs which use an integer or other type for 74 | * booleans cannot use this as the base type for their boolean. 75 | * 76 | * Tokens defined in khrplatform.h: 77 | * 78 | * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. 79 | * 80 | * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. 81 | * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. 82 | * 83 | * Calling convention macros defined in this file: 84 | * KHRONOS_APICALL 85 | * KHRONOS_APIENTRY 86 | * KHRONOS_APIATTRIBUTES 87 | * 88 | * These may be used in function prototypes as: 89 | * 90 | * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( 91 | * int arg1, 92 | * int arg2) KHRONOS_APIATTRIBUTES; 93 | */ 94 | 95 | /*------------------------------------------------------------------------- 96 | * Definition of KHRONOS_APICALL 97 | *------------------------------------------------------------------------- 98 | * This precedes the return type of the function in the function prototype. 99 | */ 100 | #if defined(_WIN32) && !defined(__SCITECH_SNAP__) 101 | # define KHRONOS_APICALL __declspec(dllimport) 102 | #elif defined (__SYMBIAN32__) 103 | # define KHRONOS_APICALL IMPORT_C 104 | #else 105 | # define KHRONOS_APICALL 106 | #endif 107 | 108 | /*------------------------------------------------------------------------- 109 | * Definition of KHRONOS_APIENTRY 110 | *------------------------------------------------------------------------- 111 | * This follows the return type of the function and precedes the function 112 | * name in the function prototype. 113 | */ 114 | #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) 115 | /* Win32 but not WinCE */ 116 | # define KHRONOS_APIENTRY __stdcall 117 | #else 118 | # define KHRONOS_APIENTRY 119 | #endif 120 | 121 | /*------------------------------------------------------------------------- 122 | * Definition of KHRONOS_APIATTRIBUTES 123 | *------------------------------------------------------------------------- 124 | * This follows the closing parenthesis of the function prototype arguments. 125 | */ 126 | #if defined (__ARMCC_2__) 127 | #define KHRONOS_APIATTRIBUTES __softfp 128 | #else 129 | #define KHRONOS_APIATTRIBUTES 130 | #endif 131 | 132 | /*------------------------------------------------------------------------- 133 | * basic type definitions 134 | *-----------------------------------------------------------------------*/ 135 | #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) 136 | 137 | 138 | /* 139 | * Using 140 | */ 141 | #include 142 | typedef int32_t khronos_int32_t; 143 | typedef uint32_t khronos_uint32_t; 144 | typedef int64_t khronos_int64_t; 145 | typedef uint64_t khronos_uint64_t; 146 | #define KHRONOS_SUPPORT_INT64 1 147 | #define KHRONOS_SUPPORT_FLOAT 1 148 | 149 | #elif defined(__VMS ) || defined(__sgi) 150 | 151 | /* 152 | * Using 153 | */ 154 | #include 155 | typedef int32_t khronos_int32_t; 156 | typedef uint32_t khronos_uint32_t; 157 | typedef int64_t khronos_int64_t; 158 | typedef uint64_t khronos_uint64_t; 159 | #define KHRONOS_SUPPORT_INT64 1 160 | #define KHRONOS_SUPPORT_FLOAT 1 161 | 162 | #elif defined(_WIN32) && !defined(__SCITECH_SNAP__) 163 | 164 | /* 165 | * Win32 166 | */ 167 | typedef __int32 khronos_int32_t; 168 | typedef unsigned __int32 khronos_uint32_t; 169 | typedef __int64 khronos_int64_t; 170 | typedef unsigned __int64 khronos_uint64_t; 171 | #define KHRONOS_SUPPORT_INT64 1 172 | #define KHRONOS_SUPPORT_FLOAT 1 173 | 174 | #elif defined(__sun__) || defined(__digital__) 175 | 176 | /* 177 | * Sun or Digital 178 | */ 179 | typedef int khronos_int32_t; 180 | typedef unsigned int khronos_uint32_t; 181 | #if defined(__arch64__) || defined(_LP64) 182 | typedef long int khronos_int64_t; 183 | typedef unsigned long int khronos_uint64_t; 184 | #else 185 | typedef long long int khronos_int64_t; 186 | typedef unsigned long long int khronos_uint64_t; 187 | #endif /* __arch64__ */ 188 | #define KHRONOS_SUPPORT_INT64 1 189 | #define KHRONOS_SUPPORT_FLOAT 1 190 | 191 | #elif 0 192 | 193 | /* 194 | * Hypothetical platform with no float or int64 support 195 | */ 196 | typedef int khronos_int32_t; 197 | typedef unsigned int khronos_uint32_t; 198 | #define KHRONOS_SUPPORT_INT64 0 199 | #define KHRONOS_SUPPORT_FLOAT 0 200 | 201 | #else 202 | 203 | /* 204 | * Generic fallback 205 | */ 206 | #include 207 | typedef int32_t khronos_int32_t; 208 | typedef uint32_t khronos_uint32_t; 209 | typedef int64_t khronos_int64_t; 210 | typedef uint64_t khronos_uint64_t; 211 | #define KHRONOS_SUPPORT_INT64 1 212 | #define KHRONOS_SUPPORT_FLOAT 1 213 | 214 | #endif 215 | 216 | 217 | /* 218 | * Types that are (so far) the same on all platforms 219 | */ 220 | typedef signed char khronos_int8_t; 221 | typedef unsigned char khronos_uint8_t; 222 | typedef signed short int khronos_int16_t; 223 | typedef unsigned short int khronos_uint16_t; 224 | 225 | /* 226 | * Types that differ between LLP64 and LP64 architectures - in LLP64, 227 | * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears 228 | * to be the only LLP64 architecture in current use. 229 | */ 230 | #ifdef _WIN64 231 | typedef signed long long int khronos_intptr_t; 232 | typedef unsigned long long int khronos_uintptr_t; 233 | typedef signed long long int khronos_ssize_t; 234 | typedef unsigned long long int khronos_usize_t; 235 | #else 236 | typedef signed long int khronos_intptr_t; 237 | typedef unsigned long int khronos_uintptr_t; 238 | typedef signed long int khronos_ssize_t; 239 | typedef unsigned long int khronos_usize_t; 240 | #endif 241 | 242 | #if KHRONOS_SUPPORT_FLOAT 243 | /* 244 | * Float type 245 | */ 246 | typedef float khronos_float_t; 247 | #endif 248 | 249 | #if KHRONOS_SUPPORT_INT64 250 | /* Time types 251 | * 252 | * These types can be used to represent a time interval in nanoseconds or 253 | * an absolute Unadjusted System Time. Unadjusted System Time is the number 254 | * of nanoseconds since some arbitrary system event (e.g. since the last 255 | * time the system booted). The Unadjusted System Time is an unsigned 256 | * 64 bit value that wraps back to 0 every 584 years. Time intervals 257 | * may be either signed or unsigned. 258 | */ 259 | typedef khronos_uint64_t khronos_utime_nanoseconds_t; 260 | typedef khronos_int64_t khronos_stime_nanoseconds_t; 261 | #endif 262 | 263 | /* 264 | * Dummy value used to pad enum types to 32 bits. 265 | */ 266 | #ifndef KHRONOS_MAX_ENUM 267 | #define KHRONOS_MAX_ENUM 0x7FFFFFFF 268 | #endif 269 | 270 | /* 271 | * Enumerated boolean type 272 | * 273 | * Values other than zero should be considered to be true. Therefore 274 | * comparisons should not be made against KHRONOS_TRUE. 275 | */ 276 | typedef enum { 277 | KHRONOS_FALSE = 0, 278 | KHRONOS_TRUE = 1, 279 | KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM 280 | } khronos_boolean_enum_t; 281 | 282 | #endif /* __khrplatform_h_ */ 283 | -------------------------------------------------------------------------------- /modules/FindSDL2.cmake: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # Usage: find_package(SDL2 [REQUIRED] [COMPONENTS main]) 3 | # 4 | # Sets variables: 5 | # SDL2_INCLUDE_DIRS 6 | # SDL2_LIBS 7 | # SDL2_DLLS 8 | #------------------------------------------------------------------------------ 9 | 10 | include(FindPackageHandleStandardArgs) 11 | 12 | # Check if "main" was specified as a component 13 | set(_SDL2_use_main FALSE) 14 | foreach(_SDL2_component ${SDL2_FIND_COMPONENTS}) 15 | if(_SDL2_component STREQUAL "main") 16 | set(_SDL2_use_main TRUE) 17 | else() 18 | message(WARNING "Unrecognized component \"${_SDL2_component}\"") 19 | endif() 20 | endforeach() 21 | 22 | if(WIN32) 23 | # Search for SDL2 Debug CMake build in extern/SDL2-2.0.5-dev/build 24 | find_path(SDL2_ROOT "include/SDL.h" PATHS "${CMAKE_CURRENT_LIST_DIR}/../extern/SDL2-2.0.5-dev" NO_DEFAULT_PATH) 25 | if(SDL2_ROOT) 26 | if (EXISTS "${SDL2_ROOT}/build/Debug/SDL2.lib") 27 | set(SDL2_INCLUDE_DIRS "${SDL2_ROOT}/include") 28 | set(SDL2_LIBS "${SDL2_ROOT}/build/Debug/SDL2.lib") 29 | set(SDL2_DLLS "${SDL2_ROOT}/build/Debug/SDL2.dll") 30 | if(_SDL2_use_main) 31 | list(APPEND SDL2_LIBS "${SDL2_ROOT}/build/Debug/SDL2main.lib") 32 | endif() 33 | endif() 34 | endif() 35 | if(NOT SDL2_FOUND) 36 | # Search for SDL2 in extern/SDL2-2.0.5 37 | find_path(SDL2_ROOT "include/SDL.h" PATHS "${CMAKE_CURRENT_LIST_DIR}/../extern/SDL2-2.0.5" NO_DEFAULT_PATH) 38 | if(SDL2_ROOT) 39 | set(SDL2_INCLUDE_DIRS "${SDL2_ROOT}/include") 40 | if("${CMAKE_GENERATOR}" MATCHES "Win64") 41 | set(SDL2_LIBS "${SDL2_ROOT}/lib/x64/SDL2.lib") 42 | set(SDL2_DLLS "${SDL2_ROOT}/lib/x64/SDL2.dll") 43 | if(_SDL2_use_main) 44 | list(APPEND SDL2_LIBS "${SDL2_ROOT}/lib/x64/SDL2main.lib") 45 | endif() 46 | else() 47 | set(SDL2_LIBS "${SDL2_ROOT}/lib/x86/SDL2.lib") 48 | set(SDL2_DLLS "${SDL2_ROOT}/lib/x86/SDL2.dll") 49 | if(_SDL2_use_main) 50 | list(APPEND SDL2_LIBS "${SDL2_ROOT}/lib/x86/SDL2main.lib") 51 | endif() 52 | endif() 53 | endif() 54 | endif() 55 | 56 | mark_as_advanced(SDL2_ROOT) 57 | find_package_handle_standard_args(SDL2 DEFAULT_MSG SDL2_INCLUDE_DIRS SDL2_LIBS SDL2_DLLS) 58 | else() 59 | # On MacOS, should be installed via Macports 60 | # On Ubuntu, install with: apt-get install libsdl2-dev 61 | find_path(SDL2_INCLUDE_DIRS SDL.h PATH_SUFFIXES SDL2) 62 | find_library(_SDL2_LIB SDL2) 63 | set(SDL2_LIBS ${SDL2}) 64 | if(_SDL2_use_main) 65 | find_library(_SDL2main_LIB SDL2) 66 | list(APPEND SDL2_LIBS ${_SDL2main_LIB}) 67 | endif() 68 | 69 | mark_as_advanced(SDL2_INCLUDE_DIRS _SDL2_LIB _SDL2main_LIB) 70 | find_package_handle_standard_args(SDL2 DEFAULT_MSG SDL2_INCLUDE_DIRS SDL2_LIBS) 71 | endif() 72 | -------------------------------------------------------------------------------- /setup-win32.py: -------------------------------------------------------------------------------- 1 | import os 2 | import urllib.request 3 | import zipfile 4 | 5 | def downloadZip(url, extractedFolderName = None): 6 | zipFileName = url.rsplit('/', 1)[-1] 7 | assert zipFileName.endswith('.zip') 8 | if not extractedFolderName: 9 | extractedFolderName = zipFileName[:-4] 10 | if not os.path.exists(extractedFolderName): 11 | print('Downloading %s' % zipFileName) 12 | urllib.request.urlretrieve(url, zipFileName) 13 | zipfile.ZipFile(zipFileName).extractall() 14 | os.remove(zipFileName) 15 | assert os.path.exists(extractedFolderName) 16 | 17 | externFolder = os.path.normpath(os.path.join(__file__, '../extern')) 18 | os.makedirs(externFolder, exist_ok=True) 19 | os.chdir(externFolder) 20 | 21 | # SDL2 22 | downloadZip('https://www.libsdl.org/release/SDL2-devel-2.0.5-VC.zip', 'SDL2-2.0.5') 23 | --------------------------------------------------------------------------------