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