| twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame^] | 1 | /* |
| 2 | Copyright 2011 Google Inc. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | |
| 18 | #ifndef GrGLPlatformIncludes_DEFINED |
| 19 | #define GrGLPlatformIncludes_DEFINED |
| 20 | |
| 21 | #include "GrConfig.h" |
| 22 | |
| 23 | #if !defined(GR_GL_CUSTOM_SETUP) |
| 24 | #define GR_GL_CUSTOM_SETUP 0 |
| 25 | #endif |
| 26 | |
| 27 | /** |
| 28 | * We need to pull in the right GL headers and determine whether we are |
| 29 | * compiling for ES1, ES2, or desktop GL. (We allow ES1 and ES2 to both be |
| 30 | * supported in the same build but not ESx and desktop). We also need to know |
| 31 | * the platform-specific way to get extension function pointers (e.g. |
| 32 | * eglGetProcAddress). The port specifies this info explicitly or we will infer |
| 33 | * it from the GR_*_BUILD flag. |
| 34 | * |
| 35 | * To specify GL setup directly define GR_GL_CUSTOM_SETUP to 1 and define: |
| 36 | * GR_SUPPORT_GLDESKTOP or (GR_SUPPORT_GLES1 and/or GR_SUPPORT_GLES2) to 1 |
| 37 | * |
| 38 | * if GR_SUPPORT_GLDESKTOP is 1 then provide: |
| 39 | * 1. The name of your GL header in GR_INCLUDE_GLDESKTOP |
| 40 | * 2. If necessary, the name of a file that includes extension |
| 41 | * definitions in GR_INCLUDE_GLDESKTOPext. |
| 42 | * if GR_SUPPORT_GLES1 is 1 then provide: |
| 43 | * 1. The name of your GL header in GR_INCLUDE_GLES1 |
| 44 | * 2. If necessary, the name of a file that includes extension |
| 45 | * definitions in GR_INCLUDE_GLES1ext. |
| 46 | * if GR_SUPPORT_GLES2 is 1 then provide: |
| 47 | * 1. The name of your GL header in GR_INCLUDE_GLES2 |
| 48 | * 2. If necessary, the name of a file that includes extension |
| 49 | * definitions in GR_INCLUDE_GLES2ext. |
| 50 | * |
| 51 | * Optionally, define GR_GL_FUNC to any qualifier needed on GL function |
| 52 | * pointer declarations (e.g. __stdcall). |
| 53 | * |
| 54 | * Define GR_GL_PROC_ADDRESS to take a gl function and produce a |
| 55 | * function pointer. Two examples: |
| 56 | * 1. Your platform doesn't require a proc address function, just take |
| 57 | * the address of the function: |
| 58 | * #define GR_GL_PROC_ADDRESS(X) &X |
| 59 | * 2. Your platform uses eglGetProcAddress: |
| 60 | * #define GR_GL_PROC_ADDRESS eglGetProcAddress(#X) |
| 61 | * |
| 62 | * Optionally define GR_GL_PROC_ADDRESS_HEADER to include any additional |
| 63 | * header necessary to use GR_GL_PROC_ADDRESS (e.g. <EGL/egl.h>) |
| 64 | * |
| 65 | * Alternatively, define GR_GL_CUSTOM_SETUP_HEADER (and not GR_GL_CUSTOM_SETUP) |
| 66 | * to a header that can be included. This file should: |
| 67 | * 1. Define the approprate GR_SUPPORT_GL* macro(s) to 1 |
| 68 | * 2. Includes all necessary GL headers. |
| 69 | * 3. Optionally define GR_GL_FUNC. |
| 70 | * 4. Define GR_GL_PROC_ADDRESS. |
| 71 | * 5. Optionally define GR_GL_PROC_ADDRESS_HEADER |
| 72 | */ |
| 73 | |
| 74 | #if GR_GL_CUSTOM_SETUP |
| 75 | |
| 76 | #ifdef GR_SUPPORT_GLES1 |
| 77 | #include GR_INCLUDE_GLES1 |
| 78 | #if defined(GR_INCLUDE_GLES1ext) |
| 79 | #include GR_INCLUDE_GLES1ext |
| 80 | #endif |
| 81 | #endif |
| 82 | |
| 83 | #ifdef GR_SUPPORT_GLES2 |
| 84 | #include GR_INCLUDE_GLES2 |
| 85 | #if defined(GR_INCLUDE_GLES2ext) |
| 86 | #include GR_INCLUDE_GLES2ext |
| 87 | #endif |
| 88 | #endif |
| 89 | |
| 90 | #ifdef GR_SUPPORT_GLDESKTOP |
| 91 | #include GR_INCLUDE_GLDESKTOP |
| 92 | #if defined(GR_INCLUDE_GLDESKTOPext) |
| 93 | #include GR_INCLUDE_GLDESKTOPext |
| 94 | #endif |
| 95 | #endif |
| 96 | |
| 97 | #elif defined(GR_GL_CUSTOM_SETUP_HEADER) |
| 98 | |
| 99 | #include GR_GL_CUSTOM_SETUP_HEADER |
| 100 | |
| 101 | #else |
| 102 | #undef GR_GL_FUNCTION_TYPE |
| 103 | #undef GR_GL_PROC_ADDRESS |
| 104 | #undef GR_GL_PROC_ADDRESS_HEADER |
| 105 | |
| 106 | #if GR_WIN32_BUILD |
| 107 | #define GR_SUPPORT_GLDESKTOP 1 |
| 108 | #include <Windows.h> |
| 109 | #include <GL/gl.h> |
| 110 | // remove stupid windows defines |
| 111 | #undef near |
| 112 | #undef far |
| 113 | #define GR_GL_EMIT_GL_CONSTANTS 1 |
| 114 | #define GR_GL_FUNCTION_TYPE __stdcall |
| 115 | #define GR_GL_PROC_ADDRESS(X) wglGetProcAddress(#X) |
| 116 | #define GR_GL_PROC_ADDRESS_HEADER <windows.h> |
| 117 | |
| 118 | // Force querying for the existence of these extensions on Windows |
| 119 | // builds. |
| 120 | #define GL_APPLE_framebuffer_multisample 1 |
| 121 | #define GL_EXT_framebuffer_object 1 |
| 122 | #define GL_IMG_multisampled_render_to_texture 1 |
| 123 | #define GL_OES_mapbuffer 1 |
| 124 | #define GL_OES_mapbuffer 1 |
| 125 | #elif GR_MAC_BUILD |
| 126 | #define GR_SUPPORT_GLDESKTOP 1 |
| 127 | #include <OpenGL/gl.h> |
| 128 | #include <OpenGL/glext.h> |
| 129 | #define GR_GL_PROC_ADDRESS(X) &X |
| 130 | #elif GR_IOS_BUILD |
| 131 | #define GR_SUPPORT_GLES1 1 |
| 132 | #include <OpenGLES/ES1/gl.h> |
| 133 | #include <OpenGLES/ES1/glext.h> |
| 134 | #define GR_SUPPORT_GLES2 1 |
| 135 | #include <OpenGLES/ES2/gl.h> |
| 136 | #include <OpenGLES/ES2/glext.h> |
| 137 | #define GR_GL_PROC_ADDRESS(X) &X |
| 138 | #elif GR_ANDROID_BUILD |
| 139 | #ifndef GL_GLEXT_PROTOTYPES |
| 140 | #define GL_GLEXT_PROTOTYPES |
| 141 | #endif |
| 142 | #define GR_SUPPORT_GLES2 1 |
| 143 | #include <GLES2/gl2.h> |
| 144 | #include <GLES2/gl2ext.h> |
| 145 | #define GR_GL_PROC_ADDRESS(X) eglGetProcAddress(#X) |
| 146 | #define GR_GL_PROC_ADDRESS_HEADER <EGL/egl.h> |
| 147 | #elif GR_QNX_BUILD |
| 148 | #ifndef GL_GLEXT_PROTOTYPES |
| 149 | #define GL_GLEXT_PROTOTYPES |
| 150 | #endif |
| 151 | #define GR_SUPPORT_GLES2 1 |
| 152 | // This is needed by the QNX GLES2 headers |
| 153 | #define GL_API_EXT |
| 154 | #include <GLES2/gl2.h> |
| 155 | #include <GLES2/gl2ext.h> |
| 156 | #define GR_GL_PROC_ADDRESS(X) eglGetProcAddress(#X) |
| 157 | #define GR_GL_PROC_ADDRESS_HEADER <EGL/egl.h> |
| 158 | #elif GR_LINUX_BUILD |
| 159 | #ifndef GL_GLEXT_PROTOTYPES |
| 160 | #define GL_GLEXT_PROTOTYPES |
| 161 | #endif |
| 162 | #include <GL/gl.h> |
| 163 | #include <GL/glext.h> |
| 164 | #define GR_GL_PROC_ADDRESS(X) glXGetProcAddress(reinterpret_cast<const GLubyte*>(#X)) |
| 165 | #define GR_SUPPORT_GLDESKTOP 1 |
| 166 | #define GR_GL_PROC_ADDRESS_HEADER <GL/glx.h> |
| 167 | #else |
| 168 | #error "unsupported GR_???_BUILD" |
| 169 | #endif |
| 170 | |
| 171 | #endif |
| 172 | |
| 173 | #if !defined(GR_SUPPORT_GLDESKTOP) |
| 174 | #define GR_SUPPORT_GLDESKTOP 0 |
| 175 | #endif |
| 176 | #if !defined(GR_SUPPORT_GLES1) |
| 177 | #define GR_SUPPORT_GLES1 0 |
| 178 | #endif |
| 179 | #if !defined(GR_SUPPORT_GLES2) |
| 180 | #define GR_SUPPORT_GLES2 0 |
| 181 | #endif |
| 182 | |
| 183 | #define GR_SUPPORT_GLES ((GR_SUPPORT_GLES1) || (GR_SUPPORT_GLES2)) |
| 184 | |
| 185 | #if !GR_SUPPORT_GLES && !GR_SUPPORT_GLDESKTOP |
| 186 | #error "Either desktop or ES GL must be supported" |
| 187 | #elif GR_SUPPORT_GLES && GR_SUPPORT_GLDESKTOP |
| 188 | #error "Cannot support both desktop and ES GL" |
| 189 | #endif |
| 190 | |
| 191 | #if GR_WIN32_BUILD && GR_GL_EMIT_GL_CONSTANTS |
| 192 | |
| 193 | // The windows GL headers do not provide the constants used for extensions and |
| 194 | // some versions of GL. Define them here. |
| 195 | |
| 196 | // OpenGL 1.2 Defines |
| 197 | #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 |
| 198 | #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 |
| 199 | #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 |
| 200 | #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 |
| 201 | #define GL_UNSIGNED_BYTE_3_3_2 0x8032 |
| 202 | #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 |
| 203 | #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 |
| 204 | #define GL_UNSIGNED_INT_8_8_8_8 0x8035 |
| 205 | #define GL_UNSIGNED_INT_10_10_10_2 0x8036 |
| 206 | #define GL_RESCALE_NORMAL 0x803A |
| 207 | #define GL_TEXTURE_BINDING_3D 0x806A |
| 208 | #define GL_PACK_SKIP_IMAGES 0x806B |
| 209 | #define GL_PACK_IMAGE_HEIGHT 0x806C |
| 210 | #define GL_UNPACK_SKIP_IMAGES 0x806D |
| 211 | #define GL_UNPACK_IMAGE_HEIGHT 0x806E |
| 212 | #define GL_TEXTURE_3D 0x806F |
| 213 | #define GL_PROXY_TEXTURE_3D 0x8070 |
| 214 | #define GL_TEXTURE_DEPTH 0x8071 |
| 215 | #define GL_TEXTURE_WRAP_R 0x8072 |
| 216 | #define GL_MAX_3D_TEXTURE_SIZE 0x8073 |
| 217 | #define GL_BGR 0x80E0 |
| 218 | #define GL_BGRA 0x80E1 |
| 219 | #define GL_MAX_ELEMENTS_VERTICES 0x80E8 |
| 220 | #define GL_MAX_ELEMENTS_INDICES 0x80E9 |
| 221 | #define GL_CLAMP_TO_EDGE 0x812F |
| 222 | #define GL_TEXTURE_MIN_LOD 0x813A |
| 223 | #define GL_TEXTURE_MAX_LOD 0x813B |
| 224 | #define GL_TEXTURE_BASE_LEVEL 0x813C |
| 225 | #define GL_TEXTURE_MAX_LEVEL 0x813D |
| 226 | #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 |
| 227 | #define GL_SINGLE_COLOR 0x81F9 |
| 228 | #define GL_SEPARATE_SPECULAR_COLOR 0x81FA |
| 229 | #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 |
| 230 | #define GL_UNSIGNED_SHORT_5_6_5 0x8363 |
| 231 | #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 |
| 232 | #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 |
| 233 | #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 |
| 234 | #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 |
| 235 | #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 |
| 236 | #define GL_ALIASED_POINT_SIZE_RANGE 0x846D |
| 237 | #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E |
| 238 | |
| 239 | // OpenGL 1.3 Multi-Sample Constant Values |
| 240 | #define GL_MULTISAMPLE 0x809D |
| 241 | #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E |
| 242 | #define GL_SAMPLE_ALPHA_TO_ONE 0x809F |
| 243 | #define GL_SAMPLE_COVERAGE 0x80A0 |
| 244 | #define GL_SAMPLE_BUFFERS 0x80A8 |
| 245 | #define GL_SAMPLES 0x80A9 |
| 246 | #define GL_SAMPLE_COVERAGE_VALUE 0x80AA |
| 247 | #define GL_SAMPLE_COVERAGE_INVERT 0x80AB |
| 248 | #define GL_CLAMP_TO_BORDER 0x812D |
| 249 | #define GL_TEXTURE0 0x84C0 |
| 250 | #define GL_TEXTURE1 0x84C1 |
| 251 | #define GL_TEXTURE2 0x84C2 |
| 252 | #define GL_TEXTURE3 0x84C3 |
| 253 | #define GL_TEXTURE4 0x84C4 |
| 254 | #define GL_TEXTURE5 0x84C5 |
| 255 | #define GL_TEXTURE6 0x84C6 |
| 256 | #define GL_TEXTURE7 0x84C7 |
| 257 | #define GL_TEXTURE8 0x84C8 |
| 258 | #define GL_TEXTURE9 0x84C9 |
| 259 | #define GL_TEXTURE10 0x84CA |
| 260 | #define GL_TEXTURE11 0x84CB |
| 261 | #define GL_TEXTURE12 0x84CC |
| 262 | #define GL_TEXTURE13 0x84CD |
| 263 | #define GL_TEXTURE14 0x84CE |
| 264 | #define GL_TEXTURE15 0x84CF |
| 265 | #define GL_TEXTURE16 0x84D0 |
| 266 | #define GL_TEXTURE17 0x84D1 |
| 267 | #define GL_TEXTURE18 0x84D2 |
| 268 | #define GL_TEXTURE19 0x84D3 |
| 269 | #define GL_TEXTURE20 0x84D4 |
| 270 | #define GL_TEXTURE21 0x84D5 |
| 271 | #define GL_TEXTURE22 0x84D6 |
| 272 | #define GL_TEXTURE23 0x84D7 |
| 273 | #define GL_TEXTURE24 0x84D8 |
| 274 | #define GL_TEXTURE25 0x84D9 |
| 275 | #define GL_TEXTURE26 0x84DA |
| 276 | #define GL_TEXTURE27 0x84DB |
| 277 | #define GL_TEXTURE28 0x84DC |
| 278 | #define GL_TEXTURE29 0x84DD |
| 279 | #define GL_TEXTURE30 0x84DE |
| 280 | #define GL_TEXTURE31 0x84DF |
| 281 | #define GL_ACTIVE_TEXTURE 0x84E0 |
| 282 | #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 |
| 283 | #define GL_MAX_TEXTURE_UNITS 0x84E2 |
| 284 | #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 |
| 285 | #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 |
| 286 | #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 |
| 287 | #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 |
| 288 | #define GL_SUBTRACT 0x84E7 |
| 289 | #define GL_COMPRESSED_ALPHA 0x84E9 |
| 290 | #define GL_COMPRESSED_LUMINANCE 0x84EA |
| 291 | #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB |
| 292 | #define GL_COMPRESSED_INTENSITY 0x84EC |
| 293 | #define GL_COMPRESSED_RGB 0x84ED |
| 294 | #define GL_COMPRESSED_RGBA 0x84EE |
| 295 | #define GL_TEXTURE_COMPRESSION_HINT 0x84EF |
| 296 | #define GL_NORMAL_MAP 0x8511 |
| 297 | #define GL_REFLECTION_MAP 0x8512 |
| 298 | #define GL_TEXTURE_CUBE_MAP 0x8513 |
| 299 | #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 |
| 300 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 |
| 301 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 |
| 302 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 |
| 303 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 |
| 304 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 |
| 305 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A |
| 306 | #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B |
| 307 | #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C |
| 308 | #define GL_COMBINE 0x8570 |
| 309 | #define GL_COMBINE_RGB 0x8571 |
| 310 | #define GL_COMBINE_ALPHA 0x8572 |
| 311 | #define GL_RGB_SCALE 0x8573 |
| 312 | #define GL_ADD_SIGNED 0x8574 |
| 313 | #define GL_INTERPOLATE 0x8575 |
| 314 | #define GL_CONSTANT 0x8576 |
| 315 | #define GL_PRIMARY_COLOR 0x8577 |
| 316 | #define GL_PREVIOUS 0x8578 |
| 317 | #define GL_SOURCE0_RGB 0x8580 |
| 318 | #define GL_SOURCE1_RGB 0x8581 |
| 319 | #define GL_SOURCE2_RGB 0x8582 |
| 320 | #define GL_SOURCE0_ALPHA 0x8588 |
| 321 | #define GL_SOURCE1_ALPHA 0x8589 |
| 322 | #define GL_SOURCE2_ALPHA 0x858A |
| 323 | #define GL_OPERAND0_RGB 0x8590 |
| 324 | #define GL_OPERAND1_RGB 0x8591 |
| 325 | #define GL_OPERAND2_RGB 0x8592 |
| 326 | #define GL_OPERAND0_ALPHA 0x8598 |
| 327 | #define GL_OPERAND1_ALPHA 0x8599 |
| 328 | #define GL_OPERAND2_ALPHA 0x859A |
| 329 | #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 |
| 330 | #define GL_TEXTURE_COMPRESSED 0x86A1 |
| 331 | #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 |
| 332 | #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 |
| 333 | #define GL_DOT3_RGB 0x86AE |
| 334 | #define GL_DOT3_RGBA 0x86AF |
| 335 | #define GL_MULTISAMPLE_BIT 0x20000000 |
| 336 | |
| 337 | // OpenGL 1.4 Defines |
| 338 | #define GL_BLEND_DST_RGB 0x80C8 |
| 339 | #define GL_BLEND_SRC_RGB 0x80C9 |
| 340 | #define GL_BLEND_DST_ALPHA 0x80CA |
| 341 | #define GL_BLEND_SRC_ALPHA 0x80CB |
| 342 | #define GL_POINT_SIZE_MIN 0x8126 |
| 343 | #define GL_POINT_SIZE_MAX 0x8127 |
| 344 | #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 |
| 345 | #define GL_POINT_DISTANCE_ATTENUATION 0x8129 |
| 346 | #define GL_GENERATE_MIPMAP 0x8191 |
| 347 | #define GL_GENERATE_MIPMAP_HINT 0x8192 |
| 348 | #define GL_DEPTH_COMPONENT16 0x81A5 |
| 349 | #define GL_DEPTH_COMPONENT24 0x81A6 |
| 350 | #define GL_DEPTH_COMPONENT32 0x81A7 |
| 351 | #define GL_MIRRORED_REPEAT 0x8370 |
| 352 | #define GL_FOG_COORDINATE_SOURCE 0x8450 |
| 353 | #define GL_FOG_COORDINATE 0x8451 |
| 354 | #define GL_FRAGMENT_DEPTH 0x8452 |
| 355 | #define GL_CURRENT_FOG_COORDINATE 0x8453 |
| 356 | #define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 |
| 357 | #define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 |
| 358 | #define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 |
| 359 | #define GL_FOG_COORDINATE_ARRAY 0x8457 |
| 360 | #define GL_COLOR_SUM 0x8458 |
| 361 | #define GL_CURRENT_SECONDARY_COLOR 0x8459 |
| 362 | #define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A |
| 363 | #define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B |
| 364 | #define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C |
| 365 | #define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D |
| 366 | #define GL_SECONDARY_COLOR_ARRAY 0x845E |
| 367 | #define GL_MAX_TEXTURE_LOD_BIAS 0x84FD |
| 368 | #define GL_TEXTURE_FILTER_CONTROL 0x8500 |
| 369 | #define GL_TEXTURE_LOD_BIAS 0x8501 |
| 370 | #define GL_INCR_WRAP 0x8507 |
| 371 | #define GL_DECR_WRAP 0x8508 |
| 372 | #define GL_TEXTURE_DEPTH_SIZE 0x884A |
| 373 | #define GL_DEPTH_TEXTURE_MODE 0x884B |
| 374 | #define GL_TEXTURE_COMPARE_MODE 0x884C |
| 375 | #define GL_TEXTURE_COMPARE_FUNC 0x884D |
| 376 | #define GL_COMPARE_R_TO_TEXTURE 0x884E |
| 377 | |
| 378 | // OpenGL 1.5 Defines |
| 379 | #define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE |
| 380 | #define GL_FOG_COORD GL_FOG_COORDINATE |
| 381 | #define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY |
| 382 | #define GL_SRC0_RGB GL_SOURCE0_RGB |
| 383 | #define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER |
| 384 | #define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE |
| 385 | #define GL_SRC1_ALPHA GL_SOURCE1_ALPHA |
| 386 | #define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE |
| 387 | #define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE |
| 388 | #define GL_SRC0_ALPHA GL_SOURCE0_ALPHA |
| 389 | #define GL_SRC1_RGB GL_SOURCE1_RGB |
| 390 | #define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING |
| 391 | #define GL_SRC2_ALPHA GL_SOURCE2_ALPHA |
| 392 | #define GL_SRC2_RGB GL_SOURCE2_RGB |
| 393 | #define GL_BUFFER_SIZE 0x8764 |
| 394 | #define GL_BUFFER_USAGE 0x8765 |
| 395 | #define GL_QUERY_COUNTER_BITS 0x8864 |
| 396 | #define GL_CURRENT_QUERY 0x8865 |
| 397 | #define GL_QUERY_RESULT 0x8866 |
| 398 | #define GL_QUERY_RESULT_AVAILABLE 0x8867 |
| 399 | #define GL_ARRAY_BUFFER 0x8892 |
| 400 | #define GL_ELEMENT_ARRAY_BUFFER 0x8893 |
| 401 | #define GL_ARRAY_BUFFER_BINDING 0x8894 |
| 402 | #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 |
| 403 | #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 |
| 404 | #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 |
| 405 | #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 |
| 406 | #define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 |
| 407 | #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A |
| 408 | #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B |
| 409 | #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C |
| 410 | #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D |
| 411 | #define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E |
| 412 | #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F |
| 413 | #define GL_READ_ONLY 0x88B8 |
| 414 | #define GL_WRITE_ONLY 0x88B9 |
| 415 | #define GL_READ_WRITE 0x88BA |
| 416 | #define GL_BUFFER_ACCESS 0x88BB |
| 417 | #define GL_BUFFER_MAPPED 0x88BC |
| 418 | #define GL_BUFFER_MAP_POINTER 0x88BD |
| 419 | #define GL_STREAM_DRAW 0x88E0 |
| 420 | #define GL_STREAM_READ 0x88E1 |
| 421 | #define GL_STREAM_COPY 0x88E2 |
| 422 | #define GL_STATIC_DRAW 0x88E4 |
| 423 | #define GL_STATIC_READ 0x88E5 |
| 424 | #define GL_STATIC_COPY 0x88E6 |
| 425 | #define GL_DYNAMIC_DRAW 0x88E8 |
| 426 | #define GL_DYNAMIC_READ 0x88E9 |
| 427 | #define GL_DYNAMIC_COPY 0x88EA |
| 428 | #define GL_SAMPLES_PASSED 0x8914 |
| 429 | |
| 430 | // OpenGL 2.0 Defines |
| 431 | #define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION |
| 432 | #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 |
| 433 | #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 |
| 434 | #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 |
| 435 | #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 |
| 436 | #define GL_CURRENT_VERTEX_ATTRIB 0x8626 |
| 437 | #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 |
| 438 | #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 |
| 439 | #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 |
| 440 | #define GL_STENCIL_BACK_FUNC 0x8800 |
| 441 | #define GL_STENCIL_BACK_FAIL 0x8801 |
| 442 | #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 |
| 443 | #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 |
| 444 | #define GL_MAX_DRAW_BUFFERS 0x8824 |
| 445 | #define GL_DRAW_BUFFER0 0x8825 |
| 446 | #define GL_DRAW_BUFFER1 0x8826 |
| 447 | #define GL_DRAW_BUFFER2 0x8827 |
| 448 | #define GL_DRAW_BUFFER3 0x8828 |
| 449 | #define GL_DRAW_BUFFER4 0x8829 |
| 450 | #define GL_DRAW_BUFFER5 0x882A |
| 451 | #define GL_DRAW_BUFFER6 0x882B |
| 452 | #define GL_DRAW_BUFFER7 0x882C |
| 453 | #define GL_DRAW_BUFFER8 0x882D |
| 454 | #define GL_DRAW_BUFFER9 0x882E |
| 455 | #define GL_DRAW_BUFFER10 0x882F |
| 456 | #define GL_DRAW_BUFFER11 0x8830 |
| 457 | #define GL_DRAW_BUFFER12 0x8831 |
| 458 | #define GL_DRAW_BUFFER13 0x8832 |
| 459 | #define GL_DRAW_BUFFER14 0x8833 |
| 460 | #define GL_DRAW_BUFFER15 0x8834 |
| 461 | #define GL_BLEND_EQUATION_ALPHA 0x883D |
| 462 | #define GL_POINT_SPRITE 0x8861 |
| 463 | #define GL_COORD_REPLACE 0x8862 |
| 464 | #define GL_MAX_VERTEX_ATTRIBS 0x8869 |
| 465 | #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A |
| 466 | #define GL_MAX_TEXTURE_COORDS 0x8871 |
| 467 | #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 |
| 468 | #define GL_FRAGMENT_SHADER 0x8B30 |
| 469 | #define GL_VERTEX_SHADER 0x8B31 |
| 470 | #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 |
| 471 | #define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A |
| 472 | #define GL_MAX_VARYING_FLOATS 0x8B4B |
| 473 | #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C |
| 474 | #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D |
| 475 | #define GL_SHADER_TYPE 0x8B4F |
| 476 | #define GL_FLOAT_VEC2 0x8B50 |
| 477 | #define GL_FLOAT_VEC3 0x8B51 |
| 478 | #define GL_FLOAT_VEC4 0x8B52 |
| 479 | #define GL_INT_VEC2 0x8B53 |
| 480 | #define GL_INT_VEC3 0x8B54 |
| 481 | #define GL_INT_VEC4 0x8B55 |
| 482 | #define GL_BOOL 0x8B56 |
| 483 | #define GL_BOOL_VEC2 0x8B57 |
| 484 | #define GL_BOOL_VEC3 0x8B58 |
| 485 | #define GL_BOOL_VEC4 0x8B59 |
| 486 | #define GL_FLOAT_MAT2 0x8B5A |
| 487 | #define GL_FLOAT_MAT3 0x8B5B |
| 488 | #define GL_FLOAT_MAT4 0x8B5C |
| 489 | #define GL_SAMPLER_1D 0x8B5D |
| 490 | #define GL_SAMPLER_2D 0x8B5E |
| 491 | #define GL_SAMPLER_3D 0x8B5F |
| 492 | #define GL_SAMPLER_CUBE 0x8B60 |
| 493 | #define GL_SAMPLER_1D_SHADOW 0x8B61 |
| 494 | #define GL_SAMPLER_2D_SHADOW 0x8B62 |
| 495 | #define GL_DELETE_STATUS 0x8B80 |
| 496 | #define GL_COMPILE_STATUS 0x8B81 |
| 497 | #define GL_LINK_STATUS 0x8B82 |
| 498 | #define GL_VALIDATE_STATUS 0x8B83 |
| 499 | #define GL_INFO_LOG_LENGTH 0x8B84 |
| 500 | #define GL_ATTACHED_SHADERS 0x8B85 |
| 501 | #define GL_ACTIVE_UNIFORMS 0x8B86 |
| 502 | #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 |
| 503 | #define GL_SHADER_SOURCE_LENGTH 0x8B88 |
| 504 | #define GL_ACTIVE_ATTRIBUTES 0x8B89 |
| 505 | #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A |
| 506 | #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B |
| 507 | #define GL_SHADING_LANGUAGE_VERSION 0x8B8C |
| 508 | #define GL_CURRENT_PROGRAM 0x8B8D |
| 509 | #define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 |
| 510 | #define GL_LOWER_LEFT 0x8CA1 |
| 511 | #define GL_UPPER_LEFT 0x8CA2 |
| 512 | #define GL_STENCIL_BACK_REF 0x8CA3 |
| 513 | #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 |
| 514 | #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 |
| 515 | |
| 516 | #endif // GR_WIN32_BUILD |
| 517 | |
| 518 | #endif |