]> git.mxchange.org Git - simgear.git/blob - simgear/screen/extensions.hxx
4cad70f176b50f15a56e5ba86a814281612b790a
[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     // static bool SGSearchExtensionsString(char *extString, 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
270
271 /* WGL spcific OpenGL extenstions */
272 #ifdef WIN32
273
274 /*
275  * ARB_pbuffer
276  */
277 #ifndef WGL_ARB_pbuffer
278 #define WGL_ARB_pbuffer 1
279 #define WGL_DRAW_TO_PBUFFER_ARB                                 0x202D
280 #define WGL_MAX_PBUFFER_PIXELS_ARB                              0x202E
281 #define WGL_MAX_PBUFFER_WIDTH_ARB                               0x202F
282 #define WGL_MAX_PBUFFER_HEIGHT_ARB                              0x2030
283 #define WGL_PBUFFER_LARGEST_ARB                                 0x2033
284 #define WGL_PBUFFER_WIDTH_ARB                                   0x2034
285 #define WGL_PBUFFER_HEIGHT_ARB                                  0x2035
286 #define WGL_PBUFFER_LOST_ARB                                    0x2036
287 DECLARE_HANDLE(HPBUFFERARB);
288 typedef HPBUFFERARB (APIENTRY * wglCreatePbufferARBProc) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
289 typedef HDC (APIENTRY * wglGetPbufferDCARBProc) (HPBUFFERARB hPbuffer);
290 typedef int (APIENTRY * wglReleasePbufferDCARBProc) (HPBUFFERARB hPbuffer, HDC hDC);
291 typedef BOOL (APIENTRY * wglDestroyPbufferARBProc) (HPBUFFERARB hPbuffer);
292 typedef BOOL (APIENTRY * wglQueryPbufferARBProc) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
293 #endif
294
295
296 /*
297  * ARB_pixel_format
298  */
299 #ifndef WGL_ARB_pixel_format
300 #define WGL_ARB_pixel_format 1
301 #define WGL_NUMBER_PIXEL_FORMATS_ARB                            0x2000
302 #define WGL_DRAW_TO_WINDOW_ARB                                  0x2001
303 #define WGL_DRAW_TO_BITMAP_ARB                                  0x2002
304 #define WGL_ACCELERATION_ARB                                    0x2003
305 #define WGL_NEED_PALETTE_ARB                                    0x2004
306 #define WGL_NEED_SYSTEM_PALETTE_ARB                             0x2005
307 #define WGL_SWAP_LAYER_BUFFERS_ARB                              0x2006
308 #define WGL_SWAP_METHOD_ARB                                     0x2007
309 #define WGL_NUMBER_OVERLAYS_ARB                                 0x2008
310 #define WGL_NUMBER_UNDERLAYS_ARB                                0x2009
311 #define WGL_TRANSPARENT_ARB                                     0x200A
312 #define WGL_SHARE_DEPTH_ARB                                     0x200C
313 #define WGL_SHARE_STENCIL_ARB                                   0x200D
314 #define WGL_SHARE_ACCUM_ARB                                     0x200E
315 #define WGL_SUPPORT_GDI_ARB                                     0x200F
316 #define WGL_SUPPORT_OPENGL_ARB                                  0x2010
317 #define WGL_DOUBLE_BUFFER_ARB                                   0x2011
318 #define WGL_STEREO_ARB                                          0x2012
319 #define WGL_PIXEL_TYPE_ARB                                      0x2013
320 #define WGL_COLOR_BITS_ARB                                      0x2014
321 #define WGL_RED_BITS_ARB                                        0x2015
322 #define WGL_RED_SHIFT_ARB                                       0x2016
323 #define WGL_GREEN_BITS_ARB                                      0x2017
324 #define WGL_GREEN_SHIFT_ARB                                     0x2018
325 #define WGL_BLUE_BITS_ARB                                       0x2019
326 #define WGL_BLUE_SHIFT_ARB                                      0x201A
327 #define WGL_ALPHA_BITS_ARB                                      0x201B
328 #define WGL_ALPHA_SHIFT_ARB                                     0x201C
329 #define WGL_ACCUM_BITS_ARB                                      0x201D
330 #define WGL_ACCUM_RED_BITS_ARB                                  0x201E
331 #define WGL_ACCUM_GREEN_BITS_ARB                                0x201F
332 #define WGL_ACCUM_BLUE_BITS_ARB                                 0x2020
333 #define WGL_ACCUM_ALPHA_BITS_ARB                                0x2021
334 #define WGL_DEPTH_BITS_ARB                                      0x2022
335 #define WGL_STENCIL_BITS_ARB                                    0x2023
336 #define WGL_AUX_BUFFERS_ARB                                     0x2024
337 #define WGL_NO_ACCELERATION_ARB                                 0x2025
338 #define WGL_GENERIC_ACCELERATION_ARB                            0x2026
339 #define WGL_FULL_ACCELERATION_ARB                               0x2027
340 #define WGL_SWAP_EXCHANGE_ARB                                   0x2028
341 #define WGL_SWAP_COPY_ARB                                       0x2029
342 #define WGL_SWAP_UNDEFINED_ARB                                  0x202A
343 #define WGL_TYPE_RGBA_ARB                                       0x202B
344 #define WGL_TYPE_COLORINDEX_ARB                                 0x202C
345 #define WGL_TRANSPARENT_RED_VALUE_ARB                           0x2037
346 #define WGL_TRANSPARENT_GREEN_VALUE_ARB                         0x2038
347 #define WGL_TRANSPARENT_BLUE_VALUE_ARB                          0x2039
348 #define WGL_TRANSPARENT_ALPHA_VALUE_ARB                         0x203A
349 #define WGL_TRANSPARENT_INDEX_VALUE_ARB                         0x203B
350 typedef BOOL (APIENTRY * wglGetPixelFormatAttribivARBProc) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
351 typedef BOOL (APIENTRY * wglGetPixelFormatAttribfvARBProc) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
352 typedef BOOL (APIENTRY * wglChoosePixelFormatARBProc) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
353 #endif
354
355 /*
356  * ARB_render_texture
357  */
358 #ifndef WGL_ARB_render_texture
359 #define WGL_ARB_render_texture 1
360
361 #define WGL_BIND_TO_TEXTURE_RGB_ARB                             0x2070
362 #define WGL_BIND_TO_TEXTURE_RGBA_ARB                            0x2071
363 #define WGL_TEXTURE_FORMAT_ARB                                  0x2072
364 #define WGL_TEXTURE_TARGET_ARB                                  0x2073
365 #define WGL_MIPMAP_TEXTURE_ARB                                  0x2074
366 #define WGL_TEXTURE_RGB_ARB                                     0x2075
367 #define WGL_TEXTURE_RGBA_ARB                                    0x2076
368 #define WGL_NO_TEXTURE_ARB                                      0x2077
369 #define WGL_TEXTURE_CUBE_MAP_ARB                                0x2078
370 #define WGL_TEXTURE_1D_ARB                                      0x2079
371 #define WGL_TEXTURE_2D_ARB                                      0x207A
372 #define WGL_NO_TEXTURE_ARB                                      0x2077
373 #define WGL_MIPMAP_LEVEL_ARB                                    0x207B
374 #define WGL_CUBE_MAP_FACE_ARB                                   0x207C
375 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB                     0x207D
376 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB                     0x207E
377 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB                     0x207F
378 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB                     0x2080
379 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB                     0x2081
380 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB                     0x2082
381 #define WGL_FRONT_LEFT_ARB                                      0x2083
382 #define WGL_FRONT_RIGHT_ARB                                     0x2084
383 #define WGL_BACK_LEFT_ARB                                       0x2085
384 #define WGL_BACK_RIGHT_ARB                                      0x2086
385 #define WGL_AUX0_ARB                                            0x2087
386 #define WGL_AUX1_ARB                                            0x2088
387 #define WGL_AUX2_ARB                                            0x2089
388 #define WGL_AUX3_ARB                                            0x208A
389 #define WGL_AUX4_ARB                                            0x208B
390 #define WGL_AUX5_ARB                                            0x208C
391 #define WGL_AUX6_ARB                                            0x208D
392 #define WGL_AUX7_ARB                                            0x208E
393 #define WGL_AUX8_ARB                                            0x208F
394 #define WGL_AUX9_ARB                                            0x2090
395 typedef BOOL (APIENTRY * wglBindTexImageARBProc) (HPBUFFERARB hPbuffer, int iBuffer);
396 typedef BOOL (APIENTRY * wglReleaseTexImageARBProc) (HPBUFFERARB hPbuffer, int iBuffer);
397 typedef BOOL (APIENTRY * wglSetPbufferAttribARBProc) (HPBUFFERARB hPbuffer, const int *piAttribList);
398 #endif
399
400 #endif /* WIN32 */
401
402
403 /* NVIDIA specific extension */
404
405 /*
406  * NV_texture_rectangle
407  */
408
409 #ifndef GL_NV_texture_rectangle
410 #define GL_NV_texture_rectangle 1
411 #define GL_TEXTURE_RECTANGLE_NV                                 0x84F5
412 #define GL_TEXTURE_BINDING_RECTANGLE_NV                         0x84F6
413 #define GL_PROXY_TEXTURE_RECTANGLE_NV                           0x84F7
414 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV                        0x84F8
415 #endif
416
417 /*
418  * WGL_NV_texture_rectangle
419  */
420
421 #ifndef WGL_NV_texture_rectangle
422 #define WGL_NV_texture_rectangle 1
423 #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV                    0x20A0
424 #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV                   0x20A1
425 #define WGL_TEXTURE_RECTANGLE_NV                                0x20A2
426 #endif
427
428 /*
429  * NV_render_depth_texture
430  */
431
432 #ifndef WGL_NV_render_depth_texture
433 #define WGL_NV_render_depth_texture 1
434 #define WGL_NO_TEXTURE_ARB                                      0x2077
435 #define WGL_BIND_TO_TEXTURE_DEPTH_NV                            0x20A3
436 #define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV                  0x20A4
437 #define WGL_DEPTH_TEXTURE_FORMAT_NV                             0x20A5
438 #define WGL_TEXTURE_DEPTH_COMPONENT_NV                          0x20A6
439 #define WGL_DEPTH_COMPONENT_NV                                  0x20A7
440 #endif
441
442 /*
443  * NV_float_buffer
444  */
445 #ifndef GL_NV_float_buffer
446 #define GL_NV_float_buffer 1
447 #define GL_FLOAT_R_NV                                           0x8880
448 #define GL_FLOAT_RG_NV                                          0x8881
449 #define GL_FLOAT_RGB_NV                                         0x8882
450 #define GL_FLOAT_RGBA_NV                                        0x8883
451 #define GL_FLOAT_R16_NV                                         0x8884
452 #define GL_FLOAT_R32_NV                                         0x8885
453 #define GL_FLOAT_RG16_NV                                        0x8886
454 #define GL_FLOAT_RG32_NV                                        0x8887
455 #define GL_FLOAT_RGB16_NV                                       0x8888
456 #define GL_FLOAT_RGB32_NV                                       0x8889
457 #define GL_FLOAT_RGBA16_NV                                      0x888A
458 #define GL_FLOAT_RGBA32_NV                                      0x888B
459 #define GL_TEXTURE_FLOAT_COMPONENTS_NV                          0x888C
460 #define GL_FLOAT_CLEAR_COLOR_VALUE_NV                           0x888D
461 #define GL_FLOAT_RGBA_MODE_NV                                   0x888E
462 #endif
463 #ifndef GLX_NV_float_buffer
464 #define GLX_NV_float_buffer 1
465 #define GLX_FLOAT_COMPONENTS_NV                                 0x20B0
466 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV                0x20B1
467 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV               0x20B2
468 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV              0x20B3
469 #define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV             0x20B4
470 #define GLX_TEXTURE_FLOAT_R_NV                                  0x20B5
471 #define GLX_TEXTURE_FLOAT_RG_NV                                 0x20B6
472 #define GLX_TEXTURE_FLOAT_RGB_NV                                0x20B7
473 #define GLX_TEXTURE_FLOAT_RGBA_NV                               0x20B8
474 #endif
475 #ifndef WGL_NV_float_buffer
476 #define WGL_NV_float_buffer 1
477 #define WGL_FLOAT_COMPONENTS_NV                                 0x20B0
478 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV                0x20B1
479 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV               0x20B2
480 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV              0x20B3
481 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV             0x20B4
482 #define WGL_TEXTURE_FLOAT_R_NV                                  0x20B5
483 #define WGL_TEXTURE_FLOAT_RG_NV                                 0x20B6
484 #define WGL_TEXTURE_FLOAT_RGB_NV                                0x20B7
485 #define WGL_TEXTURE_FLOAT_RGBA_NV                               0x20B8
486 #endif
487
488
489 /* ATI specific extension */
490
491 /*
492  * ATI_pixel_format_float
493  */
494 #ifndef WGL_ATI_pixel_format_float
495 #define WGL_ATI_pixel_format_float 1
496 #define WGL_TYPE_RGBA_FLOAT_ATI                                 0x21A0
497 #define GL_RGBA_FLOAT_MODE_ATI                                  0x8820
498 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI                      0x8835
499 #endif
500
501 /*
502  * ATI_texture_float
503  */
504 #ifndef GL_ATI_texture_float
505 #define GL_ATI_texture_float 1
506 #define GL_RGBA_FLOAT32_ATI                                     0x8814
507 #define GL_RGB_FLOAT32_ATI                                      0x8815
508 #define GL_ALPHA_FLOAT32_ATI                                    0x8816
509 #define GL_INTENSITY_FLOAT32_ATI                                0x8817
510 #define GL_LUMINANCE_FLOAT32_ATI                                0x8818
511 #define GL_LUMINANCE_ALPHA_FLOAT32_ATI                          0x8819
512 #define GL_RGBA_FLOAT16_ATI                                     0x881A
513 #define GL_RGB_FLOAT16_ATI                                      0x881B
514 #define GL_ALPHA_FLOAT16_ATI                                    0x881C
515 #define GL_INTENSITY_FLOAT16_ATI                                0x881D
516 #define GL_LUMINANCE_FLOAT16_ATI                                0x881E
517 #define GL_LUMINANCE_ALPHA_FLOAT16_ATI                          0x881F
518 #endif
519
520
521 #if defined(__cplusplus)
522 }
523 #endif
524
525 #endif // !__SG_EXTENSIONS_HXX
526