gl2ext.h revision 4a49301e
1#ifndef __gl2ext_h_
2#define __gl2ext_h_
3
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9/*
10** License Applicability. Except to the extent portions of this file are
11** made subject to an alternative license as permitted in the SGI Free
12** Software License B, Version 1.0 (the "License"), the contents of this
13** file are subject only to the provisions of the License. You may not use
14** this file except in compliance with the License. You may obtain a copy
15** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
16** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
17**
18** http://oss.sgi.com/projects/FreeB
19**
20** Note that, as provided in the License, the Software is distributed on an
21** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
22** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
23** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
24** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
25**
26** Original Code. The Original Code is: OpenGL Sample Implementation,
27** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
28** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
29** Copyright in any portions created by third parties is as indicated
30** elsewhere herein. All Rights Reserved.
31**
32** Additional Notice Provisions: The application programming interfaces
33** established by SGI in conjunction with the Original Code are The
34** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
35** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
36** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
37** Window System(R) (Version 1.3), released October 19, 1998. This software
38** was created using the OpenGL(R) version 1.2.1 Sample Implementation
39** published by SGI, but has not been independently verified as being
40** compliant with the OpenGL(R) version 1.2.1 Specification.
41*/
42
43#ifndef GL_APIENTRYP
44#   define GL_APIENTRYP GL_APIENTRY*
45#endif
46
47/*------------------------------------------------------------------------*
48 * OES extension tokens
49 *------------------------------------------------------------------------*/
50
51/* GL_OES_compressed_ETC1_RGB8_texture */
52#ifndef GL_OES_compressed_ETC1_RGB8_texture
53#define GL_ETC1_RGB8_OES                                        0x8D64
54#endif
55
56/* GL_OES_compressed_paletted_texture */
57#ifndef GL_OES_compressed_paletted_texture
58#define GL_PALETTE4_RGB8_OES                                    0x8B90
59#define GL_PALETTE4_RGBA8_OES                                   0x8B91
60#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
61#define GL_PALETTE4_RGBA4_OES                                   0x8B93
62#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
63#define GL_PALETTE8_RGB8_OES                                    0x8B95
64#define GL_PALETTE8_RGBA8_OES                                   0x8B96
65#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
66#define GL_PALETTE8_RGBA4_OES                                   0x8B98
67#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
68#endif
69
70/* GL_OES_EGL_image */
71#ifndef GL_OES_EGL_image
72typedef void* GLeglImageOES;
73#endif
74
75/* GL_OES_depth24 */
76#ifndef GL_OES_depth24
77#define GL_DEPTH_COMPONENT24_OES                                0x81A6
78#endif
79
80/* GL_OES_depth32 */
81#ifndef GL_OES_depth32
82#define GL_DEPTH_COMPONENT32_OES                                0x81A7
83#endif
84
85/* GL_OES_depth_texture */
86/* No new tokens introduced by this extension. */
87
88/* GL_OES_mapbuffer */
89#ifndef GL_OES_mapbuffer
90/* GL_READ_ONLY and GL_READ_WRITE not supported */
91#define GL_WRITE_ONLY_OES                                       0x88B9
92#define GL_BUFFER_ACCESS_OES                                    0x88BB
93#define GL_BUFFER_MAPPED_OES                                    0x88BC
94#define GL_BUFFER_MAP_POINTER_OES                               0x88BD
95#endif
96
97/* GL_OES_packed_depth_stencil */
98#ifndef GL_OES_packed_depth_stencil
99#define GL_DEPTH_STENCIL_OES                                    0x84F9
100#define GL_UNSIGNED_INT_24_8_OES                                0x84FA
101#define GL_DEPTH24_STENCIL8_OES                                 0x88F0
102#endif
103
104/* GL_OES_rgb8_rgba8 */
105#ifndef GL_OES_rgb8_rgba8
106#define GL_RGB8_OES                                             0x8051
107#define GL_RGBA8_OES                                            0x8058
108#endif
109
110/* GL_OES_standard_derivatives */
111#ifndef GL_OES_standard_derivatives
112#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
113#endif
114
115/* GL_OES_stencil1 */
116#ifndef GL_OES_stencil1
117#define GL_STENCIL_INDEX1_OES                                   0x8D46
118#endif
119
120/* GL_OES_stencil4 */
121#ifndef GL_OES_stencil4
122#define GL_STENCIL_INDEX4_OES                                   0x8D47
123#endif
124
125/* GL_OES_texture3D */
126#ifndef GL_OES_texture3D
127#define GL_TEXTURE_WRAP_R_OES                                   0x8072
128#define GL_TEXTURE_3D_OES                                       0x806F
129#define GL_TEXTURE_BINDING_3D_OES                               0x806A
130#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
131#define GL_SAMPLER_3D_OES                                       0x8B5F
132#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
133#endif
134
135/* GL_OES_texture_half_float */
136#ifndef GL_OES_texture_half_float
137#define GL_HALF_FLOAT_OES                                       0x8D61
138#endif
139
140/* GL_OES_vertex_half_float */
141/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
142
143/* GL_OES_vertex_type_10_10_10_2 */
144#ifndef GL_OES_vertex_type_10_10_10_2
145#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
146#define GL_INT_10_10_10_2_OES                                   0x8DF7
147#endif
148
149/* GL_OES_get_program_binary */
150#ifndef GL_OES_get_program_binary
151#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
152#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
153#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
154#endif
155
156/* GL_AMD_program_binary_Z400 */
157#ifndef GL_AMD_program_binary_Z400
158#define GL_Z400_BINARY_AMD                                      0x8740
159#endif
160
161/*------------------------------------------------------------------------*
162 * AMD extension tokens
163 *------------------------------------------------------------------------*/
164
165/* GL_AMD_compressed_3DC_texture */
166#ifndef GL_AMD_compressed_3DC_texture
167#define GL_3DC_X_AMD                                            0x87F9
168#define GL_3DC_XY_AMD                                           0x87FA
169#endif
170
171/* GL_AMD_compressed_ATC_texture */
172#ifndef GL_AMD_compressed_ATC_texture
173#define GL_ATC_RGB_AMD                                          0x8C92
174#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
175#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
176#endif
177
178/*------------------------------------------------------------------------*
179 * EXT extension tokens
180 *------------------------------------------------------------------------*/
181
182/* GL_EXT_texture_filter_anisotropic */
183#ifndef GL_EXT_texture_filter_anisotropic
184#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
185#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
186#endif
187
188/* GL_EXT_texture_type_2_10_10_10_REV */
189#ifndef GL_EXT_texture_type_2_10_10_10_REV
190#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
191#endif
192
193/*------------------------------------------------------------------------*
194 * OES extension functions
195 *------------------------------------------------------------------------*/
196
197/* GL_OES_compressed_ETC1_RGB8_texture */
198#ifndef GL_OES_compressed_ETC1_RGB8_texture
199#define GL_OES_compressed_ETC1_RGB8_texture 1
200#endif
201
202/* GL_OES_compressed_paletted_texture */
203#ifndef GL_OES_compressed_paletted_texture
204#define GL_OES_compressed_paletted_texture 1
205#endif
206
207/* GL_OES_EGL_image */
208#ifndef GL_OES_EGL_image
209#define GL_OES_EGL_image 1
210#ifdef GL_GLEXT_PROTOTYPES
211GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
212GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
213#endif
214typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
215typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
216#endif
217
218/* GL_OES_depth24 */
219#ifndef GL_OES_depth24
220#define GL_OES_depth24 1
221#endif
222
223/* GL_OES_depth32 */
224#ifndef GL_OES_depth32
225#define GL_OES_depth32 1
226#endif
227
228/* GL_OES_depth_texture */
229#ifndef GL_OES_depth_texture
230#define GL_OES_depth_texture 1
231#endif
232
233/* GL_OES_element_index_uint */
234#ifndef GL_OES_element_index_uint
235#define GL_OES_element_index_uint 1
236#endif
237
238/* GL_OES_fbo_render_mipmap */
239#ifndef GL_OES_fbo_render_mipmap
240#define GL_OES_fbo_render_mipmap 1
241#endif
242
243/* GL_OES_fragment_precision_high */
244#ifndef GL_OES_fragment_precision_high
245#define GL_OES_fragment_precision_high 1
246#endif
247
248/* GL_OES_mapbuffer */
249#ifndef GL_OES_mapbuffer
250#define GL_OES_mapbuffer 1
251#ifdef GL_GLEXT_PROTOTYPES
252GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
253GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
254GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
255#endif
256typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
257typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
258typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
259#endif
260
261/* GL_OES_packed_depth_stencil */
262#ifndef GL_OES_packed_depth_stencil
263#define GL_OES_packed_depth_stencil 1
264#endif
265
266/* GL_OES_rgb8_rgba8 */
267#ifndef GL_OES_rgb8_rgba8
268#define GL_OES_rgb8_rgba8 1
269#endif
270
271/* GL_OES_standard_derivatives */
272#ifndef GL_OES_standard_derivatives
273#define GL_OES_standard_derivatives 1
274#endif
275
276/* GL_OES_stencil1 */
277#ifndef GL_OES_stencil1
278#define GL_OES_stencil1 1
279#endif
280
281/* GL_OES_stencil4 */
282#ifndef GL_OES_stencil4
283#define GL_OES_stencil4 1
284#endif
285
286/* GL_OES_texture_3D */
287#ifndef GL_OES_texture_3D
288#define GL_OES_texture_3D 1
289#ifdef GL_GLEXT_PROTOTYPES
290GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
291GL_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 void* pixels);
292GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
293GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
294GL_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 void* data);
295GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
296#endif
297typedef 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);
298typedef 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 void* pixels);
299typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
300typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
301typedef 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 void* data);
302typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
303#endif
304
305/* GL_OES_texture_float_linear */
306#ifndef GL_OES_texture_float_linear
307#define GL_OES_texture_float_linear 1
308#endif
309
310/* GL_OES_texture_half_float_linear */
311#ifndef GL_OES_texture_half_float_linear
312#define GL_OES_texture_half_float_linear 1
313#endif
314
315/* GL_OES_texture_float */
316#ifndef GL_OES_texture_float
317#define GL_OES_texture_float 1
318#endif
319
320/* GL_OES_texture_half_float */
321#ifndef GL_OES_texture_half_float
322#define GL_OES_texture_half_float 1
323#endif
324
325/* GL_OES_texture_npot */
326#ifndef GL_OES_texture_npot
327#define GL_OES_texture_npot 1
328#endif
329
330/* GL_OES_vertex_half_float */
331#ifndef GL_OES_vertex_half_float
332#define GL_OES_vertex_half_float 1
333#endif
334
335/* GL_OES_vertex_type_10_10_10_2 */
336#ifndef GL_OES_vertex_type_10_10_10_2
337#define GL_OES_vertex_type_10_10_10_2 1
338#endif
339
340/* GL_OES_get_program_binary */
341#ifndef GL_OES_get_program_binary
342#define GL_OES_get_program_binary 1
343#ifdef GL_GLEXT_PROTOTYPES
344GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
345GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
346#endif
347typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
348typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
349#endif
350
351/*------------------------------------------------------------------------*
352 * AMD extension functions
353 *------------------------------------------------------------------------*/
354
355/* GL_AMD_compressed_3DC_texture */
356#ifndef GL_AMD_compressed_3DC_texture
357#define GL_AMD_compressed_3DC_texture 1
358#endif
359
360/* GL_AMD_compressed_ATC_texture */
361#ifndef GL_AMD_compressed_ATC_texture
362#define GL_AMD_compressed_ATC_texture 1
363#endif
364
365/* GL_AMD_program_binary_Z400 */
366#ifndef GL_AMD_program_binary_Z400
367#define GL_AMD_program_binary_Z400 1
368#endif
369
370/*------------------------------------------------------------------------*
371 * EXT extension functions
372 *------------------------------------------------------------------------*/
373
374/* GL_EXT_texture_filter_anisotropic */
375#ifndef GL_EXT_texture_filter_anisotropic
376#define GL_EXT_texture_filter_anisotropic 1
377#endif
378
379/* GL_EXT_texture_type_2_10_10_10_REV */
380#ifndef GL_EXT_texture_type_2_10_10_10_REV
381#define GL_EXT_texture_type_2_10_10_10_REV 1
382#endif
383
384#ifdef __cplusplus
385}
386#endif
387
388#endif /* __gl2ext_h_ */
389