/[pcsx2_0.9.7]/trunk/3rdparty/GL/glxew.h
ViewVC logotype

Annotation of /trunk/3rdparty/GL/glxew.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (hide annotations) (download)
Mon Sep 6 11:19:43 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 59638 byte(s)
Exported ./upsream/trunk @r3730 from http://pcsx2.googlecode.com/svn/trunk/
1 william 8 /*
2     ** The OpenGL Extension Wrangler Library
3     ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
4     ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
5     ** Copyright (C) 2002, Lev Povalahev
6     ** All rights reserved.
7     **
8     ** Redistribution and use in source and binary forms, with or without
9     ** modification, are permitted provided that the following conditions are met:
10     **
11     ** * Redistributions of source code must retain the above copyright notice,
12     ** this list of conditions and the following disclaimer.
13     ** * Redistributions in binary form must reproduce the above copyright notice,
14     ** this list of conditions and the following disclaimer in the documentation
15     ** and/or other materials provided with the distribution.
16     ** * The name of the author may be used to endorse or promote products
17     ** derived from this software without specific prior written permission.
18     **
19     ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20     ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21     ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22     ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23     ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24     ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25     ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26     ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27     ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28     ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29     ** THE POSSIBILITY OF SUCH DAMAGE.
30     */
31    
32     /*
33     * Mesa 3-D graphics library
34     * Version: 7.0
35     *
36     * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
37     *
38     * Permission is hereby granted, free of charge, to any person obtaining a
39     * copy of this software and associated documentation files (the "Software"),
40     * to deal in the Software without restriction, including without limitation
41     * the rights to use, copy, modify, merge, publish, distribute, sublicense,
42     * and/or sell copies of the Software, and to permit persons to whom the
43     * Software is furnished to do so, subject to the following conditions:
44     *
45     * The above copyright notice and this permission notice shall be included
46     * in all copies or substantial portions of the Software.
47     *
48     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
49     * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
51     * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
52     * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53     * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
54     */
55    
56     /*
57     ** Copyright (c) 2007 The Khronos Group Inc.
58     **
59     ** Permission is hereby granted, free of charge, to any person obtaining a
60     ** copy of this software and/or associated documentation files (the
61     ** "Materials"), to deal in the Materials without restriction, including
62     ** without limitation the rights to use, copy, modify, merge, publish,
63     ** distribute, sublicense, and/or sell copies of the Materials, and to
64     ** permit persons to whom the Materials are furnished to do so, subject to
65     ** the following conditions:
66     **
67     ** The above copyright notice and this permission notice shall be included
68     ** in all copies or substantial portions of the Materials.
69     **
70     ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
71     ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
72     ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
73     ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
74     ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
75     ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
76     ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
77     */
78    
79     #ifndef __glxew_h__
80     #define __glxew_h__
81     #define __GLXEW_H__
82    
83     #ifdef __glxext_h_
84     #error glxext.h included before glxew.h
85     #endif
86    
87     #if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
88     #error glx.h included before glxew.h
89     #endif
90    
91     #define __glxext_h_
92    
93     #define GLX_H
94     #define __GLX_glx_h__
95     #define __glx_h__
96    
97     #include <X11/Xlib.h>
98     #include <X11/Xutil.h>
99     #include <X11/Xmd.h>
100     #include <GL/glew.h>
101    
102     #ifdef __cplusplus
103     extern "C" {
104     #endif
105    
106     /* ---------------------------- GLX_VERSION_1_0 --------------------------- */
107    
108     #ifndef GLX_VERSION_1_0
109     #define GLX_VERSION_1_0 1
110    
111     #define GLX_USE_GL 1
112     #define GLX_BUFFER_SIZE 2
113     #define GLX_LEVEL 3
114     #define GLX_RGBA 4
115     #define GLX_DOUBLEBUFFER 5
116     #define GLX_STEREO 6
117     #define GLX_AUX_BUFFERS 7
118     #define GLX_RED_SIZE 8
119     #define GLX_GREEN_SIZE 9
120     #define GLX_BLUE_SIZE 10
121     #define GLX_ALPHA_SIZE 11
122     #define GLX_DEPTH_SIZE 12
123     #define GLX_STENCIL_SIZE 13
124     #define GLX_ACCUM_RED_SIZE 14
125     #define GLX_ACCUM_GREEN_SIZE 15
126     #define GLX_ACCUM_BLUE_SIZE 16
127     #define GLX_ACCUM_ALPHA_SIZE 17
128     #define GLX_BAD_SCREEN 1
129     #define GLX_BAD_ATTRIBUTE 2
130     #define GLX_NO_EXTENSION 3
131     #define GLX_BAD_VISUAL 4
132     #define GLX_BAD_CONTEXT 5
133     #define GLX_BAD_VALUE 6
134     #define GLX_BAD_ENUM 7
135    
136     typedef XID GLXDrawable;
137     typedef XID GLXPixmap;
138     #ifdef __sun
139     typedef struct __glXContextRec *GLXContext;
140     #else
141     typedef struct __GLXcontextRec *GLXContext;
142     #endif
143    
144     typedef unsigned int GLXVideoDeviceNV;
145    
146     extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
147     extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
148     extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
149     extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
150     extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
151     extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
152     extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
153     extern void glXDestroyContext (Display *dpy, GLXContext ctx);
154     extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
155     extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLulong mask);
156     extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
157     extern GLXContext glXGetCurrentContext (void);
158     extern GLXDrawable glXGetCurrentDrawable (void);
159     extern void glXWaitGL (void);
160     extern void glXWaitX (void);
161     extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
162     extern void glXUseXFont (Font font, int first, int count, int listBase);
163    
164     #define GLXEW_VERSION_1_0 GLXEW_GET_VAR(__GLXEW_VERSION_1_0)
165    
166     #endif /* GLX_VERSION_1_0 */
167    
168     /* ---------------------------- GLX_VERSION_1_1 --------------------------- */
169    
170     #ifndef GLX_VERSION_1_1
171     #define GLX_VERSION_1_1
172    
173     #define GLX_VENDOR 0x1
174     #define GLX_VERSION 0x2
175     #define GLX_EXTENSIONS 0x3
176    
177     extern const char* glXQueryExtensionsString (Display *dpy, int screen);
178     extern const char* glXGetClientString (Display *dpy, int name);
179     extern const char* glXQueryServerString (Display *dpy, int screen, int name);
180    
181     #define GLXEW_VERSION_1_1 GLXEW_GET_VAR(__GLXEW_VERSION_1_1)
182    
183     #endif /* GLX_VERSION_1_1 */
184    
185     /* ---------------------------- GLX_VERSION_1_2 ---------------------------- */
186    
187     #ifndef GLX_VERSION_1_2
188     #define GLX_VERSION_1_2 1
189    
190     typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
191    
192     #define glXGetCurrentDisplay GLXEW_GET_FUN(__glewXGetCurrentDisplay)
193    
194     #define GLXEW_VERSION_1_2 GLXEW_GET_VAR(__GLXEW_VERSION_1_2)
195    
196     #endif /* GLX_VERSION_1_2 */
197    
198     /* ---------------------------- GLX_VERSION_1_3 ---------------------------- */
199    
200     #ifndef GLX_VERSION_1_3
201     #define GLX_VERSION_1_3 1
202    
203     #define GLX_RGBA_BIT 0x00000001
204     #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
205     #define GLX_WINDOW_BIT 0x00000001
206     #define GLX_COLOR_INDEX_BIT 0x00000002
207     #define GLX_PIXMAP_BIT 0x00000002
208     #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
209     #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
210     #define GLX_PBUFFER_BIT 0x00000004
211     #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
212     #define GLX_AUX_BUFFERS_BIT 0x00000010
213     #define GLX_CONFIG_CAVEAT 0x20
214     #define GLX_DEPTH_BUFFER_BIT 0x00000020
215     #define GLX_X_VISUAL_TYPE 0x22
216     #define GLX_TRANSPARENT_TYPE 0x23
217     #define GLX_TRANSPARENT_INDEX_VALUE 0x24
218     #define GLX_TRANSPARENT_RED_VALUE 0x25
219     #define GLX_TRANSPARENT_GREEN_VALUE 0x26
220     #define GLX_TRANSPARENT_BLUE_VALUE 0x27
221     #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
222     #define GLX_STENCIL_BUFFER_BIT 0x00000040
223     #define GLX_ACCUM_BUFFER_BIT 0x00000080
224     #define GLX_NONE 0x8000
225     #define GLX_SLOW_CONFIG 0x8001
226     #define GLX_TRUE_COLOR 0x8002
227     #define GLX_DIRECT_COLOR 0x8003
228     #define GLX_PSEUDO_COLOR 0x8004
229     #define GLX_STATIC_COLOR 0x8005
230     #define GLX_GRAY_SCALE 0x8006
231     #define GLX_STATIC_GRAY 0x8007
232     #define GLX_TRANSPARENT_RGB 0x8008
233     #define GLX_TRANSPARENT_INDEX 0x8009
234     #define GLX_VISUAL_ID 0x800B
235     #define GLX_SCREEN 0x800C
236     #define GLX_NON_CONFORMANT_CONFIG 0x800D
237     #define GLX_DRAWABLE_TYPE 0x8010
238     #define GLX_RENDER_TYPE 0x8011
239     #define GLX_X_RENDERABLE 0x8012
240     #define GLX_FBCONFIG_ID 0x8013
241     #define GLX_RGBA_TYPE 0x8014
242     #define GLX_COLOR_INDEX_TYPE 0x8015
243     #define GLX_MAX_PBUFFER_WIDTH 0x8016
244     #define GLX_MAX_PBUFFER_HEIGHT 0x8017
245     #define GLX_MAX_PBUFFER_PIXELS 0x8018
246     #define GLX_PRESERVED_CONTENTS 0x801B
247     #define GLX_LARGEST_PBUFFER 0x801C
248     #define GLX_WIDTH 0x801D
249     #define GLX_HEIGHT 0x801E
250     #define GLX_EVENT_MASK 0x801F
251     #define GLX_DAMAGED 0x8020
252     #define GLX_SAVED 0x8021
253     #define GLX_WINDOW 0x8022
254     #define GLX_PBUFFER 0x8023
255     #define GLX_PBUFFER_HEIGHT 0x8040
256     #define GLX_PBUFFER_WIDTH 0x8041
257     #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
258     #define GLX_DONT_CARE 0xFFFFFFFF
259    
260     typedef XID GLXFBConfigID;
261     typedef XID GLXWindow;
262     typedef XID GLXPbuffer;
263     typedef struct __GLXFBConfigRec *GLXFBConfig;
264    
265     typedef struct {
266     int event_type;
267     int draw_type;
268     unsigned long serial;
269     Bool send_event;
270     Display *display;
271     GLXDrawable drawable;
272     unsigned int buffer_mask;
273     unsigned int aux_buffer;
274     int x, y;
275     int width, height;
276     int count;
277     } GLXPbufferClobberEvent;
278     typedef union __GLXEvent {
279     GLXPbufferClobberEvent glxpbufferclobber;
280     long pad[24];
281     } GLXEvent;
282    
283     typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
284     typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
285     typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
286     typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
287     typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
288     typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
289     typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
290     typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
291     typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
292     typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
293     typedef GLXFBConfig* ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
294     typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
295     typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
296     typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
297     typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
298     typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
299     typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
300    
301     #define glXChooseFBConfig GLXEW_GET_FUN(__glewXChooseFBConfig)
302     #define glXCreateNewContext GLXEW_GET_FUN(__glewXCreateNewContext)
303     #define glXCreatePbuffer GLXEW_GET_FUN(__glewXCreatePbuffer)
304     #define glXCreatePixmap GLXEW_GET_FUN(__glewXCreatePixmap)
305     #define glXCreateWindow GLXEW_GET_FUN(__glewXCreateWindow)
306     #define glXDestroyPbuffer GLXEW_GET_FUN(__glewXDestroyPbuffer)
307     #define glXDestroyPixmap GLXEW_GET_FUN(__glewXDestroyPixmap)
308     #define glXDestroyWindow GLXEW_GET_FUN(__glewXDestroyWindow)
309     #define glXGetCurrentReadDrawable GLXEW_GET_FUN(__glewXGetCurrentReadDrawable)
310     #define glXGetFBConfigAttrib GLXEW_GET_FUN(__glewXGetFBConfigAttrib)
311     #define glXGetFBConfigs GLXEW_GET_FUN(__glewXGetFBConfigs)
312     #define glXGetSelectedEvent GLXEW_GET_FUN(__glewXGetSelectedEvent)
313     #define glXGetVisualFromFBConfig GLXEW_GET_FUN(__glewXGetVisualFromFBConfig)
314     #define glXMakeContextCurrent GLXEW_GET_FUN(__glewXMakeContextCurrent)
315     #define glXQueryContext GLXEW_GET_FUN(__glewXQueryContext)
316     #define glXQueryDrawable GLXEW_GET_FUN(__glewXQueryDrawable)
317     #define glXSelectEvent GLXEW_GET_FUN(__glewXSelectEvent)
318    
319     #define GLXEW_VERSION_1_3 GLXEW_GET_VAR(__GLXEW_VERSION_1_3)
320    
321     #endif /* GLX_VERSION_1_3 */
322    
323     /* ---------------------------- GLX_VERSION_1_4 ---------------------------- */
324    
325     #ifndef GLX_VERSION_1_4
326     #define GLX_VERSION_1_4 1
327    
328     #define GLX_SAMPLE_BUFFERS 100000
329     #define GLX_SAMPLES 100001
330    
331     extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
332    
333     #define GLXEW_VERSION_1_4 GLXEW_GET_VAR(__GLXEW_VERSION_1_4)
334    
335     #endif /* GLX_VERSION_1_4 */
336    
337     /* -------------------------- GLX_3DFX_multisample ------------------------- */
338    
339     #ifndef GLX_3DFX_multisample
340     #define GLX_3DFX_multisample 1
341    
342     #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
343     #define GLX_SAMPLES_3DFX 0x8051
344    
345     #define GLXEW_3DFX_multisample GLXEW_GET_VAR(__GLXEW_3DFX_multisample)
346    
347     #endif /* GLX_3DFX_multisample */
348    
349     /* ------------------------- GLX_ARB_create_context ------------------------ */
350    
351     #ifndef GLX_ARB_create_context
352     #define GLX_ARB_create_context 1
353    
354     #define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001
355     #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
356     #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
357     #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
358     #define GLX_CONTEXT_FLAGS_ARB 0x2094
359    
360     typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
361    
362     #define glXCreateContextAttribsARB GLXEW_GET_FUN(__glewXCreateContextAttribsARB)
363    
364     #define GLXEW_ARB_create_context GLXEW_GET_VAR(__GLXEW_ARB_create_context)
365    
366     #endif /* GLX_ARB_create_context */
367    
368     /* --------------------- GLX_ARB_create_context_profile -------------------- */
369    
370     #ifndef GLX_ARB_create_context_profile
371     #define GLX_ARB_create_context_profile 1
372    
373     #define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
374     #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
375     #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
376    
377     #define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
378    
379     #endif /* GLX_ARB_create_context_profile */
380    
381     /* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
382    
383     #ifndef GLX_ARB_fbconfig_float
384     #define GLX_ARB_fbconfig_float 1
385    
386     #define GLX_RGBA_FLOAT_BIT 0x00000004
387     #define GLX_RGBA_FLOAT_TYPE 0x20B9
388    
389     #define GLXEW_ARB_fbconfig_float GLXEW_GET_VAR(__GLXEW_ARB_fbconfig_float)
390    
391     #endif /* GLX_ARB_fbconfig_float */
392    
393     /* ------------------------ GLX_ARB_framebuffer_sRGB ----------------------- */
394    
395     #ifndef GLX_ARB_framebuffer_sRGB
396     #define GLX_ARB_framebuffer_sRGB 1
397    
398     #define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
399    
400     #define GLXEW_ARB_framebuffer_sRGB GLXEW_GET_VAR(__GLXEW_ARB_framebuffer_sRGB)
401    
402     #endif /* GLX_ARB_framebuffer_sRGB */
403    
404     /* ------------------------ GLX_ARB_get_proc_address ----------------------- */
405    
406     #ifndef GLX_ARB_get_proc_address
407     #define GLX_ARB_get_proc_address 1
408    
409     extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
410    
411     #define GLXEW_ARB_get_proc_address GLXEW_GET_VAR(__GLXEW_ARB_get_proc_address)
412    
413     #endif /* GLX_ARB_get_proc_address */
414    
415     /* -------------------------- GLX_ARB_multisample -------------------------- */
416    
417     #ifndef GLX_ARB_multisample
418     #define GLX_ARB_multisample 1
419    
420     #define GLX_SAMPLE_BUFFERS_ARB 100000
421     #define GLX_SAMPLES_ARB 100001
422    
423     #define GLXEW_ARB_multisample GLXEW_GET_VAR(__GLXEW_ARB_multisample)
424    
425     #endif /* GLX_ARB_multisample */
426    
427     /* ---------------------- GLX_ARB_vertex_buffer_object --------------------- */
428    
429     #ifndef GLX_ARB_vertex_buffer_object
430     #define GLX_ARB_vertex_buffer_object 1
431    
432     #define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
433    
434     #define GLXEW_ARB_vertex_buffer_object GLXEW_GET_VAR(__GLXEW_ARB_vertex_buffer_object)
435    
436     #endif /* GLX_ARB_vertex_buffer_object */
437    
438     /* ----------------------- GLX_ATI_pixel_format_float ---------------------- */
439    
440     #ifndef GLX_ATI_pixel_format_float
441     #define GLX_ATI_pixel_format_float 1
442    
443     #define GLX_RGBA_FLOAT_ATI_BIT 0x00000100
444    
445     #define GLXEW_ATI_pixel_format_float GLXEW_GET_VAR(__GLXEW_ATI_pixel_format_float)
446    
447     #endif /* GLX_ATI_pixel_format_float */
448    
449     /* ------------------------- GLX_ATI_render_texture ------------------------ */
450    
451     #ifndef GLX_ATI_render_texture
452     #define GLX_ATI_render_texture 1
453    
454     #define GLX_BIND_TO_TEXTURE_RGB_ATI 0x9800
455     #define GLX_BIND_TO_TEXTURE_RGBA_ATI 0x9801
456     #define GLX_TEXTURE_FORMAT_ATI 0x9802
457     #define GLX_TEXTURE_TARGET_ATI 0x9803
458     #define GLX_MIPMAP_TEXTURE_ATI 0x9804
459     #define GLX_TEXTURE_RGB_ATI 0x9805
460     #define GLX_TEXTURE_RGBA_ATI 0x9806
461     #define GLX_NO_TEXTURE_ATI 0x9807
462     #define GLX_TEXTURE_CUBE_MAP_ATI 0x9808
463     #define GLX_TEXTURE_1D_ATI 0x9809
464     #define GLX_TEXTURE_2D_ATI 0x980A
465     #define GLX_MIPMAP_LEVEL_ATI 0x980B
466     #define GLX_CUBE_MAP_FACE_ATI 0x980C
467     #define GLX_TEXTURE_CUBE_MAP_POSITIVE_X_ATI 0x980D
468     #define GLX_TEXTURE_CUBE_MAP_NEGATIVE_X_ATI 0x980E
469     #define GLX_TEXTURE_CUBE_MAP_POSITIVE_Y_ATI 0x980F
470     #define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Y_ATI 0x9810
471     #define GLX_TEXTURE_CUBE_MAP_POSITIVE_Z_ATI 0x9811
472     #define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Z_ATI 0x9812
473     #define GLX_FRONT_LEFT_ATI 0x9813
474     #define GLX_FRONT_RIGHT_ATI 0x9814
475     #define GLX_BACK_LEFT_ATI 0x9815
476     #define GLX_BACK_RIGHT_ATI 0x9816
477     #define GLX_AUX0_ATI 0x9817
478     #define GLX_AUX1_ATI 0x9818
479     #define GLX_AUX2_ATI 0x9819
480     #define GLX_AUX3_ATI 0x981A
481     #define GLX_AUX4_ATI 0x981B
482     #define GLX_AUX5_ATI 0x981C
483     #define GLX_AUX6_ATI 0x981D
484     #define GLX_AUX7_ATI 0x981E
485     #define GLX_AUX8_ATI 0x981F
486     #define GLX_AUX9_ATI 0x9820
487     #define GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821
488     #define GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822
489    
490     typedef void ( * PFNGLXBINDTEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer);
491     typedef void ( * PFNGLXDRAWABLEATTRIBATIPROC) (Display *dpy, GLXDrawable draw, const int *attrib_list);
492     typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer);
493    
494     #define glXBindTexImageATI GLXEW_GET_FUN(__glewXBindTexImageATI)
495     #define glXDrawableAttribATI GLXEW_GET_FUN(__glewXDrawableAttribATI)
496     #define glXReleaseTexImageATI GLXEW_GET_FUN(__glewXReleaseTexImageATI)
497    
498     #define GLXEW_ATI_render_texture GLXEW_GET_VAR(__GLXEW_ATI_render_texture)
499    
500     #endif /* GLX_ATI_render_texture */
501    
502     /* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
503    
504     #ifndef GLX_EXT_fbconfig_packed_float
505     #define GLX_EXT_fbconfig_packed_float 1
506    
507     #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
508     #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
509    
510     #define GLXEW_EXT_fbconfig_packed_float GLXEW_GET_VAR(__GLXEW_EXT_fbconfig_packed_float)
511    
512     #endif /* GLX_EXT_fbconfig_packed_float */
513    
514     /* ------------------------ GLX_EXT_framebuffer_sRGB ----------------------- */
515    
516     #ifndef GLX_EXT_framebuffer_sRGB
517     #define GLX_EXT_framebuffer_sRGB 1
518    
519     #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
520    
521     #define GLXEW_EXT_framebuffer_sRGB GLXEW_GET_VAR(__GLXEW_EXT_framebuffer_sRGB)
522    
523     #endif /* GLX_EXT_framebuffer_sRGB */
524    
525     /* ------------------------- GLX_EXT_import_context ------------------------ */
526    
527     #ifndef GLX_EXT_import_context
528     #define GLX_EXT_import_context 1
529    
530     #define GLX_SHARE_CONTEXT_EXT 0x800A
531     #define GLX_VISUAL_ID_EXT 0x800B
532     #define GLX_SCREEN_EXT 0x800C
533    
534     typedef XID GLXContextID;
535    
536     typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display* dpy, GLXContext context);
537     typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
538     typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display* dpy, GLXContextID contextID);
539     typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context, int attribute,int *value);
540    
541     #define glXFreeContextEXT GLXEW_GET_FUN(__glewXFreeContextEXT)
542     #define glXGetContextIDEXT GLXEW_GET_FUN(__glewXGetContextIDEXT)
543     #define glXImportContextEXT GLXEW_GET_FUN(__glewXImportContextEXT)
544     #define glXQueryContextInfoEXT GLXEW_GET_FUN(__glewXQueryContextInfoEXT)
545    
546     #define GLXEW_EXT_import_context GLXEW_GET_VAR(__GLXEW_EXT_import_context)
547    
548     #endif /* GLX_EXT_import_context */
549    
550     /* -------------------------- GLX_EXT_scene_marker ------------------------- */
551    
552     #ifndef GLX_EXT_scene_marker
553     #define GLX_EXT_scene_marker 1
554    
555     #define GLXEW_EXT_scene_marker GLXEW_GET_VAR(__GLXEW_EXT_scene_marker)
556    
557     #endif /* GLX_EXT_scene_marker */
558    
559     /* -------------------------- GLX_EXT_swap_control ------------------------- */
560    
561     #ifndef GLX_EXT_swap_control
562     #define GLX_EXT_swap_control 1
563    
564     #define GLX_SWAP_INTERVAL_EXT 0x20F1
565     #define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
566    
567     typedef void ( * PFNGLXSWAPINTERVALEXTPROC) (Display* dpy, GLXDrawable drawable, int interval);
568    
569     #define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
570    
571     #define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
572    
573     #endif /* GLX_EXT_swap_control */
574    
575     /* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
576    
577     #ifndef GLX_EXT_texture_from_pixmap
578     #define GLX_EXT_texture_from_pixmap 1
579    
580     #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
581     #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
582     #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
583     #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
584     #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
585     #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
586     #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
587     #define GLX_Y_INVERTED_EXT 0x20D4
588     #define GLX_TEXTURE_FORMAT_EXT 0x20D5
589     #define GLX_TEXTURE_TARGET_EXT 0x20D6
590     #define GLX_MIPMAP_TEXTURE_EXT 0x20D7
591     #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
592     #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
593     #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
594     #define GLX_TEXTURE_1D_EXT 0x20DB
595     #define GLX_TEXTURE_2D_EXT 0x20DC
596     #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
597     #define GLX_FRONT_LEFT_EXT 0x20DE
598     #define GLX_FRONT_RIGHT_EXT 0x20DF
599     #define GLX_BACK_LEFT_EXT 0x20E0
600     #define GLX_BACK_RIGHT_EXT 0x20E1
601     #define GLX_AUX0_EXT 0x20E2
602     #define GLX_AUX1_EXT 0x20E3
603     #define GLX_AUX2_EXT 0x20E4
604     #define GLX_AUX3_EXT 0x20E5
605     #define GLX_AUX4_EXT 0x20E6
606     #define GLX_AUX5_EXT 0x20E7
607     #define GLX_AUX6_EXT 0x20E8
608     #define GLX_AUX7_EXT 0x20E9
609     #define GLX_AUX8_EXT 0x20EA
610     #define GLX_AUX9_EXT 0x20EB
611    
612     typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display* display, GLXDrawable drawable, int buffer, const int *attrib_list);
613     typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable drawable, int buffer);
614    
615     #define glXBindTexImageEXT GLXEW_GET_FUN(__glewXBindTexImageEXT)
616     #define glXReleaseTexImageEXT GLXEW_GET_FUN(__glewXReleaseTexImageEXT)
617    
618     #define GLXEW_EXT_texture_from_pixmap GLXEW_GET_VAR(__GLXEW_EXT_texture_from_pixmap)
619    
620     #endif /* GLX_EXT_texture_from_pixmap */
621    
622     /* -------------------------- GLX_EXT_visual_info -------------------------- */
623    
624     #ifndef GLX_EXT_visual_info
625     #define GLX_EXT_visual_info 1
626    
627     #define GLX_X_VISUAL_TYPE_EXT 0x22
628     #define GLX_TRANSPARENT_TYPE_EXT 0x23
629     #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
630     #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
631     #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
632     #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
633     #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
634     #define GLX_NONE_EXT 0x8000
635     #define GLX_TRUE_COLOR_EXT 0x8002
636     #define GLX_DIRECT_COLOR_EXT 0x8003
637     #define GLX_PSEUDO_COLOR_EXT 0x8004
638     #define GLX_STATIC_COLOR_EXT 0x8005
639     #define GLX_GRAY_SCALE_EXT 0x8006
640     #define GLX_STATIC_GRAY_EXT 0x8007
641     #define GLX_TRANSPARENT_RGB_EXT 0x8008
642     #define GLX_TRANSPARENT_INDEX_EXT 0x8009
643    
644     #define GLXEW_EXT_visual_info GLXEW_GET_VAR(__GLXEW_EXT_visual_info)
645    
646     #endif /* GLX_EXT_visual_info */
647    
648     /* ------------------------- GLX_EXT_visual_rating ------------------------- */
649    
650     #ifndef GLX_EXT_visual_rating
651     #define GLX_EXT_visual_rating 1
652    
653     #define GLX_VISUAL_CAVEAT_EXT 0x20
654     #define GLX_SLOW_VISUAL_EXT 0x8001
655     #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
656    
657     #define GLXEW_EXT_visual_rating GLXEW_GET_VAR(__GLXEW_EXT_visual_rating)
658    
659     #endif /* GLX_EXT_visual_rating */
660    
661     /* -------------------------- GLX_INTEL_swap_event ------------------------- */
662    
663     #ifndef GLX_INTEL_swap_event
664     #define GLX_INTEL_swap_event 1
665    
666     #define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
667     #define GLX_COPY_COMPLETE_INTEL 0x8181
668     #define GLX_FLIP_COMPLETE_INTEL 0x8182
669     #define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
670    
671     #define GLXEW_INTEL_swap_event GLXEW_GET_VAR(__GLXEW_INTEL_swap_event)
672    
673     #endif /* GLX_INTEL_swap_event */
674    
675     /* -------------------------- GLX_MESA_agp_offset -------------------------- */
676    
677     #ifndef GLX_MESA_agp_offset
678     #define GLX_MESA_agp_offset 1
679    
680     typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void* pointer);
681    
682     #define glXGetAGPOffsetMESA GLXEW_GET_FUN(__glewXGetAGPOffsetMESA)
683    
684     #define GLXEW_MESA_agp_offset GLXEW_GET_VAR(__GLXEW_MESA_agp_offset)
685    
686     #endif /* GLX_MESA_agp_offset */
687    
688     /* ------------------------ GLX_MESA_copy_sub_buffer ----------------------- */
689    
690     #ifndef GLX_MESA_copy_sub_buffer
691     #define GLX_MESA_copy_sub_buffer 1
692    
693     typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display* dpy, GLXDrawable drawable, int x, int y, int width, int height);
694    
695     #define glXCopySubBufferMESA GLXEW_GET_FUN(__glewXCopySubBufferMESA)
696    
697     #define GLXEW_MESA_copy_sub_buffer GLXEW_GET_VAR(__GLXEW_MESA_copy_sub_buffer)
698    
699     #endif /* GLX_MESA_copy_sub_buffer */
700    
701     /* ------------------------ GLX_MESA_pixmap_colormap ----------------------- */
702    
703     #ifndef GLX_MESA_pixmap_colormap
704     #define GLX_MESA_pixmap_colormap 1
705    
706     typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display* dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
707    
708     #define glXCreateGLXPixmapMESA GLXEW_GET_FUN(__glewXCreateGLXPixmapMESA)
709    
710     #define GLXEW_MESA_pixmap_colormap GLXEW_GET_VAR(__GLXEW_MESA_pixmap_colormap)
711    
712     #endif /* GLX_MESA_pixmap_colormap */
713    
714     /* ------------------------ GLX_MESA_release_buffers ----------------------- */
715    
716     #ifndef GLX_MESA_release_buffers
717     #define GLX_MESA_release_buffers 1
718    
719     typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display* dpy, GLXDrawable d);
720    
721     #define glXReleaseBuffersMESA GLXEW_GET_FUN(__glewXReleaseBuffersMESA)
722    
723     #define GLXEW_MESA_release_buffers GLXEW_GET_VAR(__GLXEW_MESA_release_buffers)
724    
725     #endif /* GLX_MESA_release_buffers */
726    
727     /* ------------------------- GLX_MESA_set_3dfx_mode ------------------------ */
728    
729     #ifndef GLX_MESA_set_3dfx_mode
730     #define GLX_MESA_set_3dfx_mode 1
731    
732     #define GLX_3DFX_WINDOW_MODE_MESA 0x1
733     #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
734    
735     typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
736    
737     #define glXSet3DfxModeMESA GLXEW_GET_FUN(__glewXSet3DfxModeMESA)
738    
739     #define GLXEW_MESA_set_3dfx_mode GLXEW_GET_VAR(__GLXEW_MESA_set_3dfx_mode)
740    
741     #endif /* GLX_MESA_set_3dfx_mode */
742    
743     /* --------------------------- GLX_NV_copy_image --------------------------- */
744    
745     #ifndef GLX_NV_copy_image
746     #define GLX_NV_copy_image 1
747    
748     typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
749    
750     #define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
751    
752     #define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
753    
754     #endif /* GLX_NV_copy_image */
755    
756     /* -------------------------- GLX_NV_float_buffer -------------------------- */
757    
758     #ifndef GLX_NV_float_buffer
759     #define GLX_NV_float_buffer 1
760    
761     #define GLX_FLOAT_COMPONENTS_NV 0x20B0
762    
763     #define GLXEW_NV_float_buffer GLXEW_GET_VAR(__GLXEW_NV_float_buffer)
764    
765     #endif /* GLX_NV_float_buffer */
766    
767     /* -------------------------- GLX_NV_present_video ------------------------- */
768    
769     #ifndef GLX_NV_present_video
770     #define GLX_NV_present_video 1
771    
772     #define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
773    
774     typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display* dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
775     typedef unsigned int* ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
776    
777     #define glXBindVideoDeviceNV GLXEW_GET_FUN(__glewXBindVideoDeviceNV)
778     #define glXEnumerateVideoDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoDevicesNV)
779    
780     #define GLXEW_NV_present_video GLXEW_GET_VAR(__GLXEW_NV_present_video)
781    
782     #endif /* GLX_NV_present_video */
783    
784     /* --------------------------- GLX_NV_swap_group --------------------------- */
785    
786     #ifndef GLX_NV_swap_group
787     #define GLX_NV_swap_group 1
788    
789     typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display* dpy, GLuint group, GLuint barrier);
790     typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display* dpy, GLXDrawable drawable, GLuint group);
791     typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display* dpy, int screen, GLuint *count);
792     typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display* dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
793     typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display* dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
794     typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display* dpy, int screen);
795    
796     #define glXBindSwapBarrierNV GLXEW_GET_FUN(__glewXBindSwapBarrierNV)
797     #define glXJoinSwapGroupNV GLXEW_GET_FUN(__glewXJoinSwapGroupNV)
798     #define glXQueryFrameCountNV GLXEW_GET_FUN(__glewXQueryFrameCountNV)
799     #define glXQueryMaxSwapGroupsNV GLXEW_GET_FUN(__glewXQueryMaxSwapGroupsNV)
800     #define glXQuerySwapGroupNV GLXEW_GET_FUN(__glewXQuerySwapGroupNV)
801     #define glXResetFrameCountNV GLXEW_GET_FUN(__glewXResetFrameCountNV)
802    
803     #define GLXEW_NV_swap_group GLXEW_GET_VAR(__GLXEW_NV_swap_group)
804    
805     #endif /* GLX_NV_swap_group */
806    
807     /* ----------------------- GLX_NV_vertex_array_range ----------------------- */
808    
809     #ifndef GLX_NV_vertex_array_range
810     #define GLX_NV_vertex_array_range 1
811    
812     typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
813     typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
814    
815     #define glXAllocateMemoryNV GLXEW_GET_FUN(__glewXAllocateMemoryNV)
816     #define glXFreeMemoryNV GLXEW_GET_FUN(__glewXFreeMemoryNV)
817    
818     #define GLXEW_NV_vertex_array_range GLXEW_GET_VAR(__GLXEW_NV_vertex_array_range)
819    
820     #endif /* GLX_NV_vertex_array_range */
821    
822     /* -------------------------- GLX_NV_video_output -------------------------- */
823    
824     #ifndef GLX_NV_video_output
825     #define GLX_NV_video_output 1
826    
827     #define GLX_VIDEO_OUT_COLOR_NV 0x20C3
828     #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
829     #define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
830     #define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
831     #define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
832     #define GLX_VIDEO_OUT_FRAME_NV 0x20C8
833     #define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
834     #define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
835     #define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
836     #define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
837    
838     typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display* dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
839     typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display* dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
840     typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
841     typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice);
842     typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display* dpy, GLXPbuffer pbuf);
843     typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
844    
845     #define glXBindVideoImageNV GLXEW_GET_FUN(__glewXBindVideoImageNV)
846     #define glXGetVideoDeviceNV GLXEW_GET_FUN(__glewXGetVideoDeviceNV)
847     #define glXGetVideoInfoNV GLXEW_GET_FUN(__glewXGetVideoInfoNV)
848     #define glXReleaseVideoDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoDeviceNV)
849     #define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
850     #define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
851    
852     #define GLXEW_NV_video_output GLXEW_GET_VAR(__GLXEW_NV_video_output)
853    
854     #endif /* GLX_NV_video_output */
855    
856     /* -------------------------- GLX_OML_swap_method -------------------------- */
857    
858     #ifndef GLX_OML_swap_method
859     #define GLX_OML_swap_method 1
860    
861     #define GLX_SWAP_METHOD_OML 0x8060
862     #define GLX_SWAP_EXCHANGE_OML 0x8061
863     #define GLX_SWAP_COPY_OML 0x8062
864     #define GLX_SWAP_UNDEFINED_OML 0x8063
865    
866     #define GLXEW_OML_swap_method GLXEW_GET_VAR(__GLXEW_OML_swap_method)
867    
868     #endif /* GLX_OML_swap_method */
869    
870     /* -------------------------- GLX_OML_sync_control ------------------------- */
871    
872     #if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
873     #include <inttypes.h>
874     #define GLX_OML_sync_control 1
875    
876     typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
877     typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc);
878     typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
879     typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc);
880     typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc);
881    
882     #define glXGetMscRateOML GLXEW_GET_FUN(__glewXGetMscRateOML)
883     #define glXGetSyncValuesOML GLXEW_GET_FUN(__glewXGetSyncValuesOML)
884     #define glXSwapBuffersMscOML GLXEW_GET_FUN(__glewXSwapBuffersMscOML)
885     #define glXWaitForMscOML GLXEW_GET_FUN(__glewXWaitForMscOML)
886     #define glXWaitForSbcOML GLXEW_GET_FUN(__glewXWaitForSbcOML)
887    
888     #define GLXEW_OML_sync_control GLXEW_GET_VAR(__GLXEW_OML_sync_control)
889    
890     #endif /* GLX_OML_sync_control */
891    
892     /* ------------------------ GLX_SGIS_blended_overlay ----------------------- */
893    
894     #ifndef GLX_SGIS_blended_overlay
895     #define GLX_SGIS_blended_overlay 1
896    
897     #define GLX_BLENDED_RGBA_SGIS 0x8025
898    
899     #define GLXEW_SGIS_blended_overlay GLXEW_GET_VAR(__GLXEW_SGIS_blended_overlay)
900    
901     #endif /* GLX_SGIS_blended_overlay */
902    
903     /* -------------------------- GLX_SGIS_color_range ------------------------- */
904    
905     #ifndef GLX_SGIS_color_range
906     #define GLX_SGIS_color_range 1
907    
908     #define GLX_MIN_RED_SGIS 0
909     #define GLX_MAX_GREEN_SGIS 0
910     #define GLX_MIN_BLUE_SGIS 0
911     #define GLX_MAX_ALPHA_SGIS 0
912     #define GLX_MIN_GREEN_SGIS 0
913     #define GLX_MIN_ALPHA_SGIS 0
914     #define GLX_MAX_RED_SGIS 0
915     #define GLX_EXTENDED_RANGE_SGIS 0
916     #define GLX_MAX_BLUE_SGIS 0
917    
918     #define GLXEW_SGIS_color_range GLXEW_GET_VAR(__GLXEW_SGIS_color_range)
919    
920     #endif /* GLX_SGIS_color_range */
921    
922     /* -------------------------- GLX_SGIS_multisample ------------------------- */
923    
924     #ifndef GLX_SGIS_multisample
925     #define GLX_SGIS_multisample 1
926    
927     #define GLX_SAMPLE_BUFFERS_SGIS 100000
928     #define GLX_SAMPLES_SGIS 100001
929    
930     #define GLXEW_SGIS_multisample GLXEW_GET_VAR(__GLXEW_SGIS_multisample)
931    
932     #endif /* GLX_SGIS_multisample */
933    
934     /* ---------------------- GLX_SGIS_shared_multisample ---------------------- */
935    
936     #ifndef GLX_SGIS_shared_multisample
937     #define GLX_SGIS_shared_multisample 1
938    
939     #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
940     #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
941    
942     #define GLXEW_SGIS_shared_multisample GLXEW_GET_VAR(__GLXEW_SGIS_shared_multisample)
943    
944     #endif /* GLX_SGIS_shared_multisample */
945    
946     /* --------------------------- GLX_SGIX_fbconfig --------------------------- */
947    
948     #ifndef GLX_SGIX_fbconfig
949     #define GLX_SGIX_fbconfig 1
950    
951     #define GLX_WINDOW_BIT_SGIX 0x00000001
952     #define GLX_RGBA_BIT_SGIX 0x00000001
953     #define GLX_PIXMAP_BIT_SGIX 0x00000002
954     #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
955     #define GLX_SCREEN_EXT 0x800C
956     #define GLX_DRAWABLE_TYPE_SGIX 0x8010
957     #define GLX_RENDER_TYPE_SGIX 0x8011
958     #define GLX_X_RENDERABLE_SGIX 0x8012
959     #define GLX_FBCONFIG_ID_SGIX 0x8013
960     #define GLX_RGBA_TYPE_SGIX 0x8014
961     #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
962    
963     typedef XID GLXFBConfigIDSGIX;
964     typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
965    
966     typedef GLXFBConfigSGIX* ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
967     typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
968     typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, Pixmap pixmap);
969     typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display* dpy, GLXFBConfigSGIX config, int attribute, int *value);
970     typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display* dpy, XVisualInfo *vis);
971     typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfig config);
972    
973     #define glXChooseFBConfigSGIX GLXEW_GET_FUN(__glewXChooseFBConfigSGIX)
974     #define glXCreateContextWithConfigSGIX GLXEW_GET_FUN(__glewXCreateContextWithConfigSGIX)
975     #define glXCreateGLXPixmapWithConfigSGIX GLXEW_GET_FUN(__glewXCreateGLXPixmapWithConfigSGIX)
976     #define glXGetFBConfigAttribSGIX GLXEW_GET_FUN(__glewXGetFBConfigAttribSGIX)
977     #define glXGetFBConfigFromVisualSGIX GLXEW_GET_FUN(__glewXGetFBConfigFromVisualSGIX)
978     #define glXGetVisualFromFBConfigSGIX GLXEW_GET_FUN(__glewXGetVisualFromFBConfigSGIX)
979    
980     #define GLXEW_SGIX_fbconfig GLXEW_GET_VAR(__GLXEW_SGIX_fbconfig)
981    
982     #endif /* GLX_SGIX_fbconfig */
983    
984     /* --------------------------- GLX_SGIX_hyperpipe -------------------------- */
985    
986     #ifndef GLX_SGIX_hyperpipe
987     #define GLX_SGIX_hyperpipe 1
988    
989     #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
990     #define GLX_PIPE_RECT_SGIX 0x00000001
991     #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
992     #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
993     #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
994     #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
995     #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
996     #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
997     #define GLX_BAD_HYPERPIPE_SGIX 92
998     #define GLX_HYPERPIPE_ID_SGIX 0x8030
999    
1000     typedef struct {
1001     char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
1002     int networkId;
1003     } GLXHyperpipeNetworkSGIX;
1004     typedef struct {
1005     char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
1006     int XOrigin;
1007     int YOrigin;
1008     int maxHeight;
1009     int maxWidth;
1010     } GLXPipeRectLimits;
1011     typedef struct {
1012     char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
1013     int channel;
1014     unsigned int participationType;
1015     int timeSlice;
1016     } GLXHyperpipeConfigSGIX;
1017     typedef struct {
1018     char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
1019     int srcXOrigin;
1020     int srcYOrigin;
1021     int srcWidth;
1022     int srcHeight;
1023     int destXOrigin;
1024     int destYOrigin;
1025     int destWidth;
1026     int destHeight;
1027     } GLXPipeRect;
1028    
1029     typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
1030     typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
1031     typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
1032     typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
1033     typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
1034     typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
1035     typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
1036     typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
1037    
1038     #define glXBindHyperpipeSGIX GLXEW_GET_FUN(__glewXBindHyperpipeSGIX)
1039     #define glXDestroyHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXDestroyHyperpipeConfigSGIX)
1040     #define glXHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXHyperpipeAttribSGIX)
1041     #define glXHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXHyperpipeConfigSGIX)
1042     #define glXQueryHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeAttribSGIX)
1043     #define glXQueryHyperpipeBestAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeBestAttribSGIX)
1044     #define glXQueryHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeConfigSGIX)
1045     #define glXQueryHyperpipeNetworkSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeNetworkSGIX)
1046    
1047     #define GLXEW_SGIX_hyperpipe GLXEW_GET_VAR(__GLXEW_SGIX_hyperpipe)
1048    
1049     #endif /* GLX_SGIX_hyperpipe */
1050    
1051     /* ---------------------------- GLX_SGIX_pbuffer --------------------------- */
1052    
1053     #ifndef GLX_SGIX_pbuffer
1054     #define GLX_SGIX_pbuffer 1
1055    
1056     #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
1057     #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
1058     #define GLX_PBUFFER_BIT_SGIX 0x00000004
1059     #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
1060     #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
1061     #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
1062     #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
1063     #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
1064     #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
1065     #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
1066     #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
1067     #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
1068     #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
1069     #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
1070     #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
1071     #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
1072     #define GLX_LARGEST_PBUFFER_SGIX 0x801C
1073     #define GLX_WIDTH_SGIX 0x801D
1074     #define GLX_HEIGHT_SGIX 0x801E
1075     #define GLX_EVENT_MASK_SGIX 0x801F
1076     #define GLX_DAMAGED_SGIX 0x8020
1077     #define GLX_SAVED_SGIX 0x8021
1078     #define GLX_WINDOW_SGIX 0x8022
1079     #define GLX_PBUFFER_SGIX 0x8023
1080     #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
1081    
1082     typedef XID GLXPbufferSGIX;
1083     typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX;
1084    
1085     typedef GLXPbuffer ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display* dpy, GLXFBConfig config, unsigned int width, unsigned int height, int *attrib_list);
1086     typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf);
1087     typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long *mask);
1088     typedef void ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf, int attribute, unsigned int *value);
1089     typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long mask);
1090    
1091     #define glXCreateGLXPbufferSGIX GLXEW_GET_FUN(__glewXCreateGLXPbufferSGIX)
1092     #define glXDestroyGLXPbufferSGIX GLXEW_GET_FUN(__glewXDestroyGLXPbufferSGIX)
1093     #define glXGetSelectedEventSGIX GLXEW_GET_FUN(__glewXGetSelectedEventSGIX)
1094     #define glXQueryGLXPbufferSGIX GLXEW_GET_FUN(__glewXQueryGLXPbufferSGIX)
1095     #define glXSelectEventSGIX GLXEW_GET_FUN(__glewXSelectEventSGIX)
1096    
1097     #define GLXEW_SGIX_pbuffer GLXEW_GET_VAR(__GLXEW_SGIX_pbuffer)
1098    
1099     #endif /* GLX_SGIX_pbuffer */
1100    
1101     /* ------------------------- GLX_SGIX_swap_barrier ------------------------- */
1102    
1103     #ifndef GLX_SGIX_swap_barrier
1104     #define GLX_SGIX_swap_barrier 1
1105    
1106     typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
1107     typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
1108    
1109     #define glXBindSwapBarrierSGIX GLXEW_GET_FUN(__glewXBindSwapBarrierSGIX)
1110     #define glXQueryMaxSwapBarriersSGIX GLXEW_GET_FUN(__glewXQueryMaxSwapBarriersSGIX)
1111    
1112     #define GLXEW_SGIX_swap_barrier GLXEW_GET_VAR(__GLXEW_SGIX_swap_barrier)
1113    
1114     #endif /* GLX_SGIX_swap_barrier */
1115    
1116     /* -------------------------- GLX_SGIX_swap_group -------------------------- */
1117    
1118     #ifndef GLX_SGIX_swap_group
1119     #define GLX_SGIX_swap_group 1
1120    
1121     typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
1122    
1123     #define glXJoinSwapGroupSGIX GLXEW_GET_FUN(__glewXJoinSwapGroupSGIX)
1124    
1125     #define GLXEW_SGIX_swap_group GLXEW_GET_VAR(__GLXEW_SGIX_swap_group)
1126    
1127     #endif /* GLX_SGIX_swap_group */
1128    
1129     /* ------------------------- GLX_SGIX_video_resize ------------------------- */
1130    
1131     #ifndef GLX_SGIX_video_resize
1132     #define GLX_SGIX_video_resize 1
1133    
1134     #define GLX_SYNC_FRAME_SGIX 0x00000000
1135     #define GLX_SYNC_SWAP_SGIX 0x00000001
1136    
1137     typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display* display, int screen, int channel, Window window);
1138     typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int x, int y, int w, int h);
1139     typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display* display, int screen, int channel, GLenum synctype);
1140     typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display* display, int screen, int channel, int *x, int *y, int *w, int *h);
1141     typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
1142    
1143     #define glXBindChannelToWindowSGIX GLXEW_GET_FUN(__glewXBindChannelToWindowSGIX)
1144     #define glXChannelRectSGIX GLXEW_GET_FUN(__glewXChannelRectSGIX)
1145     #define glXChannelRectSyncSGIX GLXEW_GET_FUN(__glewXChannelRectSyncSGIX)
1146     #define glXQueryChannelDeltasSGIX GLXEW_GET_FUN(__glewXQueryChannelDeltasSGIX)
1147     #define glXQueryChannelRectSGIX GLXEW_GET_FUN(__glewXQueryChannelRectSGIX)
1148    
1149     #define GLXEW_SGIX_video_resize GLXEW_GET_VAR(__GLXEW_SGIX_video_resize)
1150    
1151     #endif /* GLX_SGIX_video_resize */
1152    
1153     /* ---------------------- GLX_SGIX_visual_select_group --------------------- */
1154    
1155     #ifndef GLX_SGIX_visual_select_group
1156     #define GLX_SGIX_visual_select_group 1
1157    
1158     #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
1159    
1160     #define GLXEW_SGIX_visual_select_group GLXEW_GET_VAR(__GLXEW_SGIX_visual_select_group)
1161    
1162     #endif /* GLX_SGIX_visual_select_group */
1163    
1164     /* ---------------------------- GLX_SGI_cushion ---------------------------- */
1165    
1166     #ifndef GLX_SGI_cushion
1167     #define GLX_SGI_cushion 1
1168    
1169     typedef void ( * PFNGLXCUSHIONSGIPROC) (Display* dpy, Window window, float cushion);
1170    
1171     #define glXCushionSGI GLXEW_GET_FUN(__glewXCushionSGI)
1172    
1173     #define GLXEW_SGI_cushion GLXEW_GET_VAR(__GLXEW_SGI_cushion)
1174    
1175     #endif /* GLX_SGI_cushion */
1176    
1177     /* ----------------------- GLX_SGI_make_current_read ----------------------- */
1178    
1179     #ifndef GLX_SGI_make_current_read
1180     #define GLX_SGI_make_current_read 1
1181    
1182     typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
1183     typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
1184    
1185     #define glXGetCurrentReadDrawableSGI GLXEW_GET_FUN(__glewXGetCurrentReadDrawableSGI)
1186     #define glXMakeCurrentReadSGI GLXEW_GET_FUN(__glewXMakeCurrentReadSGI)
1187    
1188     #define GLXEW_SGI_make_current_read GLXEW_GET_VAR(__GLXEW_SGI_make_current_read)
1189    
1190     #endif /* GLX_SGI_make_current_read */
1191    
1192     /* -------------------------- GLX_SGI_swap_control ------------------------- */
1193    
1194     #ifndef GLX_SGI_swap_control
1195     #define GLX_SGI_swap_control 1
1196    
1197     typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
1198    
1199     #define glXSwapIntervalSGI GLXEW_GET_FUN(__glewXSwapIntervalSGI)
1200    
1201     #define GLXEW_SGI_swap_control GLXEW_GET_VAR(__GLXEW_SGI_swap_control)
1202    
1203     #endif /* GLX_SGI_swap_control */
1204    
1205     /* --------------------------- GLX_SGI_video_sync -------------------------- */
1206    
1207     #ifndef GLX_SGI_video_sync
1208     #define GLX_SGI_video_sync 1
1209    
1210     typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (uint* count);
1211     typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count);
1212    
1213     #define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
1214     #define glXWaitVideoSyncSGI GLXEW_GET_FUN(__glewXWaitVideoSyncSGI)
1215    
1216     #define GLXEW_SGI_video_sync GLXEW_GET_VAR(__GLXEW_SGI_video_sync)
1217    
1218     #endif /* GLX_SGI_video_sync */
1219    
1220     /* --------------------- GLX_SUN_get_transparent_index --------------------- */
1221    
1222     #ifndef GLX_SUN_get_transparent_index
1223     #define GLX_SUN_get_transparent_index 1
1224    
1225     typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display* dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
1226    
1227     #define glXGetTransparentIndexSUN GLXEW_GET_FUN(__glewXGetTransparentIndexSUN)
1228    
1229     #define GLXEW_SUN_get_transparent_index GLXEW_GET_VAR(__GLXEW_SUN_get_transparent_index)
1230    
1231     #endif /* GLX_SUN_get_transparent_index */
1232    
1233     /* -------------------------- GLX_SUN_video_resize ------------------------- */
1234    
1235     #ifndef GLX_SUN_video_resize
1236     #define GLX_SUN_video_resize 1
1237    
1238     #define GLX_VIDEO_RESIZE_SUN 0x8171
1239     #define GL_VIDEO_RESIZE_COMPENSATION_SUN 0x85CD
1240    
1241     typedef int ( * PFNGLXGETVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float* factor);
1242     typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float factor);
1243    
1244     #define glXGetVideoResizeSUN GLXEW_GET_FUN(__glewXGetVideoResizeSUN)
1245     #define glXVideoResizeSUN GLXEW_GET_FUN(__glewXVideoResizeSUN)
1246    
1247     #define GLXEW_SUN_video_resize GLXEW_GET_VAR(__GLXEW_SUN_video_resize)
1248    
1249     #endif /* GLX_SUN_video_resize */
1250    
1251     /* ------------------------------------------------------------------------- */
1252    
1253     #ifdef GLEW_MX
1254     #define GLXEW_EXPORT
1255     #else
1256     #define GLXEW_EXPORT extern
1257     #endif /* GLEW_MX */
1258    
1259     extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
1260    
1261     extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
1262     extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
1263     extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
1264     extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
1265     extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
1266     extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
1267     extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
1268     extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
1269     extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
1270     extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
1271     extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
1272     extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
1273     extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
1274     extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
1275     extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
1276     extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
1277     extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
1278    
1279     extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
1280    
1281     extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
1282     extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
1283     extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
1284    
1285     extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
1286     extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
1287     extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
1288     extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
1289    
1290     extern PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
1291    
1292     extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
1293     extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
1294    
1295     extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
1296    
1297     extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
1298    
1299     extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
1300    
1301     extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
1302    
1303     extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
1304    
1305     extern PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
1306    
1307     extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
1308     extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
1309    
1310     extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
1311     extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
1312     extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
1313     extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
1314     extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
1315     extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
1316    
1317     extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
1318     extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
1319    
1320     extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
1321     extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
1322     extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
1323     extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
1324     extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
1325     extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
1326    
1327     #ifdef GLX_OML_sync_control
1328     extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
1329     extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
1330     extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
1331     extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
1332     extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
1333     #endif
1334    
1335     extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
1336     extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
1337     extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
1338     extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
1339     extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
1340     extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
1341    
1342     extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
1343     extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
1344     extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
1345     extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
1346     extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
1347     extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
1348     extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
1349     extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
1350    
1351     extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
1352     extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
1353     extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
1354     extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
1355     extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
1356    
1357     extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
1358     extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
1359    
1360     extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
1361    
1362     extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
1363     extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
1364     extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
1365     extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
1366     extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
1367    
1368     extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
1369    
1370     extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
1371     extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
1372    
1373     extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
1374    
1375     extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
1376     extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
1377    
1378     extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
1379    
1380     extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
1381     extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
1382    
1383     #if defined(GLEW_MX)
1384     struct GLXEWContextStruct
1385     {
1386     #endif /* GLEW_MX */
1387    
1388     GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;
1389     GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;
1390     GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
1391     GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
1392     GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
1393     GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
1394     GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
1395     GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
1396     GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
1397     GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
1398     GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
1399     GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
1400     GLXEW_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
1401     GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
1402     GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
1403     GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
1404     GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
1405     GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
1406     GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
1407     GLXEW_EXPORT GLboolean __GLXEW_EXT_swap_control;
1408     GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
1409     GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
1410     GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
1411     GLXEW_EXPORT GLboolean __GLXEW_INTEL_swap_event;
1412     GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
1413     GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
1414     GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
1415     GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
1416     GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
1417     GLXEW_EXPORT GLboolean __GLXEW_NV_copy_image;
1418     GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
1419     GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
1420     GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
1421     GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
1422     GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
1423     GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
1424     GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
1425     GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
1426     GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
1427     GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
1428     GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
1429     GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
1430     GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
1431     GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
1432     GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
1433     GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
1434     GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize;
1435     GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
1436     GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion;
1437     GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read;
1438     GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control;
1439     GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync;
1440     GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
1441     GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
1442    
1443     #ifdef GLEW_MX
1444     }; /* GLXEWContextStruct */
1445     #endif /* GLEW_MX */
1446    
1447     /* ------------------------------------------------------------------------ */
1448    
1449     #ifdef GLEW_MX
1450    
1451     typedef struct GLXEWContextStruct GLXEWContext;
1452     extern GLenum glxewContextInit (GLXEWContext* ctx);
1453     extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
1454    
1455     #define glxewInit() glxewContextInit(glxewGetContext())
1456     #define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
1457    
1458     #define GLXEW_GET_VAR(x) (*(const GLboolean*)&(glxewGetContext()->x))
1459     #define GLXEW_GET_FUN(x) x
1460    
1461     #else /* GLEW_MX */
1462    
1463     #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
1464     #define GLXEW_GET_FUN(x) x
1465    
1466     extern GLboolean glxewIsSupported (const char* name);
1467    
1468     #endif /* GLEW_MX */
1469    
1470     extern GLboolean glxewGetExtension (const char* name);
1471    
1472     #ifdef __cplusplus
1473     }
1474     #endif
1475    
1476     #endif /* __glxew_h__ */

  ViewVC Help
Powered by ViewVC 1.1.22