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