]> git.mxchange.org Git - simgear.git/blob - simgear/screen/extensions.hxx
MSVC fix.
[simgear.git] / simgear / screen / extensions.hxx
1 /*
2  *
3  * Copyright (c) 2001 César Blecua Udías    All Rights Reserved.
4  *
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:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Software.
14  *
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
21  * SOFTWARE.
22  *
23  */
24 #ifndef __SG_EXTENSIONS_HXX
25 #define __SG_EXTENSIONS_HXX 1
26
27 #if defined(__CYGWIN__) && !defined(WIN32) /* && !defined(USING_X) */
28 #define WIN32
29 #endif
30
31 #if defined(WIN32)  /* MINGW and MSC predefine WIN32 */
32 # include <windows.h>
33 #endif
34
35 #if !defined(WIN32)
36 # include <dlfcn.h>
37 #endif
38
39 #include <simgear/compiler.h>
40
41 #include SG_GL_H
42
43
44 #if defined(__cplusplus)
45 extern "C" {
46 #endif
47
48 #ifndef APIENTRY
49 #define APIENTRY
50 #endif
51
52 bool SGSearchExtensionsString(const char *extString, const char *extName);
53 bool SGIsOpenGLExtensionSupported(char *extName);
54
55 #ifdef __APPLE__
56   // don't use an inline function for symbol lookup, since it is too big
57   void* macosxGetGLProcAddress(const char *func);
58
59 #elif !defined( WIN32 )
60
61   void *SGGetGLProcAddress(const char *func);
62   
63 #endif
64
65 inline void (*SGLookupFunction(const char *func))()
66 {
67 #if defined( WIN32 )
68     return (void (*)()) wglGetProcAddress(func);
69
70 #elif defined( __APPLE__ )
71     return (void (*)()) macosxGetGLProcAddress(func);
72
73 #else // UNIX
74
75     return (void (*)()) SGGetGLProcAddress(func);
76 #endif
77 }
78
79 /*
80  * OpenGL 1.2 and 1.3 enumerants
81  */
82
83 #ifndef GL_VERSION_1_2
84 #define GL_CLAMP_TO_EDGE                                        0x812F
85 #define GL_TEXTURE_WRAP_R                                       0x8072
86 #define GL_BLEND_EQUATION                                       0x8009
87 #define GL_MIN                                                  0x8007
88 #define GL_MAX                                                  0x8008
89 #define GL_FUNC_ADD                                             0x8006
90 #define GL_FUNC_SUBTRACT                                        0x800A
91 #define GL_FUNC_REVERSE_SUBTRACT                                0x800B
92 #define GL_BLEND_COLOR                                          0x8005
93 #define GL_CONSTANT_COLOR                                       0x8001
94 #define GL_ONE_MINUS_CONSTANT_COLOR                             0x8002
95 #define GL_CONSTANT_ALPHA                                       0x8003
96 #define GL_ONE_MINUS_CONSTANT_ALPHA                             0x8004
97 #endif
98
99 typedef void (APIENTRY * glBlendEquationProc) (GLenum mode );
100 typedef void (APIENTRY * glBlendColorProc) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
101
102
103 /* OpenGL extension declarations */
104
105 /*
106  * glPointParameterf and glPointParameterfv
107  */
108 #ifndef GL_EXT_point_parameters
109 #define GL_EXT_point_parameters 1
110 #define GL_POINT_SIZE_MIN_EXT                                   0x8126
111 #define GL_DISTANCE_ATTENUATION_EXT                             0x8129
112 #endif
113
114 #ifndef GL_ARB_point_parameters
115 #define GL_ARB_point_parameters 1
116 #define GL_POINT_SIZE_MIN_ARB                                   0x8126
117 #define GL_DISTANCE_ATTENUATION_ARB                             0x8129
118 #endif
119
120 typedef void (APIENTRY * glPointParameterfProc)(GLenum pname, GLfloat param);
121 typedef void (APIENTRY * glPointParameterfvProc)(GLenum pname, const GLfloat *params);
122
123 /*
124  * glActiveTextureARB
125  */
126
127 #ifndef GL_ARB_multitexture
128 #define GL_ARB_multitexture 1
129 #define GL_TEXTURE0_ARB                                         0x84C0
130 #define GL_TEXTURE1_ARB                                         0x84C1
131 #define GL_TEXTURE2_ARB                                         0x84C2
132 #define GL_TEXTURE3_ARB                                         0x84C3
133 #define GL_TEXTURE4_ARB                                         0x84C4
134 #define GL_TEXTURE5_ARB                                         0x84C5
135 #define GL_TEXTURE6_ARB                                         0x84C6
136 #define GL_TEXTURE7_ARB                                         0x84C7
137 #define GL_TEXTURE8_ARB                                         0x84C8
138 #define GL_TEXTURE9_ARB                                         0x84C9
139 #define GL_TEXTURE10_ARB                                        0x84CA
140 #define GL_TEXTURE11_ARB                                        0x84CB
141 #define GL_TEXTURE12_ARB                                        0x84CC
142 #define GL_TEXTURE13_ARB                                        0x84CD
143 #define GL_TEXTURE14_ARB                                        0x84CE
144 #define GL_TEXTURE15_ARB                                        0x84CF
145 #define GL_TEXTURE16_ARB                                        0x84D0
146 #define GL_TEXTURE17_ARB                                        0x84D1
147 #define GL_TEXTURE18_ARB                                        0x84D2
148 #define GL_TEXTURE19_ARB                                        0x84D3
149 #define GL_TEXTURE20_ARB                                        0x84D4
150 #define GL_TEXTURE21_ARB                                        0x84D5
151 #define GL_TEXTURE22_ARB                                        0x84D6
152 #define GL_TEXTURE23_ARB                                        0x84D7
153 #define GL_TEXTURE24_ARB                                        0x84D8
154 #define GL_TEXTURE25_ARB                                        0x84D9
155 #define GL_TEXTURE26_ARB                                        0x84DA
156 #define GL_TEXTURE27_ARB                                        0x84DB
157 #define GL_TEXTURE28_ARB                                        0x84DC
158 #define GL_TEXTURE29_ARB                                        0x84DD
159 #define GL_TEXTURE30_ARB                                        0x84DE
160 #define GL_TEXTURE31_ARB                                        0x84DF
161 #define GL_ACTIVE_TEXTURE_ARB                                   0x84E0
162 #define GL_CLIENT_ACTIVE_TEXTURE_ARB                            0x84E1
163 #define GL_MAX_TEXTURE_UNITS_ARB                                0x84E2
164 #endif
165
166 typedef void (APIENTRY * glActiveTextureProc)(GLenum texture);
167 typedef void (APIENTRY * glClientActiveTextureProc)(GLenum texture);
168
169 /*
170  * GL_EXT_separate_specular_color
171  */
172
173 #ifndef GL_LIGHT_MODEL_COLOR_CONTROL
174 #define GL_LIGHT_MODEL_COLOR_CONTROL                            0x81F8
175 #define GL_SINGLE_COLOR                                         0x81F9
176 #define GL_SEPARATE_SPECULAR_COLOR                              0x81FA
177 #endif
178
179 /*
180  * GL_ARB_texture_cube_map
181  */
182
183 #ifndef GL_ARB_texture_cube_map
184 #define GL_ARB_texture_cube_map 1
185 #define GL_NORMAL_MAP_ARB                                       0x8511
186 #define GL_REFLECTION_MAP_ARB                                   0x8512
187 #define GL_TEXTURE_CUBE_MAP_ARB                                 0x8513
188 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB                         0x8514
189 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB                      0x8515
190 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB                      0x8516
191 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB                      0x8517
192 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB                      0x8518
193 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB                      0x8519
194 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB                      0x851A
195 #define GL_PROXY_TEXTURE_CUBE_MAP_ARB                           0x851B
196 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB                        0x851C
197 #endif
198
199 /*
200  * GL_ARB_texture_env_combine
201  */
202
203 #ifndef GL_ARB_texture_env_combine
204 #define GL_ARB_texture_env_combine 1
205 #define GL_COMBINE_ARB                                          0x8570
206 #define GL_COMBINE_RGB_ARB                                      0x8571
207 #define GL_COMBINE_ALPHA_ARB                                    0x8572
208 #define GL_RGB_SCALE_ARB                                        0x8573
209 #define GL_ADD_SIGNED_ARB                                       0x8574
210 #define GL_INTERPOLATE_ARB                                      0x8575
211 #define GL_CONSTANT_ARB                                         0x8576
212 #define GL_PRIMARY_COLOR_ARB                                    0x8577
213 #define GL_PREVIOUS_ARB                                         0x8578
214 #define GL_SOURCE0_RGB_ARB                                      0x8580
215 #define GL_SOURCE1_RGB_ARB                                      0x8581
216 #define GL_SOURCE2_RGB_ARB                                      0x8582
217 #define GL_SOURCE0_ALPHA_ARB                                    0x8588
218 #define GL_SOURCE1_ALPHA_ARB                                    0x8589
219 #define GL_SOURCE2_ALPHA_ARB                                    0x858A
220 #define GL_OPERAND0_RGB_ARB                                     0x8590
221 #define GL_OPERAND1_RGB_ARB                                     0x8591
222 #define GL_OPERAND2_RGB_ARB                                     0x8592
223 #define GL_OPERAND0_ALPHA_ARB                                   0x8598
224 #define GL_OPERAND1_ALPHA_ARB                                   0x8599
225 #define GL_OPERAND2_ALPHA_ARB                                   0x859A
226 #endif
227
228 /*
229  * GL_ARB_texture_env_dot3
230  */
231
232 #ifndef GL_ARB_texture_env_dot3
233 #define GL_ARB_texture_env_dot3 1
234 #define GL_DOT3_RGB_ARB                                         0x86AE
235 #define GL_DOT3_RGBA_ARB                                        0x86AF
236 #endif
237
238 /*
239  * ARB_depth_texture
240  */
241 #ifndef GL_ARB_depth_texture
242 #define GL_ARB_depth_texture 1
243 #define GL_DEPTH_COMPONENT16_ARB                                0x81A5
244 #define GL_DEPTH_COMPONENT24_ARB                                0x81A6
245 #define GL_DEPTH_COMPONENT32_ARB                                0x81A7
246 #define GL_TEXTURE_DEPTH_SIZE_ARB                               0x884A
247 #define GL_DEPTH_TEXTURE_MODE_ARB                               0x884B
248 #endif
249
250 /*
251  * ARB_multisample
252  */
253 #ifndef GL_ARB_multisample
254 #define GL_ARB_multisample 1
255 #define GL_MULTISAMPLE_ARB                                      0x809D
256 #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB                         0x809E
257 #define GL_SAMPLE_ALPHA_TO_ONE_ARB                              0x809F
258 #define GL_SAMPLE_COVERAGE_ARB                                  0x80A0
259 #define GL_SAMPLE_BUFFERS_ARB                                   0x80A8
260 #define GL_SAMPLES_ARB                                          0x80A9
261 #define GL_SAMPLE_COVERAGE_VALUE_ARB                            0x80AA
262 #define GL_SAMPLE_COVERAGE_INVERT_ARB                           0x80AB
263 #define GL_MULTISAMPLE_BIT_ARB                                  0x20000000
264 #define WGL_SAMPLE_BUFFERS_ARB                                  0x2041
265 #define WGL_SAMPLES_ARB                                         0x2042
266
267 #endif
268
269 #ifndef GL_SGIS_generate_mipmap
270 #define GL_SGIS_generate_mipmap 1
271 #define GL_GENERATE_MIPMAP_SGIS                                 0x8191
272 #define GL_GENERATE_MIPMAP_HINT_SGIS                            0x8192
273 #endif
274
275 /* WGL spcific OpenGL extenstions */
276 #ifdef WIN32
277
278 /*
279  * WGL_ARB_extensions_string
280  */
281 #ifndef WGL_ARB_extensions_string
282 #define WGL_ARB_extensions_string 1
283 typedef const char * (APIENTRY * wglGetExtensionsStringARBProc) (HDC hDC);
284 #endif
285
286 /*
287  * WGL_ARB_pbuffer
288  */
289 #ifndef WGL_ARB_pbuffer
290 #define WGL_ARB_pbuffer 1
291 #define WGL_DRAW_TO_PBUFFER_ARB                                 0x202D
292 #define WGL_MAX_PBUFFER_PIXELS_ARB                              0x202E
293 #define WGL_MAX_PBUFFER_WIDTH_ARB                               0x202F
294 #define WGL_MAX_PBUFFER_HEIGHT_ARB                              0x2030
295 #define WGL_PBUFFER_LARGEST_ARB                                 0x2033
296 #define WGL_PBUFFER_WIDTH_ARB                                   0x2034
297 #define WGL_PBUFFER_HEIGHT_ARB                                  0x2035
298 #define WGL_PBUFFER_LOST_ARB                                    0x2036
299 DECLARE_HANDLE(HPBUFFERARB);
300 typedef HPBUFFERARB (APIENTRY * wglCreatePbufferARBProc) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
301 typedef HDC (APIENTRY * wglGetPbufferDCARBProc) (HPBUFFERARB hPbuffer);
302 typedef int (APIENTRY * wglReleasePbufferDCARBProc) (HPBUFFERARB hPbuffer, HDC hDC);
303 typedef BOOL (APIENTRY * wglDestroyPbufferARBProc) (HPBUFFERARB hPbuffer);
304 typedef BOOL (APIENTRY * wglQueryPbufferARBProc) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
305 #endif
306
307
308 /*
309  * ARB_pixel_format
310  */
311 #ifndef WGL_ARB_pixel_format
312 #define WGL_ARB_pixel_format 1
313 #define WGL_NUMBER_PIXEL_FORMATS_ARB                            0x2000
314 #define WGL_DRAW_TO_WINDOW_ARB                                  0x2001
315 #define WGL_DRAW_TO_BITMAP_ARB                                  0x2002
316 #define WGL_ACCELERATION_ARB                                    0x2003
317 #define WGL_NEED_PALETTE_ARB                                    0x2004
318 #define WGL_NEED_SYSTEM_PALETTE_ARB                             0x2005
319 #define WGL_SWAP_LAYER_BUFFERS_ARB                              0x2006
320 #define WGL_SWAP_METHOD_ARB                                     0x2007
321 #define WGL_NUMBER_OVERLAYS_ARB                                 0x2008
322 #define WGL_NUMBER_UNDERLAYS_ARB                                0x2009
323 #define WGL_TRANSPARENT_ARB                                     0x200A
324 #define WGL_SHARE_DEPTH_ARB                                     0x200C
325 #define WGL_SHARE_STENCIL_ARB                                   0x200D
326 #define WGL_SHARE_ACCUM_ARB                                     0x200E
327 #define WGL_SUPPORT_GDI_ARB                                     0x200F
328 #define WGL_SUPPORT_OPENGL_ARB                                  0x2010
329 #define WGL_DOUBLE_BUFFER_ARB                                   0x2011
330 #define WGL_STEREO_ARB                                          0x2012
331 #define WGL_PIXEL_TYPE_ARB                                      0x2013
332 #define WGL_COLOR_BITS_ARB                                      0x2014
333 #define WGL_RED_BITS_ARB                                        0x2015
334 #define WGL_RED_SHIFT_ARB                                       0x2016
335 #define WGL_GREEN_BITS_ARB                                      0x2017
336 #define WGL_GREEN_SHIFT_ARB                                     0x2018
337 #define WGL_BLUE_BITS_ARB                                       0x2019
338 #define WGL_BLUE_SHIFT_ARB                                      0x201A
339 #define WGL_ALPHA_BITS_ARB                                      0x201B
340 #define WGL_ALPHA_SHIFT_ARB                                     0x201C
341 #define WGL_ACCUM_BITS_ARB                                      0x201D
342 #define WGL_ACCUM_RED_BITS_ARB                                  0x201E
343 #define WGL_ACCUM_GREEN_BITS_ARB                                0x201F
344 #define WGL_ACCUM_BLUE_BITS_ARB                                 0x2020
345 #define WGL_ACCUM_ALPHA_BITS_ARB                                0x2021
346 #define WGL_DEPTH_BITS_ARB                                      0x2022
347 #define WGL_STENCIL_BITS_ARB                                    0x2023
348 #define WGL_AUX_BUFFERS_ARB                                     0x2024
349 #define WGL_NO_ACCELERATION_ARB                                 0x2025
350 #define WGL_GENERIC_ACCELERATION_ARB                            0x2026
351 #define WGL_FULL_ACCELERATION_ARB                               0x2027
352 #define WGL_SWAP_EXCHANGE_ARB                                   0x2028
353 #define WGL_SWAP_COPY_ARB                                       0x2029
354 #define WGL_SWAP_UNDEFINED_ARB                                  0x202A
355 #define WGL_TYPE_RGBA_ARB                                       0x202B
356 #define WGL_TYPE_COLORINDEX_ARB                                 0x202C
357 #define WGL_TRANSPARENT_RED_VALUE_ARB                           0x2037
358 #define WGL_TRANSPARENT_GREEN_VALUE_ARB                         0x2038
359 #define WGL_TRANSPARENT_BLUE_VALUE_ARB                          0x2039
360 #define WGL_TRANSPARENT_ALPHA_VALUE_ARB                         0x203A
361 #define WGL_TRANSPARENT_INDEX_VALUE_ARB                         0x203B
362 typedef BOOL (APIENTRY * wglGetPixelFormatAttribivARBProc) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
363 typedef BOOL (APIENTRY * wglGetPixelFormatAttribfvARBProc) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
364 typedef BOOL (APIENTRY * wglChoosePixelFormatARBProc) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
365 #endif
366
367 /*
368  * ARB_render_texture
369  */
370 #ifndef WGL_ARB_render_texture
371 #define WGL_ARB_render_texture 1
372
373 #define WGL_BIND_TO_TEXTURE_RGB_ARB                             0x2070
374 #define WGL_BIND_TO_TEXTURE_RGBA_ARB                            0x2071
375 #define WGL_TEXTURE_FORMAT_ARB                                  0x2072
376 #define WGL_TEXTURE_TARGET_ARB                                  0x2073
377 #define WGL_MIPMAP_TEXTURE_ARB                                  0x2074
378 #define WGL_TEXTURE_RGB_ARB                                     0x2075
379 #define WGL_TEXTURE_RGBA_ARB                                    0x2076
380 #define WGL_NO_TEXTURE_ARB                                      0x2077
381 #define WGL_TEXTURE_CUBE_MAP_ARB                                0x2078
382 #define WGL_TEXTURE_1D_ARB                                      0x2079
383 #define WGL_TEXTURE_2D_ARB                                      0x207A
384 #define WGL_NO_TEXTURE_ARB                                      0x2077
385 #define WGL_MIPMAP_LEVEL_ARB                                    0x207B
386 #define WGL_CUBE_MAP_FACE_ARB                                   0x207C
387 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB                     0x207D
388 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB                     0x207E
389 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB                     0x207F
390 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB                     0x2080
391 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB                     0x2081
392 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB                     0x2082
393 #define WGL_FRONT_LEFT_ARB                                      0x2083
394 #define WGL_FRONT_RIGHT_ARB                                     0x2084
395 #define WGL_BACK_LEFT_ARB                                       0x2085
396 #define WGL_BACK_RIGHT_ARB                                      0x2086
397 #define WGL_AUX0_ARB                                            0x2087
398 #define WGL_AUX1_ARB                                            0x2088
399 #define WGL_AUX2_ARB                                            0x2089
400 #define WGL_AUX3_ARB                                            0x208A
401 #define WGL_AUX4_ARB                                            0x208B
402 #define WGL_AUX5_ARB                                            0x208C
403 #define WGL_AUX6_ARB                                            0x208D
404 #define WGL_AUX7_ARB                                            0x208E
405 #define WGL_AUX8_ARB                                            0x208F
406 #define WGL_AUX9_ARB                                            0x2090
407 typedef BOOL (APIENTRY * wglBindTexImageARBProc) (HPBUFFERARB hPbuffer, int iBuffer);
408 typedef BOOL (APIENTRY * wglReleaseTexImageARBProc) (HPBUFFERARB hPbuffer, int iBuffer);
409 typedef BOOL (APIENTRY * wglSetPbufferAttribARBProc) (HPBUFFERARB hPbuffer, const int *piAttribList);
410 #endif
411
412 #endif /* WIN32 */
413
414
415 /* NVIDIA specific extension */
416
417 /*
418  * NV_texture_rectangle
419  */
420
421 #ifndef GL_NV_texture_rectangle
422 #define GL_NV_texture_rectangle 1
423 #define GL_TEXTURE_RECTANGLE_NV                                 0x84F5
424 #define GL_TEXTURE_BINDING_RECTANGLE_NV                         0x84F6
425 #define GL_PROXY_TEXTURE_RECTANGLE_NV                           0x84F7
426 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV                        0x84F8
427 #endif
428
429 /*
430  * WGL_NV_texture_rectangle
431  */
432
433 #ifndef WGL_NV_texture_rectangle
434 #define WGL_NV_texture_rectangle 1
435 #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV                    0x20A0
436 #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV                   0x20A1
437 #define WGL_TEXTURE_RECTANGLE_NV                                0x20A2
438 #endif
439
440 /*
441  * NV_render_depth_texture
442  */
443
444 #ifndef WGL_NV_render_depth_texture
445 #define WGL_NV_render_depth_texture 1
446 #define WGL_NO_TEXTURE_ARB                                      0x2077
447 #define WGL_BIND_TO_TEXTURE_DEPTH_NV                            0x20A3
448 #define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV                  0x20A4
449 #define WGL_DEPTH_TEXTURE_FORMAT_NV                             0x20A5
450 #define WGL_TEXTURE_DEPTH_COMPONENT_NV                          0x20A6
451 #define WGL_DEPTH_COMPONENT_NV                                  0x20A7
452 #endif
453
454 /*
455  * NV_float_buffer
456  */
457 #ifndef GL_NV_float_buffer
458 #define GL_NV_float_buffer 1
459 #define GL_FLOAT_R_NV                                           0x8880
460 #define GL_FLOAT_RG_NV                                          0x8881
461 #define GL_FLOAT_RGB_NV                                         0x8882
462 #define GL_FLOAT_RGBA_NV                                        0x8883
463 #define GL_FLOAT_R16_NV                                         0x8884
464 #define GL_FLOAT_R32_NV                                         0x8885
465 #define GL_FLOAT_RG16_NV                                        0x8886
466 #define GL_FLOAT_RG32_NV                                        0x8887
467 #define GL_FLOAT_RGB16_NV                                       0x8888
468 #define GL_FLOAT_RGB32_NV                                       0x8889
469 #define GL_FLOAT_RGBA16_NV                                      0x888A
470 #define GL_FLOAT_RGBA32_NV                                      0x888B
471 #define GL_TEXTURE_FLOAT_COMPONENTS_NV                          0x888C
472 #define GL_FLOAT_CLEAR_COLOR_VALUE_NV                           0x888D
473 #define GL_FLOAT_RGBA_MODE_NV                                   0x888E
474 #endif
475 #ifndef GLX_NV_float_buffer
476 #define GLX_NV_float_buffer 1
477 #define GLX_FLOAT_COMPONENTS_NV                                 0x20B0
478 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV                0x20B1
479 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV               0x20B2
480 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV              0x20B3
481 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV             0x20B4
482 #define GLX_TEXTURE_FLOAT_R_NV                                  0x20B5
483 #define GLX_TEXTURE_FLOAT_RG_NV                                 0x20B6
484 #define GLX_TEXTURE_FLOAT_RGB_NV                                0x20B7
485 #define GLX_TEXTURE_FLOAT_RGBA_NV                               0x20B8
486 #endif
487 #ifndef WGL_NV_float_buffer
488 #define WGL_NV_float_buffer 1
489 #define WGL_FLOAT_COMPONENTS_NV                                 0x20B0
490 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV                0x20B1
491 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV               0x20B2
492 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV              0x20B3
493 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV             0x20B4
494 #define WGL_TEXTURE_FLOAT_R_NV                                  0x20B5
495 #define WGL_TEXTURE_FLOAT_RG_NV                                 0x20B6
496 #define WGL_TEXTURE_FLOAT_RGB_NV                                0x20B7
497 #define WGL_TEXTURE_FLOAT_RGBA_NV                               0x20B8
498 #endif
499
500
501 /* ATI specific extension */
502
503 /*
504  * ATI_pixel_format_float
505  */
506 #ifndef WGL_ATI_pixel_format_float
507 #define WGL_ATI_pixel_format_float 1
508 #define WGL_TYPE_RGBA_FLOAT_ATI                                 0x21A0
509 #define GL_RGBA_FLOAT_MODE_ATI                                  0x8820
510 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI                      0x8835
511 #endif
512
513 /*
514  * ATI_texture_float
515  */
516 #ifndef GL_ATI_texture_float
517 #define GL_ATI_texture_float 1
518 #define GL_RGBA_FLOAT32_ATI                                     0x8814
519 #define GL_RGB_FLOAT32_ATI                                      0x8815
520 #define GL_ALPHA_FLOAT32_ATI                                    0x8816
521 #define GL_INTENSITY_FLOAT32_ATI                                0x8817
522 #define GL_LUMINANCE_FLOAT32_ATI                                0x8818
523 #define GL_LUMINANCE_ALPHA_FLOAT32_ATI                          0x8819
524 #define GL_RGBA_FLOAT16_ATI                                     0x881A
525 #define GL_RGB_FLOAT16_ATI                                      0x881B
526 #define GL_ALPHA_FLOAT16_ATI                                    0x881C
527 #define GL_INTENSITY_FLOAT16_ATI                                0x881D
528 #define GL_LUMINANCE_FLOAT16_ATI                                0x881E
529 #define GL_LUMINANCE_ALPHA_FLOAT16_ATI                          0x881F
530 #endif
531
532
533 #if defined(__cplusplus)
534 }
535 #endif
536
537 #endif // !__SG_EXTENSIONS_HXX
538