3 * Copyright (c) 2001 César Blecua Udías All Rights Reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * CESAR BLECUA UDIAS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
20 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 #ifndef __SG_EXTENSIONS_HXX
25 #define __SG_EXTENSIONS_HXX 1
31 #include <simgear/compiler.h>
35 #if !defined(__APPLE__) && !defined(WIN32)
39 #if defined(__cplusplus)
47 bool SGSearchExtensionsString(const char *extString, const char *extName);
48 bool SGIsOpenGLExtensionSupported(const char *extName);
51 // don't use an inline function for symbol lookup, since it is too big
52 void* macosxGetGLProcAddress(const char *func);
54 #elif !defined( WIN32 )
56 void *SGGetGLProcAddress(const char *func);
60 inline void (*SGLookupFunction(const char *func))()
63 return (void (*)()) wglGetProcAddress(func);
65 #elif defined( __APPLE__ )
66 return (void (*)()) macosxGetGLProcAddress(func);
68 #else // UNIX, default
69 return (void (*)()) SGGetGLProcAddress(func);
74 * OpenGL 1.2 and 1.3 enumerants
77 #ifndef GL_VERSION_1_2
78 #define GL_CLAMP_TO_EDGE 0x812F
79 #define GL_TEXTURE_WRAP_R 0x8072
80 #define GL_BLEND_EQUATION 0x8009
83 #define GL_FUNC_ADD 0x8006
84 #define GL_FUNC_SUBTRACT 0x800A
85 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
86 #define GL_BLEND_COLOR 0x8005
87 #define GL_CONSTANT_COLOR 0x8001
88 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
89 #define GL_CONSTANT_ALPHA 0x8003
90 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
93 typedef void (APIENTRY * glBlendEquationProc) (GLenum mode );
94 typedef void (APIENTRY * glBlendColorProc) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
97 /* OpenGL extension declarations */
100 * glPointParameterf and glPointParameterfv
102 #ifndef GL_EXT_point_parameters
103 #define GL_EXT_point_parameters 1
104 #define GL_POINT_SIZE_MIN_EXT 0x8126
105 #define GL_DISTANCE_ATTENUATION_EXT 0x8129
108 #ifndef GL_ARB_point_parameters
109 #define GL_ARB_point_parameters 1
110 #define GL_POINT_SIZE_MIN_ARB 0x8126
111 #define GL_DISTANCE_ATTENUATION_ARB 0x8129
114 typedef void (APIENTRY * glPointParameterfProc)(GLenum pname, GLfloat param);
115 typedef void (APIENTRY * glPointParameterfvProc)(GLenum pname, const GLfloat *params);
121 #ifndef GL_ARB_multitexture
122 #define GL_ARB_multitexture 1
123 #define GL_TEXTURE0_ARB 0x84C0
124 #define GL_TEXTURE1_ARB 0x84C1
125 #define GL_TEXTURE2_ARB 0x84C2
126 #define GL_TEXTURE3_ARB 0x84C3
127 #define GL_TEXTURE4_ARB 0x84C4
128 #define GL_TEXTURE5_ARB 0x84C5
129 #define GL_TEXTURE6_ARB 0x84C6
130 #define GL_TEXTURE7_ARB 0x84C7
131 #define GL_TEXTURE8_ARB 0x84C8
132 #define GL_TEXTURE9_ARB 0x84C9
133 #define GL_TEXTURE10_ARB 0x84CA
134 #define GL_TEXTURE11_ARB 0x84CB
135 #define GL_TEXTURE12_ARB 0x84CC
136 #define GL_TEXTURE13_ARB 0x84CD
137 #define GL_TEXTURE14_ARB 0x84CE
138 #define GL_TEXTURE15_ARB 0x84CF
139 #define GL_TEXTURE16_ARB 0x84D0
140 #define GL_TEXTURE17_ARB 0x84D1
141 #define GL_TEXTURE18_ARB 0x84D2
142 #define GL_TEXTURE19_ARB 0x84D3
143 #define GL_TEXTURE20_ARB 0x84D4
144 #define GL_TEXTURE21_ARB 0x84D5
145 #define GL_TEXTURE22_ARB 0x84D6
146 #define GL_TEXTURE23_ARB 0x84D7
147 #define GL_TEXTURE24_ARB 0x84D8
148 #define GL_TEXTURE25_ARB 0x84D9
149 #define GL_TEXTURE26_ARB 0x84DA
150 #define GL_TEXTURE27_ARB 0x84DB
151 #define GL_TEXTURE28_ARB 0x84DC
152 #define GL_TEXTURE29_ARB 0x84DD
153 #define GL_TEXTURE30_ARB 0x84DE
154 #define GL_TEXTURE31_ARB 0x84DF
155 #define GL_ACTIVE_TEXTURE_ARB 0x84E0
156 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
157 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
160 typedef void (APIENTRY * glActiveTextureProc)(GLenum texture);
161 typedef void (APIENTRY * glClientActiveTextureProc)(GLenum texture);
164 * GL_EXT_separate_specular_color
167 #ifndef GL_LIGHT_MODEL_COLOR_CONTROL
168 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
169 #define GL_SINGLE_COLOR 0x81F9
170 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA
174 * GL_ARB_texture_cube_map
177 #ifndef GL_ARB_texture_cube_map
178 #define GL_ARB_texture_cube_map 1
179 #define GL_NORMAL_MAP_ARB 0x8511
180 #define GL_REFLECTION_MAP_ARB 0x8512
181 #define GL_TEXTURE_CUBE_MAP_ARB 0x8513
182 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
183 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
184 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
185 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
186 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
187 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
188 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
189 #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
190 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
194 * GL_ARB_texture_env_combine
197 #ifndef GL_ARB_texture_env_combine
198 #define GL_ARB_texture_env_combine 1
199 #define GL_COMBINE_ARB 0x8570
200 #define GL_COMBINE_RGB_ARB 0x8571
201 #define GL_COMBINE_ALPHA_ARB 0x8572
202 #define GL_RGB_SCALE_ARB 0x8573
203 #define GL_ADD_SIGNED_ARB 0x8574
204 #define GL_INTERPOLATE_ARB 0x8575
205 #define GL_SUBTRACT_ARB 0x84E7
206 #define GL_CONSTANT_ARB 0x8576
207 #define GL_PRIMARY_COLOR_ARB 0x8577
208 #define GL_PREVIOUS_ARB 0x8578
209 #define GL_SOURCE0_RGB_ARB 0x8580
210 #define GL_SOURCE1_RGB_ARB 0x8581
211 #define GL_SOURCE2_RGB_ARB 0x8582
212 #define GL_SOURCE0_ALPHA_ARB 0x8588
213 #define GL_SOURCE1_ALPHA_ARB 0x8589
214 #define GL_SOURCE2_ALPHA_ARB 0x858A
215 #define GL_OPERAND0_RGB_ARB 0x8590
216 #define GL_OPERAND1_RGB_ARB 0x8591
217 #define GL_OPERAND2_RGB_ARB 0x8592
218 #define GL_OPERAND0_ALPHA_ARB 0x8598
219 #define GL_OPERAND1_ALPHA_ARB 0x8599
220 #define GL_OPERAND2_ALPHA_ARB 0x859A
224 * GL_ARB_texture_env_dot3
227 #ifndef GL_ARB_texture_env_dot3
228 #define GL_ARB_texture_env_dot3 1
229 #define GL_DOT3_RGB_ARB 0x86AE
230 #define GL_DOT3_RGBA_ARB 0x86AF
236 #ifndef GL_ARB_depth_texture
237 #define GL_ARB_depth_texture 1
238 #define GL_DEPTH_COMPONENT16_ARB 0x81A5
239 #define GL_DEPTH_COMPONENT24_ARB 0x81A6
240 #define GL_DEPTH_COMPONENT32_ARB 0x81A7
241 #define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
242 #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
248 #ifndef GL_ARB_multisample
249 #define GL_ARB_multisample 1
250 #define GL_MULTISAMPLE_ARB 0x809D
251 #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
252 #define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
253 #define GL_SAMPLE_COVERAGE_ARB 0x80A0
254 #define GL_SAMPLE_BUFFERS_ARB 0x80A8
255 #define GL_SAMPLES_ARB 0x80A9
256 #define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
257 #define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
258 #define GL_MULTISAMPLE_BIT_ARB 0x20000000
259 #define GL_DOUBLEBUFFER 0x0C32
260 #define GL_AUX_BUFFERS 0x0C00
261 #define WGL_SAMPLE_BUFFERS_ARB 0x2041
262 #define WGL_SAMPLES_ARB 0x2042
265 #ifndef GL_SGIS_generate_mipmap
266 #define GL_SGIS_generate_mipmap 1
267 #define GL_GENERATE_MIPMAP_SGIS 0x8191
268 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
271 /* WGL spcific OpenGL extenstions */
275 * WGL_ARB_extensions_string
277 #ifndef WGL_ARB_extensions_string
278 #define WGL_ARB_extensions_string 1
279 typedef const char * (APIENTRY * wglGetExtensionsStringARBProc) (HDC hDC);
285 #ifndef WGL_ARB_pbuffer
286 #define WGL_ARB_pbuffer 1
287 #define WGL_DRAW_TO_PBUFFER_ARB 0x202D
288 #define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
289 #define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
290 #define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
291 #define WGL_PBUFFER_LARGEST_ARB 0x2033
292 #define WGL_PBUFFER_WIDTH_ARB 0x2034
293 #define WGL_PBUFFER_HEIGHT_ARB 0x2035
294 #define WGL_PBUFFER_LOST_ARB 0x2036
295 DECLARE_HANDLE(HPBUFFERARB);
296 typedef HPBUFFERARB (APIENTRY * wglCreatePbufferARBProc) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
297 typedef HDC (APIENTRY * wglGetPbufferDCARBProc) (HPBUFFERARB hPbuffer);
298 typedef int (APIENTRY * wglReleasePbufferDCARBProc) (HPBUFFERARB hPbuffer, HDC hDC);
299 typedef BOOL (APIENTRY * wglDestroyPbufferARBProc) (HPBUFFERARB hPbuffer);
300 typedef BOOL (APIENTRY * wglQueryPbufferARBProc) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
307 #ifndef WGL_ARB_pixel_format
308 #define WGL_ARB_pixel_format 1
309 #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
310 #define WGL_DRAW_TO_WINDOW_ARB 0x2001
311 #define WGL_DRAW_TO_BITMAP_ARB 0x2002
312 #define WGL_ACCELERATION_ARB 0x2003
313 #define WGL_NEED_PALETTE_ARB 0x2004
314 #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
315 #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
316 #define WGL_SWAP_METHOD_ARB 0x2007
317 #define WGL_NUMBER_OVERLAYS_ARB 0x2008
318 #define WGL_NUMBER_UNDERLAYS_ARB 0x2009
319 #define WGL_TRANSPARENT_ARB 0x200A
320 #define WGL_SHARE_DEPTH_ARB 0x200C
321 #define WGL_SHARE_STENCIL_ARB 0x200D
322 #define WGL_SHARE_ACCUM_ARB 0x200E
323 #define WGL_SUPPORT_GDI_ARB 0x200F
324 #define WGL_SUPPORT_OPENGL_ARB 0x2010
325 #define WGL_DOUBLE_BUFFER_ARB 0x2011
326 #define WGL_STEREO_ARB 0x2012
327 #define WGL_PIXEL_TYPE_ARB 0x2013
328 #define WGL_COLOR_BITS_ARB 0x2014
329 #define WGL_RED_BITS_ARB 0x2015
330 #define WGL_RED_SHIFT_ARB 0x2016
331 #define WGL_GREEN_BITS_ARB 0x2017
332 #define WGL_GREEN_SHIFT_ARB 0x2018
333 #define WGL_BLUE_BITS_ARB 0x2019
334 #define WGL_BLUE_SHIFT_ARB 0x201A
335 #define WGL_ALPHA_BITS_ARB 0x201B
336 #define WGL_ALPHA_SHIFT_ARB 0x201C
337 #define WGL_ACCUM_BITS_ARB 0x201D
338 #define WGL_ACCUM_RED_BITS_ARB 0x201E
339 #define WGL_ACCUM_GREEN_BITS_ARB 0x201F
340 #define WGL_ACCUM_BLUE_BITS_ARB 0x2020
341 #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
342 #define WGL_DEPTH_BITS_ARB 0x2022
343 #define WGL_STENCIL_BITS_ARB 0x2023
344 #define WGL_AUX_BUFFERS_ARB 0x2024
345 #define WGL_NO_ACCELERATION_ARB 0x2025
346 #define WGL_GENERIC_ACCELERATION_ARB 0x2026
347 #define WGL_FULL_ACCELERATION_ARB 0x2027
348 #define WGL_SWAP_EXCHANGE_ARB 0x2028
349 #define WGL_SWAP_COPY_ARB 0x2029
350 #define WGL_SWAP_UNDEFINED_ARB 0x202A
351 #define WGL_TYPE_RGBA_ARB 0x202B
352 #define WGL_TYPE_COLORINDEX_ARB 0x202C
353 #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
354 #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
355 #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
356 #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
357 #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
358 typedef BOOL (APIENTRY * wglGetPixelFormatAttribivARBProc) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
359 typedef BOOL (APIENTRY * wglGetPixelFormatAttribfvARBProc) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
360 typedef BOOL (APIENTRY * wglChoosePixelFormatARBProc) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
366 #ifndef WGL_ARB_render_texture
367 #define WGL_ARB_render_texture 1
369 #define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
370 #define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
371 #define WGL_TEXTURE_FORMAT_ARB 0x2072
372 #define WGL_TEXTURE_TARGET_ARB 0x2073
373 #define WGL_MIPMAP_TEXTURE_ARB 0x2074
374 #define WGL_TEXTURE_RGB_ARB 0x2075
375 #define WGL_TEXTURE_RGBA_ARB 0x2076
376 #define WGL_NO_TEXTURE_ARB 0x2077
377 #define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
378 #define WGL_TEXTURE_1D_ARB 0x2079
379 #define WGL_TEXTURE_2D_ARB 0x207A
380 #define WGL_NO_TEXTURE_ARB 0x2077
381 #define WGL_MIPMAP_LEVEL_ARB 0x207B
382 #define WGL_CUBE_MAP_FACE_ARB 0x207C
383 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
384 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
385 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
386 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
387 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
388 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
389 #define WGL_FRONT_LEFT_ARB 0x2083
390 #define WGL_FRONT_RIGHT_ARB 0x2084
391 #define WGL_BACK_LEFT_ARB 0x2085
392 #define WGL_BACK_RIGHT_ARB 0x2086
393 #define WGL_AUX0_ARB 0x2087
394 #define WGL_AUX1_ARB 0x2088
395 #define WGL_AUX2_ARB 0x2089
396 #define WGL_AUX3_ARB 0x208A
397 #define WGL_AUX4_ARB 0x208B
398 #define WGL_AUX5_ARB 0x208C
399 #define WGL_AUX6_ARB 0x208D
400 #define WGL_AUX7_ARB 0x208E
401 #define WGL_AUX8_ARB 0x208F
402 #define WGL_AUX9_ARB 0x2090
403 typedef BOOL (APIENTRY * wglBindTexImageARBProc) (HPBUFFERARB hPbuffer, int iBuffer);
404 typedef BOOL (APIENTRY * wglReleaseTexImageARBProc) (HPBUFFERARB hPbuffer, int iBuffer);
405 typedef BOOL (APIENTRY * wglSetPbufferAttribARBProc) (HPBUFFERARB hPbuffer, const int *piAttribList);
408 #elif !defined(__APPLE__) /* !WIN32 */
410 /* GLX pcific OpenGL extenstions */
413 #ifndef GLX_ARB_multisample
414 #define GLX_ARB_multisample1
415 #define GLX_SAMPLE_BUFFERS_ARB 100001
416 #define GLX_SAMPLES_ARB 100000
419 #ifndef GLX_SGIX_pbuffer
420 #define GLX_SGIX_pbuffer 1
421 #define GLX_DOUBLEBUFFER 5
422 #define GLX_AUX_BUFFERS 0x00000010
426 # ifdef GLXPbufferSGIX
427 # define GLXPbuffer GLXPbufferSGIX
431 # ifdef GLXFBConfigSGIX
432 # define GLXFBConfig GLXFBConfigSGIX
436 typedef GLXFBConfig *(*glXChooseFBConfigProc) (Display *dpy, int screen, int *attribList, int *nitems);
437 typedef GLXPbuffer (*glXCreateGLXPbufferProc) (Display *dpy, GLXFBConfig config, unsigned int width, unsigned int height, int *attrib_list);
438 typedef GLXPbuffer (*glXCreatePbufferProc) (Display *dpy, GLXFBConfig config, int *attrib_list);
439 typedef XVisualInfo *(*glXGetVisualFromFBConfigProc) (Display *dpy, GLXFBConfig config);
440 typedef GLXContext (*glXCreateContextWithConfigProc) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
441 typedef GLXContext (*glXCreateContextProc) (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
442 typedef void (*glXDestroyPbufferProc) (Display *dpy, GLXPbuffer pbuf);
443 typedef int (*glXQueryGLXPbufferSGIXProc) (Display *, GLXPbuffer, int, unsigned int *);
444 typedef void (*glXQueryDrawableProc) (Display *, GLXDrawable, int, unsigned int *);
448 /* NVIDIA specific extension */
451 * NV_texture_rectangle
454 #ifndef GL_NV_texture_rectangle
455 #define GL_NV_texture_rectangle 1
456 #define GL_TEXTURE_RECTANGLE_NV 0x84F5
457 #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
458 #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
459 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
463 * NV_texture_rectangle
466 #ifndef GL_EXT_texture_rectangle
467 #define GL_EXT_texture_rectangle 1
468 #define GL_TEXTURE_RECTANGLE_EXT 0x84F5
469 #define GL_TEXTURE_BINDING_RECTANGLE_EXT 0x84F6
470 #define GL_PROXY_TEXTURE_RECTANGLE_EXT 0x84F7
471 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8
475 * WGL_NV_texture_rectangle
478 #ifndef WGL_NV_texture_rectangle
479 #define WGL_NV_texture_rectangle 1
480 #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
481 #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
482 #define WGL_TEXTURE_RECTANGLE_NV 0x20A2
486 * NV_render_depth_texture
489 #ifndef WGL_NV_render_depth_texture
490 #define WGL_NV_render_depth_texture 1
491 #define WGL_NO_TEXTURE_ARB 0x2077
492 #define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
493 #define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
494 #define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
495 #define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
496 #define WGL_DEPTH_COMPONENT_NV 0x20A7
502 #ifndef GL_NV_float_buffer
503 #define GL_NV_float_buffer 1
504 #define GL_FLOAT_R_NV 0x8880
505 #define GL_FLOAT_RG_NV 0x8881
506 #define GL_FLOAT_RGB_NV 0x8882
507 #define GL_FLOAT_RGBA_NV 0x8883
508 #define GL_FLOAT_R16_NV 0x8884
509 #define GL_FLOAT_R32_NV 0x8885
510 #define GL_FLOAT_RG16_NV 0x8886
511 #define GL_FLOAT_RG32_NV 0x8887
512 #define GL_FLOAT_RGB16_NV 0x8888
513 #define GL_FLOAT_RGB32_NV 0x8889
514 #define GL_FLOAT_RGBA16_NV 0x888A
515 #define GL_FLOAT_RGBA32_NV 0x888B
516 #define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
517 #define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
518 #define GL_FLOAT_RGBA_MODE_NV 0x888E
520 #ifndef GLX_NV_float_buffer
521 #define GLX_NV_float_buffer 1
522 #define GLX_FLOAT_COMPONENTS_NV 0x20B0
523 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
524 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
525 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
526 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
527 #define GLX_TEXTURE_FLOAT_R_NV 0x20B5
528 #define GLX_TEXTURE_FLOAT_RG_NV 0x20B6
529 #define GLX_TEXTURE_FLOAT_RGB_NV 0x20B7
530 #define GLX_TEXTURE_FLOAT_RGBA_NV 0x20B8
532 #ifndef WGL_NV_float_buffer
533 #define WGL_NV_float_buffer 1
534 #define WGL_FLOAT_COMPONENTS_NV 0x20B0
535 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
536 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
537 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
538 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
539 #define WGL_TEXTURE_FLOAT_R_NV 0x20B5
540 #define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
541 #define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
542 #define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
546 /* ATI specific extension */
549 * ATI_pixel_format_float
551 #ifndef WGL_ATI_pixel_format_float
552 #define WGL_ATI_pixel_format_float 1
553 #define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
554 #define GL_RGBA_FLOAT_MODE_ATI 0x8820
555 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
561 #ifndef GL_ATI_texture_float
562 #define GL_ATI_texture_float 1
563 #define GL_RGBA_FLOAT32_ATI 0x8814
564 #define GL_RGB_FLOAT32_ATI 0x8815
565 #define GL_ALPHA_FLOAT32_ATI 0x8816
566 #define GL_INTENSITY_FLOAT32_ATI 0x8817
567 #define GL_LUMINANCE_FLOAT32_ATI 0x8818
568 #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
569 #define GL_RGBA_FLOAT16_ATI 0x881A
570 #define GL_RGB_FLOAT16_ATI 0x881B
571 #define GL_ALPHA_FLOAT16_ATI 0x881C
572 #define GL_INTENSITY_FLOAT16_ATI 0x881D
573 #define GL_LUMINANCE_FLOAT16_ATI 0x881E
574 #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
580 #ifndef GL_ARB_point_sprite
581 #define GL_ARB_point_sprite 1
582 #define GL_POINT_SPRITE_ARB 0x8861
583 #define GL_COORD_REPLACE_ARB 0x8862
586 #ifndef GL_NV_point_sprite
587 #define GL_NV_point_sprite 1
588 #define GL_POINT_SPRITE_NV 0x8861
589 #define GL_COORD_REPLACE_NV 0x8862
590 #define GL_POINT_SPRITE_R_MODE_NV 0x8863
593 #ifndef GL_VERSION_2_0
594 #define GL_POINT_SPRITE 0x8861
595 #define GL_COORD_REPLACE 0x8862
601 #ifndef GL_ARB_vertex_program
602 #define GL_ARB_vertex_program 1
603 #define GL_COLOR_SUM_ARB 0x8458
604 #define GL_VERTEX_PROGRAM_ARB 0x8620
605 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
606 #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
607 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
608 #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
609 #define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
610 #define GL_PROGRAM_LENGTH_ARB 0x8627
611 #define GL_PROGRAM_STRING_ARB 0x8628
612 #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
613 #define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
614 #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
615 #define GL_CURRENT_MATRIX_ARB 0x8641
616 #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
617 #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
618 #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
619 #define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
620 #define GL_PROGRAM_BINDING_ARB 0x8677
621 #define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
622 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
623 #define GL_PROGRAM_ERROR_STRING_ARB 0x8874
624 #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
625 #define GL_PROGRAM_FORMAT_ARB 0x8876
626 #define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
627 #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
628 #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
629 #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
630 #define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
631 #define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
632 #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
633 #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
634 #define GL_PROGRAM_PARAMETERS_ARB 0x88A8
635 #define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
636 #define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
637 #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
638 #define GL_PROGRAM_ATTRIBS_ARB 0x88AC
639 #define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
640 #define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
641 #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
642 #define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
643 #define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
644 #define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
645 #define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
646 #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
647 #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
648 #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
649 #define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
650 #define GL_MATRIX0_ARB 0x88C0
651 #define GL_MATRIX1_ARB 0x88C1
652 #define GL_MATRIX2_ARB 0x88C2
653 #define GL_MATRIX3_ARB 0x88C3
654 #define GL_MATRIX4_ARB 0x88C4
655 #define GL_MATRIX5_ARB 0x88C5
656 #define GL_MATRIX6_ARB 0x88C6
657 #define GL_MATRIX7_ARB 0x88C7
658 #define GL_MATRIX8_ARB 0x88C8
659 #define GL_MATRIX9_ARB 0x88C9
660 #define GL_MATRIX10_ARB 0x88CA
661 #define GL_MATRIX11_ARB 0x88CB
662 #define GL_MATRIX12_ARB 0x88CC
663 #define GL_MATRIX13_ARB 0x88CD
664 #define GL_MATRIX14_ARB 0x88CE
665 #define GL_MATRIX15_ARB 0x88CF
666 #define GL_MATRIX16_ARB 0x88D0
667 #define GL_MATRIX17_ARB 0x88D1
668 #define GL_MATRIX18_ARB 0x88D2
669 #define GL_MATRIX19_ARB 0x88D3
670 #define GL_MATRIX20_ARB 0x88D4
671 #define GL_MATRIX21_ARB 0x88D5
672 #define GL_MATRIX22_ARB 0x88D6
673 #define GL_MATRIX23_ARB 0x88D7
674 #define GL_MATRIX24_ARB 0x88D8
675 #define GL_MATRIX25_ARB 0x88D9
676 #define GL_MATRIX26_ARB 0x88DA
677 #define GL_MATRIX27_ARB 0x88DB
678 #define GL_MATRIX28_ARB 0x88DC
679 #define GL_MATRIX29_ARB 0x88DD
680 #define GL_MATRIX30_ARB 0x88DE
681 #define GL_MATRIX31_ARB 0x88DF
685 * ARB_fragment_program
687 #ifndef GL_ARB_fragment_program
688 #define GL_ARB_fragment_program 1
689 #define GL_FRAGMENT_PROGRAM_ARB 0x8804
690 #define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
691 #define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
692 #define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
693 #define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
694 #define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
695 #define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
696 #define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
697 #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
698 #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
699 #define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
700 #define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
701 #define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
702 #define GL_MAX_TEXTURE_COORDS_ARB 0x8871
703 #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
706 typedef void (APIENTRY * glVertexAttrib1dProc) (GLuint index, GLdouble x);
707 typedef void (APIENTRY * glVertexAttrib1dvProc) (GLuint index, const GLdouble *v);
708 typedef void (APIENTRY * glVertexAttrib1fProc) (GLuint index, GLfloat x);
709 typedef void (APIENTRY * glVertexAttrib1fvProc) (GLuint index, const GLfloat *v);
710 typedef void (APIENTRY * glVertexAttrib1sProc) (GLuint index, GLshort x);
711 typedef void (APIENTRY * glVertexAttrib1svProc) (GLuint index, const GLshort *v);
712 typedef void (APIENTRY * glVertexAttrib2dProc) (GLuint index, GLdouble x, GLdouble y);
713 typedef void (APIENTRY * glVertexAttrib2dvProc) (GLuint index, const GLdouble *v);
714 typedef void (APIENTRY * glVertexAttrib2fProc) (GLuint index, GLfloat x, GLfloat y);
715 typedef void (APIENTRY * glVertexAttrib2fvProc) (GLuint index, const GLfloat *v);
716 typedef void (APIENTRY * glVertexAttrib2sProc) (GLuint index, GLshort x, GLshort y);
717 typedef void (APIENTRY * glVertexAttrib2svProc) (GLuint index, const GLshort *v);
718 typedef void (APIENTRY * glVertexAttrib3dProc) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
719 typedef void (APIENTRY * glVertexAttrib3dvProc) (GLuint index, const GLdouble *v);
720 typedef void (APIENTRY * glVertexAttrib3fProc) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
721 typedef void (APIENTRY * glVertexAttrib3fvProc) (GLuint index, const GLfloat *v);
722 typedef void (APIENTRY * glVertexAttrib3sProc) (GLuint index, GLshort x, GLshort y, GLshort z);
723 typedef void (APIENTRY * glVertexAttrib3svProc) (GLuint index, const GLshort *v);
724 typedef void (APIENTRY * glVertexAttrib4NbvProc) (GLuint index, const GLbyte *v);
725 typedef void (APIENTRY * glVertexAttrib4NivProc) (GLuint index, const GLint *v);
726 typedef void (APIENTRY * glVertexAttrib4NsvProc) (GLuint index, const GLshort *v);
727 typedef void (APIENTRY * glVertexAttrib4NubProc) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
728 typedef void (APIENTRY * glVertexAttrib4NubvProc) (GLuint index, const GLubyte *v);
729 typedef void (APIENTRY * glVertexAttrib4NuivProc) (GLuint index, const GLuint *v);
730 typedef void (APIENTRY * glVertexAttrib4NusvProc) (GLuint index, const GLushort *v);
731 typedef void (APIENTRY * glVertexAttrib4bvProc) (GLuint index, const GLbyte *v);
732 typedef void (APIENTRY * glVertexAttrib4dProc) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
733 typedef void (APIENTRY * glVertexAttrib4dvProc) (GLuint index, const GLdouble *v);
734 typedef void (APIENTRY * glVertexAttrib4fProc) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
735 typedef void (APIENTRY * glVertexAttrib4fvProc) (GLuint index, const GLfloat *v);
736 typedef void (APIENTRY * glVertexAttrib4ivProc) (GLuint index, const GLint *v);
737 typedef void (APIENTRY * glVertexAttrib4sProc) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
738 typedef void (APIENTRY * glVertexAttrib4svProc) (GLuint index, const GLshort *v);
739 typedef void (APIENTRY * glVertexAttrib4ubvProc) (GLuint index, const GLubyte *v);
740 typedef void (APIENTRY * glVertexAttrib4uivProc) (GLuint index, const GLuint *v);
741 typedef void (APIENTRY * glVertexAttrib4usvProc) (GLuint index, const GLushort *v);
742 typedef void (APIENTRY * glVertexAttribPointerProc) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
743 typedef void (APIENTRY * glEnableVertexAttribArrayProc) (GLuint index);
744 typedef void (APIENTRY * glDisableVertexAttribArrayProc) (GLuint index);
745 typedef void (APIENTRY * glProgramStringProc) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
746 typedef void (APIENTRY * glBindProgramProc) (GLenum target, GLuint program);
747 typedef void (APIENTRY * glDeleteProgramsProc) (GLsizei n, const GLuint *programs);
748 typedef void (APIENTRY * glGenProgramsProc) (GLsizei n, GLuint *programs);
749 typedef void (APIENTRY * glProgramEnvParameter4dProc) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
750 typedef void (APIENTRY * glProgramEnvParameter4dvProc) (GLenum target, GLuint index, const GLdouble *params);
751 typedef void (APIENTRY * glProgramEnvParameter4fProc) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
752 typedef void (APIENTRY * glProgramEnvParameter4fvProc) (GLenum target, GLuint index, const GLfloat *params);
753 typedef void (APIENTRY * glProgramLocalParameter4dProc) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
754 typedef void (APIENTRY * glProgramLocalParameter4dvProc) (GLenum target, GLuint index, const GLdouble *params);
755 typedef void (APIENTRY * glProgramLocalParameter4fProc) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
756 typedef void (APIENTRY * glProgramLocalParameter4fvProc) (GLenum target, GLuint index, const GLfloat *params);
757 typedef void (APIENTRY * glGetProgramEnvParameterdvProc) (GLenum target, GLuint index, GLdouble *params);
758 typedef void (APIENTRY * glGetProgramEnvParameterfvProc) (GLenum target, GLuint index, GLfloat *params);
759 typedef void (APIENTRY * glGetProgramLocalParameterdvProc) (GLenum target, GLuint index, GLdouble *params);
760 typedef void (APIENTRY * glGetProgramLocalParameterfvProc) (GLenum target, GLuint index, GLfloat *params);
761 typedef void (APIENTRY * glGetProgramivProc) (GLenum target, GLenum pname, GLint *params);
762 typedef void (APIENTRY * glGetProgramStringProc) (GLenum target, GLenum pname, GLvoid *string);
763 typedef void (APIENTRY * glGetVertexAttribdvProc) (GLuint index, GLenum pname, GLdouble *params);
764 typedef void (APIENTRY * glGetVertexAttribfvProc) (GLuint index, GLenum pname, GLfloat *params);
765 typedef void (APIENTRY * glGetVertexAttribivProc) (GLuint index, GLenum pname, GLint *params);
766 typedef void (APIENTRY * glGetVertexAttribPointervProc) (GLuint index, GLenum pname, GLvoid* *pointer);
767 typedef GLboolean (APIENTRY * glIsProgramProc) (GLuint program);
770 * EXT_framebuffer_objects
772 #ifndef GL_EXT_framebuffer_object
773 #define GL_EXT_framebuffer_object 1
774 #define GL_NONE_EXT 0
775 #define GL_FRAMEBUFFER_EXT 0x8D40
776 #define GL_RENDERBUFFER_EXT 0x8D41
777 #define GL_RGBA4_EXT 0x8056
778 #define GL_RGB5_A1_EXT 0x8057
779 #define GL_RGB565_EXT 0x8D62
780 #define GL_DEPTH_COMPONENT16_EXT 0x81A5
781 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
782 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
783 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
784 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
785 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
786 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
787 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
788 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
789 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
790 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
791 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
792 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
793 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
794 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
795 #define GL_DEPTH_ATTACHMENT_EXT 0x8D00
796 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20
797 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
798 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
799 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
800 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
801 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
802 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
803 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
804 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
805 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
806 #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
809 typedef GLboolean (APIENTRY * glIsRenderbufferProc) (GLuint renderbuffer);
810 typedef void (APIENTRY * glBindRenderbufferProc) (GLenum target, GLuint renderbuffer);
811 typedef void (APIENTRY * glDeleteRenderbuffersProc) (GLsizei n, const GLuint* renderbuffers);
812 typedef void (APIENTRY * glGenRenderbuffersProc) (GLsizei n, GLuint* renderbuffers);
813 typedef void (APIENTRY * glRenderbufferStorageProc) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
814 typedef void (APIENTRY * glGetRenderbufferParameterivProc) (GLenum target, GLenum pname, GLint* params);
815 typedef GLboolean (APIENTRY * glIsFramebufferProc) (GLuint framebuffer);
816 typedef void (APIENTRY * glBindFramebufferProc) (GLenum target, GLuint framebuffer);
817 typedef void (APIENTRY * glDeleteFramebuffersProc) (GLsizei n, const GLuint* framebuffers);
818 typedef void (APIENTRY * glGenFramebuffersProc) (GLsizei n, GLuint* framebuffers);
819 typedef GLenum (APIENTRY * glCheckFramebufferStatusProc) (GLenum target);
820 typedef void (APIENTRY * glFramebufferRenderbufferProc) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
821 typedef void (APIENTRY * glFramebufferTexture2DProc) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
822 typedef void (APIENTRY * glGetFramebufferAttachmentParameterivProc) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
823 typedef void (APIENTRY * glGenerateMipmapProc) (GLenum target);
828 #ifndef GL_ARB_shader_objects
829 #define GL_ARB_shader_objects 1
830 /* GL types for handling shader object handles and program/shader text */
831 typedef char GLcharARB; /* native character */
832 typedef unsigned int GLhandleARB; /* shader object handle */
834 #define GL_PROGRAM_OBJECT_ARB 0x8B40
835 #define GL_SHADER_OBJECT_ARB 0x8B48
836 #define GL_OBJECT_TYPE_ARB 0x8B4E
837 #define GL_OBJECT_SUBTYPE_ARB 0x8B4F
838 #define GL_FLOAT_VEC2_ARB 0x8B50
839 #define GL_FLOAT_VEC3_ARB 0x8B51
840 #define GL_FLOAT_VEC4_ARB 0x8B52
841 #define GL_INT_VEC2_ARB 0x8B53
842 #define GL_INT_VEC3_ARB 0x8B54
843 #define GL_INT_VEC4_ARB 0x8B55
844 #define GL_BOOL_ARB 0x8B56
845 #define GL_BOOL_VEC2_ARB 0x8B57
846 #define GL_BOOL_VEC3_ARB 0x8B58
847 #define GL_BOOL_VEC4_ARB 0x8B59
848 #define GL_FLOAT_MAT2_ARB 0x8B5A
849 #define GL_FLOAT_MAT3_ARB 0x8B5B
850 #define GL_FLOAT_MAT4_ARB 0x8B5C
851 #define GL_SAMPLER_1D_ARB 0x8B5D
852 #define GL_SAMPLER_2D_ARB 0x8B5E
853 #define GL_SAMPLER_3D_ARB 0x8B5F
854 #define GL_SAMPLER_CUBE_ARB 0x8B60
855 #define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
856 #define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
857 #define GL_SAMPLER_2D_RECT_ARB 0x8B63
858 #define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
859 #define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
860 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
861 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82
862 #define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
863 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
864 #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
865 #define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
866 #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
867 #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
870 typedef void (APIENTRY * glDeleteObjectProc) (GLhandleARB obj);
871 typedef GLhandleARB (APIENTRY * glGetHandleProc) (GLenum pname);
872 typedef void (APIENTRY * glDetachObjectProc) (GLhandleARB containerObj, GLhandleARB attachedObj);
873 typedef GLhandleARB (APIENTRY * glCreateShaderObjectProc) (GLenum shaderType);
874 typedef void (APIENTRY * glShaderSourceProc) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
875 typedef void (APIENTRY * glCompileShaderProc) (GLhandleARB shaderObj);
876 typedef GLhandleARB (APIENTRY * glCreateProgramObjectProc) (void);
877 typedef void (APIENTRY * glAttachObjectProc) (GLhandleARB containerObj, GLhandleARB obj);
878 typedef void (APIENTRY * glLinkProgramProc) (GLhandleARB programObj);
879 typedef void (APIENTRY * glUseProgramObjectProc) (GLhandleARB programObj);
880 typedef void (APIENTRY * glValidateProgramProc) (GLhandleARB programObj);
881 typedef void (APIENTRY * glUniform1fProc) (GLint location, GLfloat v0);
882 typedef void (APIENTRY * glUniform2fProc) (GLint location, GLfloat v0, GLfloat v1);
883 typedef void (APIENTRY * glUniform3fProc) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
884 typedef void (APIENTRY * glUniform4fProc) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
885 typedef void (APIENTRY * glUniform1iProc) (GLint location, GLint v0);
886 typedef void (APIENTRY * glUniform2iProc) (GLint location, GLint v0, GLint v1);
887 typedef void (APIENTRY * glUniform3iProc) (GLint location, GLint v0, GLint v1, GLint v2);
888 typedef void (APIENTRY * glUniform4iProc) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
889 typedef void (APIENTRY * glUniform1fvProc) (GLint location, GLsizei count, const GLfloat *value);
890 typedef void (APIENTRY * glUniform2fvProc) (GLint location, GLsizei count, const GLfloat *value);
891 typedef void (APIENTRY * glUniform3fvProc) (GLint location, GLsizei count, const GLfloat *value);
892 typedef void (APIENTRY * glUniform4fvProc) (GLint location, GLsizei count, const GLfloat *value);
893 typedef void (APIENTRY * glUniform1ivProc) (GLint location, GLsizei count, const GLint *value);
894 typedef void (APIENTRY * glUniform2ivProc) (GLint location, GLsizei count, const GLint *value);
895 typedef void (APIENTRY * glUniform3ivProc) (GLint location, GLsizei count, const GLint *value);
896 typedef void (APIENTRY * glUniform4ivProc) (GLint location, GLsizei count, const GLint *value);
897 typedef void (APIENTRY * glUniformMatrix2fvProc) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
898 typedef void (APIENTRY * glUniformMatrix3fvProc) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
899 typedef void (APIENTRY * glUniformMatrix4fvProc) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
900 typedef void (APIENTRY * glGetObjectParameterfvProc) (GLhandleARB obj, GLenum pname, GLfloat *params);
901 typedef void (APIENTRY * glGetObjectParameterivProc) (GLhandleARB obj, GLenum pname, GLint *params);
902 typedef void (APIENTRY * glGetInfoLogProc) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
903 typedef void (APIENTRY * glGetAttachedObjectsProc) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
904 typedef GLint (APIENTRY * glGetUniformLocationProc) (GLhandleARB programObj, const GLcharARB *name);
905 typedef void (APIENTRY * glGetActiveUniformProc) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
906 typedef void (APIENTRY * glGetUniformfvProc) (GLhandleARB programObj, GLint location, GLfloat *params);
907 typedef void (APIENTRY * glGetUniformivProc) (GLhandleARB programObj, GLint location, GLint *params);
908 typedef void (APIENTRY * glGetShaderSourceProc) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
913 #ifndef GL_ARB_vertex_shader
914 #define GL_ARB_vertex_shader 1
915 #define GL_VERTEX_SHADER_ARB 0x8B31
916 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
917 #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
918 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
919 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
920 #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
921 #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
924 typedef void (APIENTRY * glBindAttribLocationProc) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
925 typedef void (APIENTRY * glGetActiveAttribProc) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
926 typedef GLint (APIENTRY * glGetAttribLocationProc) (GLhandleARB programObj, const GLcharARB *name);
929 * ARB_fragment_shader
931 #ifndef GL_ARB_fragment_shader
932 #define GL_ARB_fragment_shader1
933 #define GL_FRAGMENT_SHADER_ARB 0x8B30
934 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
935 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
939 * NV_fragment_program
941 #ifndef GL_NV_fragment_program
942 #define GL_NV_fragment_program 1
943 #define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
944 #define GL_FRAGMENT_PROGRAM_NV 0x8870
945 #define GL_MAX_TEXTURE_COORDS_NV 0x8871
946 #define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
947 #define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
948 #define GL_PROGRAM_ERROR_STRING_NV 0x8874
950 #ifndef GL_NV_vertex_program
951 #define GL_NV_vertex_program 1
952 #define GL_VERTEX_PROGRAM_NV 0x8620
953 #define GL_PROGRAM_ERROR_POSITION_NV 0x864B
956 typedef void (APIENTRY * glBindProgramNVProc) (GLenum target, GLuint id);
957 typedef void (APIENTRY * glDeleteProgramsNVProc) (GLsizei n, const GLuint *programs);
958 typedef void (APIENTRY * glGenProgramsNVProc) (GLsizei n, GLuint *programs);
959 typedef void (APIENTRY * glLoadProgramNVProc) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
960 typedef void (APIENTRY * glProgramParameter4fvNVProc) (GLenum target, GLuint index, const GLfloat *v);
962 #if defined(__cplusplus)
967 #endif // !__SG_EXTENSIONS_HXX