| 1 |
/* |
| 2 |
* Mesa 3-D graphics library |
| 3 |
* |
| 4 |
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved. |
| 5 |
* |
| 6 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 7 |
* copy of this software and associated documentation files (the "Software"), |
| 8 |
* to deal in the Software without restriction, including without limitation |
| 9 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 11 |
* Software is furnished to do so, subject to the following conditions: |
| 12 |
* |
| 13 |
* The above copyright notice and this permission notice shall be included |
| 14 |
* in all copies or substantial portions of the Software. |
| 15 |
* |
| 16 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 17 |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 19 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 20 |
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 21 |
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 22 |
* OTHER DEALINGS IN THE SOFTWARE. |
| 23 |
*/ |
| 24 |
|
| 25 |
|
| 26 |
/** |
| 27 |
* \file glheader.h |
| 28 |
* Wrapper for GL/gl.h and GL/glext.h |
| 29 |
*/ |
| 30 |
|
| 31 |
|
| 32 |
#ifndef GLHEADER_H |
| 33 |
#define GLHEADER_H |
| 34 |
|
| 35 |
|
| 36 |
#define GL_GLEXT_PROTOTYPES |
| 37 |
#include "GL/gl.h" |
| 38 |
#include "GL/glext.h" |
| 39 |
|
| 40 |
|
| 41 |
#ifdef __cplusplus |
| 42 |
extern "C" { |
| 43 |
#endif |
| 44 |
|
| 45 |
|
| 46 |
/* Custom Mesa types to save space. */ |
| 47 |
typedef unsigned short GLenum16; |
| 48 |
typedef unsigned char GLbitfield8; |
| 49 |
typedef unsigned short GLbitfield16; |
| 50 |
typedef GLuint64 GLbitfield64; |
| 51 |
|
| 52 |
/* Common GLES 1.0 and 2.0 tokens */ |
| 53 |
|
| 54 |
#ifndef GL_OES_EGL_image_external |
| 55 |
#define GL_TEXTURE_EXTERNAL_OES 0x8D65 |
| 56 |
#define GL_SAMPLER_EXTERNAL_OES 0x8D66 |
| 57 |
#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 |
| 58 |
#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 |
| 59 |
#endif |
| 60 |
|
| 61 |
#ifndef GL_OES_compressed_ETC1_RGB8_texture |
| 62 |
#define GL_ETC1_RGB8_OES 0x8D64 |
| 63 |
#endif |
| 64 |
|
| 65 |
|
| 66 |
/* GLES 1.0 only tokens */ |
| 67 |
|
| 68 |
typedef int GLclampx; |
| 69 |
|
| 70 |
#ifndef GL_OES_point_size_array |
| 71 |
#define GL_POINT_SIZE_ARRAY_OES 0x8B9C |
| 72 |
#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A |
| 73 |
#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B |
| 74 |
#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C |
| 75 |
#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F |
| 76 |
#endif |
| 77 |
|
| 78 |
|
| 79 |
#ifndef GL_OES_draw_texture |
| 80 |
#define GL_TEXTURE_CROP_RECT_OES 0x8B9D |
| 81 |
#endif |
| 82 |
|
| 83 |
#ifndef GL_TEXTURE_GEN_STR_OES |
| 84 |
#define GL_TEXTURE_GEN_STR_OES 0x8D60 |
| 85 |
#endif |
| 86 |
|
| 87 |
|
| 88 |
/* GLES 2.0 only tokens */ |
| 89 |
|
| 90 |
#ifndef GL_PROGRAM_BINARY_LENGTH_OES |
| 91 |
#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 |
| 92 |
#endif |
| 93 |
|
| 94 |
#ifndef GL_OES_texture_compression_astc |
| 95 |
#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0 |
| 96 |
#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1 |
| 97 |
#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2 |
| 98 |
#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3 |
| 99 |
#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4 |
| 100 |
#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5 |
| 101 |
#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6 |
| 102 |
#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7 |
| 103 |
#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8 |
| 104 |
#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9 |
| 105 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0 |
| 106 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1 |
| 107 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2 |
| 108 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3 |
| 109 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4 |
| 110 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5 |
| 111 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6 |
| 112 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7 |
| 113 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8 |
| 114 |
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9 |
| 115 |
#endif |
| 116 |
|
| 117 |
#ifndef GL_EXT_shader_framebuffer_fetch |
| 118 |
#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 |
| 119 |
#endif |
| 120 |
|
| 121 |
#ifndef GL_EXT_disjoint_timer_query |
| 122 |
#define GL_GPU_DISJOINT_EXT 0x8FBB |
| 123 |
#endif |
| 124 |
|
| 125 |
/* Inexplicably, GL_HALF_FLOAT_OES has a different value than GL_HALF_FLOAT. |
| 126 |
*/ |
| 127 |
#ifndef GL_HALF_FLOAT_OES |
| 128 |
#define GL_HALF_FLOAT_OES 0x8D61 |
| 129 |
#endif |
| 130 |
|
| 131 |
/* There is no formal spec for the following extension. */ |
| 132 |
#ifndef GL_ATI_texture_compression_3dc |
| 133 |
#define GL_ATI_texture_compression_3dc 1 |
| 134 |
#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837 |
| 135 |
#endif |
| 136 |
|
| 137 |
#ifndef GL_EXT_texture_sRGB_R8 |
| 138 |
#define GL_SR8_EXT 0x8FBD |
| 139 |
#endif |
| 140 |
|
| 141 |
#ifndef GL_AMD_compressed_ATC_texture |
| 142 |
#define GL_ATC_RGB_AMD 0x8C92 |
| 143 |
#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 |
| 144 |
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE |
| 145 |
#endif |
| 146 |
|
| 147 |
/** |
| 148 |
* Internal token to represent a GLSL shader program (a collection of |
| 149 |
* one or more shaders that get linked together). Note that GLSL |
| 150 |
* shaders and shader programs share one name space (one hash table) |
| 151 |
* so we need a value that's different from any of the |
| 152 |
* GL_VERTEX/FRAGMENT/GEOMETRY_PROGRAM tokens. |
| 153 |
*/ |
| 154 |
#define GL_SHADER_PROGRAM_MESA 0x9999 |
| 155 |
|
| 156 |
#ifndef GL_EXT_multisampled_render_to_texture |
| 157 |
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C |
| 158 |
#endif |
| 159 |
|
| 160 |
#ifdef __cplusplus |
| 161 |
} |
| 162 |
#endif |
| 163 |
|
| 164 |
#endif /* GLHEADER_H */ |