source: Bindings/glfw/glxew.h @ 38

Revision 38, 45.0 KB checked in by art, 12 years ago (diff)
Line 
1/*
2** The OpenGL Extension Wrangler Library
3** Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
4** Copyright (C) 2002-2007, 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** The contents of this file are subject to the GLX Public License Version 1.0
34** (the "License"). You may not use this file except in compliance with the
35** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
36** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
37** or at http://www.sgi.com/software/opensource/glx/license.html.
38**
39** Software distributed under the License is distributed on an "AS IS"
40** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
41** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
42** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
43** language governing rights and limitations under the License.
44**
45** The Original Software is GLX version 1.2 source code, released February,
46** 1999. The developer of the Original Software is Silicon Graphics, Inc.
47** Those portions of the Subject Software created by Silicon Graphics, Inc.
48** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
49*/
50
51#ifndef __glxew_h__
52#define __glxew_h__
53#define __GLXEW_H__
54
55#ifdef __glxext_h_
56#error glxext.h included before glxew.h
57#endif
58#ifdef GLX_H
59#error glx.h included before glxew.h
60#endif
61
62#define __glxext_h_
63#define __GLX_glx_h__
64#define GLX_H
65
66#include <X11/Xlib.h>
67#include <X11/Xutil.h>
68#include <X11/Xmd.h>
69#include <GL/glew.h>
70
71#ifdef __cplusplus
72extern "C" {
73#endif
74
75/* ---------------------------- GLX_VERSION_1_0 --------------------------- */
76
77#ifndef GLX_VERSION_1_0
78#define GLX_VERSION_1_0 1
79
80#define GLX_USE_GL 1
81#define GLX_BUFFER_SIZE 2
82#define GLX_LEVEL 3
83#define GLX_RGBA 4
84#define GLX_DOUBLEBUFFER 5
85#define GLX_STEREO 6
86#define GLX_AUX_BUFFERS 7
87#define GLX_RED_SIZE 8
88#define GLX_GREEN_SIZE 9
89#define GLX_BLUE_SIZE 10
90#define GLX_ALPHA_SIZE 11
91#define GLX_DEPTH_SIZE 12
92#define GLX_STENCIL_SIZE 13
93#define GLX_ACCUM_RED_SIZE 14
94#define GLX_ACCUM_GREEN_SIZE 15
95#define GLX_ACCUM_BLUE_SIZE 16
96#define GLX_ACCUM_ALPHA_SIZE 17
97#define GLX_BAD_SCREEN 1
98#define GLX_BAD_ATTRIBUTE 2
99#define GLX_NO_EXTENSION 3
100#define GLX_BAD_VISUAL 4
101#define GLX_BAD_CONTEXT 5
102#define GLX_BAD_VALUE 6
103#define GLX_BAD_ENUM 7
104
105typedef XID GLXDrawable;
106typedef XID GLXPixmap;
107#ifdef __sun
108typedef struct __glXContextRec *GLXContext;
109#else
110typedef struct __GLXcontextRec *GLXContext;
111#endif
112
113extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
114extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
115extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
116extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
117extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
118extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
119extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
120extern void glXDestroyContext (Display *dpy, GLXContext ctx);
121extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
122extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
123extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
124extern GLXContext glXGetCurrentContext (void);
125extern GLXDrawable glXGetCurrentDrawable (void);
126extern void glXWaitGL (void);
127extern void glXWaitX (void);
128extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
129extern void glXUseXFont (Font font, int first, int count, int listBase);
130
131#define GLXEW_VERSION_1_0 GLXEW_GET_VAR(__GLXEW_VERSION_1_0)
132
133#endif /* GLX_VERSION_1_0 */
134
135/* ---------------------------- GLX_VERSION_1_1 --------------------------- */
136
137#ifndef GLX_VERSION_1_1
138#define GLX_VERSION_1_1
139
140#define GLX_VENDOR 0x1
141#define GLX_VERSION 0x2
142#define GLX_EXTENSIONS 0x3
143
144extern const char* glXQueryExtensionsString (Display *dpy, int screen);
145extern const char* glXGetClientString (Display *dpy, int name);
146extern const char* glXQueryServerString (Display *dpy, int screen, int name);
147
148#define GLXEW_VERSION_1_1 GLXEW_GET_VAR(__GLXEW_VERSION_1_1)
149
150#endif /* GLX_VERSION_1_1 */
151
152/* ---------------------------- GLX_VERSION_1_2 ---------------------------- */
153
154#ifndef GLX_VERSION_1_2
155#define GLX_VERSION_1_2 1
156
157typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
158
159#define glXGetCurrentDisplay GLXEW_GET_FUN(__glewXGetCurrentDisplay)
160
161#define GLXEW_VERSION_1_2 GLXEW_GET_VAR(__GLXEW_VERSION_1_2)
162
163#endif /* GLX_VERSION_1_2 */
164
165/* ---------------------------- GLX_VERSION_1_3 ---------------------------- */
166
167#ifndef GLX_VERSION_1_3
168#define GLX_VERSION_1_3 1
169
170#define GLX_RGBA_BIT 0x00000001
171#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
172#define GLX_WINDOW_BIT 0x00000001
173#define GLX_COLOR_INDEX_BIT 0x00000002
174#define GLX_PIXMAP_BIT 0x00000002
175#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
176#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
177#define GLX_PBUFFER_BIT 0x00000004
178#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
179#define GLX_AUX_BUFFERS_BIT 0x00000010
180#define GLX_CONFIG_CAVEAT 0x20
181#define GLX_DEPTH_BUFFER_BIT 0x00000020
182#define GLX_X_VISUAL_TYPE 0x22
183#define GLX_TRANSPARENT_TYPE 0x23
184#define GLX_TRANSPARENT_INDEX_VALUE 0x24
185#define GLX_TRANSPARENT_RED_VALUE 0x25
186#define GLX_TRANSPARENT_GREEN_VALUE 0x26
187#define GLX_TRANSPARENT_BLUE_VALUE 0x27
188#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
189#define GLX_STENCIL_BUFFER_BIT 0x00000040
190#define GLX_ACCUM_BUFFER_BIT 0x00000080
191#define GLX_NONE 0x8000
192#define GLX_SLOW_CONFIG 0x8001
193#define GLX_TRUE_COLOR 0x8002
194#define GLX_DIRECT_COLOR 0x8003
195#define GLX_PSEUDO_COLOR 0x8004
196#define GLX_STATIC_COLOR 0x8005
197#define GLX_GRAY_SCALE 0x8006
198#define GLX_STATIC_GRAY 0x8007
199#define GLX_TRANSPARENT_RGB 0x8008
200#define GLX_TRANSPARENT_INDEX 0x8009
201#define GLX_VISUAL_ID 0x800B
202#define GLX_SCREEN 0x800C
203#define GLX_NON_CONFORMANT_CONFIG 0x800D
204#define GLX_DRAWABLE_TYPE 0x8010
205#define GLX_RENDER_TYPE 0x8011
206#define GLX_X_RENDERABLE 0x8012
207#define GLX_FBCONFIG_ID 0x8013
208#define GLX_RGBA_TYPE 0x8014
209#define GLX_COLOR_INDEX_TYPE 0x8015
210#define GLX_MAX_PBUFFER_WIDTH 0x8016
211#define GLX_MAX_PBUFFER_HEIGHT 0x8017
212#define GLX_MAX_PBUFFER_PIXELS 0x8018
213#define GLX_PRESERVED_CONTENTS 0x801B
214#define GLX_LARGEST_PBUFFER 0x801C
215#define GLX_WIDTH 0x801D
216#define GLX_HEIGHT 0x801E
217#define GLX_EVENT_MASK 0x801F
218#define GLX_DAMAGED 0x8020
219#define GLX_SAVED 0x8021
220#define GLX_WINDOW 0x8022
221#define GLX_PBUFFER 0x8023
222#define GLX_PBUFFER_HEIGHT 0x8040
223#define GLX_PBUFFER_WIDTH 0x8041
224#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
225#define GLX_DONT_CARE 0xFFFFFFFF
226
227typedef XID GLXFBConfigID;
228typedef XID GLXWindow;
229typedef XID GLXPbuffer;
230typedef struct __GLXFBConfigRec *GLXFBConfig;
231
232typedef struct {
233  int event_type; 
234  int draw_type; 
235  unsigned long serial; 
236  Bool send_event; 
237  Display *display; 
238  GLXDrawable drawable; 
239  unsigned int buffer_mask; 
240  unsigned int aux_buffer; 
241  int x, y; 
242  int width, height; 
243  int count; 
244} GLXPbufferClobberEvent;
245typedef union __GLXEvent {
246  GLXPbufferClobberEvent glxpbufferclobber; 
247  long pad[24]; 
248} GLXEvent;
249
250typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
251typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
252typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
253typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
254typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
255typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
256typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
257typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
258typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
259typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
260typedef GLXFBConfig* ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
261typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
262typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
263typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
264typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
265typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
266typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
267
268#define glXChooseFBConfig GLXEW_GET_FUN(__glewXChooseFBConfig)
269#define glXCreateNewContext GLXEW_GET_FUN(__glewXCreateNewContext)
270#define glXCreatePbuffer GLXEW_GET_FUN(__glewXCreatePbuffer)
271#define glXCreatePixmap GLXEW_GET_FUN(__glewXCreatePixmap)
272#define glXCreateWindow GLXEW_GET_FUN(__glewXCreateWindow)
273#define glXDestroyPbuffer GLXEW_GET_FUN(__glewXDestroyPbuffer)
274#define glXDestroyPixmap GLXEW_GET_FUN(__glewXDestroyPixmap)
275#define glXDestroyWindow GLXEW_GET_FUN(__glewXDestroyWindow)
276#define glXGetCurrentReadDrawable GLXEW_GET_FUN(__glewXGetCurrentReadDrawable)
277#define glXGetFBConfigAttrib GLXEW_GET_FUN(__glewXGetFBConfigAttrib)
278#define glXGetFBConfigs GLXEW_GET_FUN(__glewXGetFBConfigs)
279#define glXGetSelectedEvent GLXEW_GET_FUN(__glewXGetSelectedEvent)
280#define glXGetVisualFromFBConfig GLXEW_GET_FUN(__glewXGetVisualFromFBConfig)
281#define glXMakeContextCurrent GLXEW_GET_FUN(__glewXMakeContextCurrent)
282#define glXQueryContext GLXEW_GET_FUN(__glewXQueryContext)
283#define glXQueryDrawable GLXEW_GET_FUN(__glewXQueryDrawable)
284#define glXSelectEvent GLXEW_GET_FUN(__glewXSelectEvent)
285
286#define GLXEW_VERSION_1_3 GLXEW_GET_VAR(__GLXEW_VERSION_1_3)
287
288#endif /* GLX_VERSION_1_3 */
289
290/* ---------------------------- GLX_VERSION_1_4 ---------------------------- */
291
292#ifndef GLX_VERSION_1_4
293#define GLX_VERSION_1_4 1
294
295#define GLX_SAMPLE_BUFFERS 100000
296#define GLX_SAMPLES 100001
297
298extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
299
300#define GLXEW_VERSION_1_4 GLXEW_GET_VAR(__GLXEW_VERSION_1_4)
301
302#endif /* GLX_VERSION_1_4 */
303
304/* -------------------------- GLX_3DFX_multisample ------------------------- */
305
306#ifndef GLX_3DFX_multisample
307#define GLX_3DFX_multisample 1
308
309#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
310#define GLX_SAMPLES_3DFX 0x8051
311
312#define GLXEW_3DFX_multisample GLXEW_GET_VAR(__GLXEW_3DFX_multisample)
313
314#endif /* GLX_3DFX_multisample */
315
316/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
317
318#ifndef GLX_ARB_fbconfig_float
319#define GLX_ARB_fbconfig_float 1
320
321#define GLX_RGBA_FLOAT_BIT 0x00000004
322#define GLX_RGBA_FLOAT_TYPE 0x20B9
323
324#define GLXEW_ARB_fbconfig_float GLXEW_GET_VAR(__GLXEW_ARB_fbconfig_float)
325
326#endif /* GLX_ARB_fbconfig_float */
327
328/* ------------------------ GLX_ARB_get_proc_address ----------------------- */
329
330#ifndef GLX_ARB_get_proc_address
331#define GLX_ARB_get_proc_address 1
332
333extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
334
335#define GLXEW_ARB_get_proc_address GLXEW_GET_VAR(__GLXEW_ARB_get_proc_address)
336
337#endif /* GLX_ARB_get_proc_address */
338
339/* -------------------------- GLX_ARB_multisample -------------------------- */
340
341#ifndef GLX_ARB_multisample
342#define GLX_ARB_multisample 1
343
344#define GLX_SAMPLE_BUFFERS_ARB 100000
345#define GLX_SAMPLES_ARB 100001
346
347#define GLXEW_ARB_multisample GLXEW_GET_VAR(__GLXEW_ARB_multisample)
348
349#endif /* GLX_ARB_multisample */
350
351/* ----------------------- GLX_ATI_pixel_format_float ---------------------- */
352
353#ifndef GLX_ATI_pixel_format_float
354#define GLX_ATI_pixel_format_float 1
355
356#define GLX_RGBA_FLOAT_ATI_BIT 0x00000100
357
358#define GLXEW_ATI_pixel_format_float GLXEW_GET_VAR(__GLXEW_ATI_pixel_format_float)
359
360#endif /* GLX_ATI_pixel_format_float */
361
362/* ------------------------- GLX_ATI_render_texture ------------------------ */
363
364#ifndef GLX_ATI_render_texture
365#define GLX_ATI_render_texture 1
366
367#define GLX_BIND_TO_TEXTURE_RGB_ATI 0x9800
368#define GLX_BIND_TO_TEXTURE_RGBA_ATI 0x9801
369#define GLX_TEXTURE_FORMAT_ATI 0x9802
370#define GLX_TEXTURE_TARGET_ATI 0x9803
371#define GLX_MIPMAP_TEXTURE_ATI 0x9804
372#define GLX_TEXTURE_RGB_ATI 0x9805
373#define GLX_TEXTURE_RGBA_ATI 0x9806
374#define GLX_NO_TEXTURE_ATI 0x9807
375#define GLX_TEXTURE_CUBE_MAP_ATI 0x9808
376#define GLX_TEXTURE_1D_ATI 0x9809
377#define GLX_TEXTURE_2D_ATI 0x980A
378#define GLX_MIPMAP_LEVEL_ATI 0x980B
379#define GLX_CUBE_MAP_FACE_ATI 0x980C
380#define GLX_TEXTURE_CUBE_MAP_POSITIVE_X_ATI 0x980D
381#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_X_ATI 0x980E
382#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Y_ATI 0x980F
383#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Y_ATI 0x9810
384#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Z_ATI 0x9811
385#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Z_ATI 0x9812
386#define GLX_FRONT_LEFT_ATI 0x9813
387#define GLX_FRONT_RIGHT_ATI 0x9814
388#define GLX_BACK_LEFT_ATI 0x9815
389#define GLX_BACK_RIGHT_ATI 0x9816
390#define GLX_AUX0_ATI 0x9817
391#define GLX_AUX1_ATI 0x9818
392#define GLX_AUX2_ATI 0x9819
393#define GLX_AUX3_ATI 0x981A
394#define GLX_AUX4_ATI 0x981B
395#define GLX_AUX5_ATI 0x981C
396#define GLX_AUX6_ATI 0x981D
397#define GLX_AUX7_ATI 0x981E
398#define GLX_AUX8_ATI 0x981F
399#define GLX_AUX9_ATI 0x9820
400#define GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821
401#define GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822
402
403typedef void ( * PFNGLXBINDTEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer);
404typedef void ( * PFNGLXDRAWABLEATTRIBATIPROC) (Display *dpy, GLXDrawable draw, const int *attrib_list);
405typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer);
406
407#define glXBindTexImageATI GLXEW_GET_FUN(__glewXBindTexImageATI)
408#define glXDrawableAttribATI GLXEW_GET_FUN(__glewXDrawableAttribATI)
409#define glXReleaseTexImageATI GLXEW_GET_FUN(__glewXReleaseTexImageATI)
410
411#define GLXEW_ATI_render_texture GLXEW_GET_VAR(__GLXEW_ATI_render_texture)
412
413#endif /* GLX_ATI_render_texture */
414
415/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
416
417#ifndef GLX_EXT_fbconfig_packed_float
418#define GLX_EXT_fbconfig_packed_float 1
419
420#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
421#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
422
423#define GLXEW_EXT_fbconfig_packed_float GLXEW_GET_VAR(__GLXEW_EXT_fbconfig_packed_float)
424
425#endif /* GLX_EXT_fbconfig_packed_float */
426
427/* ------------------------ GLX_EXT_framebuffer_sRGB ----------------------- */
428
429#ifndef GLX_EXT_framebuffer_sRGB
430#define GLX_EXT_framebuffer_sRGB 1
431
432#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
433
434#define GLXEW_EXT_framebuffer_sRGB GLXEW_GET_VAR(__GLXEW_EXT_framebuffer_sRGB)
435
436#endif /* GLX_EXT_framebuffer_sRGB */
437
438/* ------------------------- GLX_EXT_import_context ------------------------ */
439
440#ifndef GLX_EXT_import_context
441#define GLX_EXT_import_context 1
442
443#define GLX_SHARE_CONTEXT_EXT 0x800A
444#define GLX_VISUAL_ID_EXT 0x800B
445#define GLX_SCREEN_EXT 0x800C
446
447typedef XID GLXContextID;
448
449typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display* dpy, GLXContext context);
450typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
451typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display* dpy, GLXContextID contextID);
452typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context, int attribute,int *value);
453
454#define glXFreeContextEXT GLXEW_GET_FUN(__glewXFreeContextEXT)
455#define glXGetContextIDEXT GLXEW_GET_FUN(__glewXGetContextIDEXT)
456#define glXImportContextEXT GLXEW_GET_FUN(__glewXImportContextEXT)
457#define glXQueryContextInfoEXT GLXEW_GET_FUN(__glewXQueryContextInfoEXT)
458
459#define GLXEW_EXT_import_context GLXEW_GET_VAR(__GLXEW_EXT_import_context)
460
461#endif /* GLX_EXT_import_context */
462
463/* -------------------------- GLX_EXT_scene_marker ------------------------- */
464
465#ifndef GLX_EXT_scene_marker
466#define GLX_EXT_scene_marker 1
467
468#define GLXEW_EXT_scene_marker GLXEW_GET_VAR(__GLXEW_EXT_scene_marker)
469
470#endif /* GLX_EXT_scene_marker */
471
472/* -------------------------- GLX_EXT_visual_info -------------------------- */
473
474#ifndef GLX_EXT_visual_info
475#define GLX_EXT_visual_info 1
476
477#define GLX_X_VISUAL_TYPE_EXT 0x22
478#define GLX_TRANSPARENT_TYPE_EXT 0x23
479#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
480#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
481#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
482#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
483#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
484#define GLX_NONE_EXT 0x8000
485#define GLX_TRUE_COLOR_EXT 0x8002
486#define GLX_DIRECT_COLOR_EXT 0x8003
487#define GLX_PSEUDO_COLOR_EXT 0x8004
488#define GLX_STATIC_COLOR_EXT 0x8005
489#define GLX_GRAY_SCALE_EXT 0x8006
490#define GLX_STATIC_GRAY_EXT 0x8007
491#define GLX_TRANSPARENT_RGB_EXT 0x8008
492#define GLX_TRANSPARENT_INDEX_EXT 0x8009
493
494#define GLXEW_EXT_visual_info GLXEW_GET_VAR(__GLXEW_EXT_visual_info)
495
496#endif /* GLX_EXT_visual_info */
497
498/* ------------------------- GLX_EXT_visual_rating ------------------------- */
499
500#ifndef GLX_EXT_visual_rating
501#define GLX_EXT_visual_rating 1
502
503#define GLX_VISUAL_CAVEAT_EXT 0x20
504#define GLX_SLOW_VISUAL_EXT 0x8001
505#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
506
507#define GLXEW_EXT_visual_rating GLXEW_GET_VAR(__GLXEW_EXT_visual_rating)
508
509#endif /* GLX_EXT_visual_rating */
510
511/* -------------------------- GLX_MESA_agp_offset -------------------------- */
512
513#ifndef GLX_MESA_agp_offset
514#define GLX_MESA_agp_offset 1
515
516typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void* pointer);
517
518#define glXGetAGPOffsetMESA GLXEW_GET_FUN(__glewXGetAGPOffsetMESA)
519
520#define GLXEW_MESA_agp_offset GLXEW_GET_VAR(__GLXEW_MESA_agp_offset)
521
522#endif /* GLX_MESA_agp_offset */
523
524/* ------------------------ GLX_MESA_copy_sub_buffer ----------------------- */
525
526#ifndef GLX_MESA_copy_sub_buffer
527#define GLX_MESA_copy_sub_buffer 1
528
529typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display* dpy, GLXDrawable drawable, int x, int y, int width, int height);
530
531#define glXCopySubBufferMESA GLXEW_GET_FUN(__glewXCopySubBufferMESA)
532
533#define GLXEW_MESA_copy_sub_buffer GLXEW_GET_VAR(__GLXEW_MESA_copy_sub_buffer)
534
535#endif /* GLX_MESA_copy_sub_buffer */
536
537/* ------------------------ GLX_MESA_pixmap_colormap ----------------------- */
538
539#ifndef GLX_MESA_pixmap_colormap
540#define GLX_MESA_pixmap_colormap 1
541
542typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display* dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
543
544#define glXCreateGLXPixmapMESA GLXEW_GET_FUN(__glewXCreateGLXPixmapMESA)
545
546#define GLXEW_MESA_pixmap_colormap GLXEW_GET_VAR(__GLXEW_MESA_pixmap_colormap)
547
548#endif /* GLX_MESA_pixmap_colormap */
549
550/* ------------------------ GLX_MESA_release_buffers ----------------------- */
551
552#ifndef GLX_MESA_release_buffers
553#define GLX_MESA_release_buffers 1
554
555typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display* dpy, GLXDrawable d);
556
557#define glXReleaseBuffersMESA GLXEW_GET_FUN(__glewXReleaseBuffersMESA)
558
559#define GLXEW_MESA_release_buffers GLXEW_GET_VAR(__GLXEW_MESA_release_buffers)
560
561#endif /* GLX_MESA_release_buffers */
562
563/* ------------------------- GLX_MESA_set_3dfx_mode ------------------------ */
564
565#ifndef GLX_MESA_set_3dfx_mode
566#define GLX_MESA_set_3dfx_mode 1
567
568#define GLX_3DFX_WINDOW_MODE_MESA 0x1
569#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
570
571typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
572
573#define glXSet3DfxModeMESA GLXEW_GET_FUN(__glewXSet3DfxModeMESA)
574
575#define GLXEW_MESA_set_3dfx_mode GLXEW_GET_VAR(__GLXEW_MESA_set_3dfx_mode)
576
577#endif /* GLX_MESA_set_3dfx_mode */
578
579/* -------------------------- GLX_NV_float_buffer -------------------------- */
580
581#ifndef GLX_NV_float_buffer
582#define GLX_NV_float_buffer 1
583
584#define GLX_FLOAT_COMPONENTS_NV 0x20B0
585
586#define GLXEW_NV_float_buffer GLXEW_GET_VAR(__GLXEW_NV_float_buffer)
587
588#endif /* GLX_NV_float_buffer */
589
590/* ----------------------- GLX_NV_vertex_array_range ----------------------- */
591
592#ifndef GLX_NV_vertex_array_range
593#define GLX_NV_vertex_array_range 1
594
595typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
596typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
597
598#define glXAllocateMemoryNV GLXEW_GET_FUN(__glewXAllocateMemoryNV)
599#define glXFreeMemoryNV GLXEW_GET_FUN(__glewXFreeMemoryNV)
600
601#define GLXEW_NV_vertex_array_range GLXEW_GET_VAR(__GLXEW_NV_vertex_array_range)
602
603#endif /* GLX_NV_vertex_array_range */
604
605/* -------------------------- GLX_OML_swap_method -------------------------- */
606
607#ifndef GLX_OML_swap_method
608#define GLX_OML_swap_method 1
609
610#define GLX_SWAP_METHOD_OML 0x8060
611#define GLX_SWAP_EXCHANGE_OML 0x8061
612#define GLX_SWAP_COPY_OML 0x8062
613#define GLX_SWAP_UNDEFINED_OML 0x8063
614
615#define GLXEW_OML_swap_method GLXEW_GET_VAR(__GLXEW_OML_swap_method)
616
617#endif /* GLX_OML_swap_method */
618
619/* -------------------------- GLX_OML_sync_control ------------------------- */
620
621#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
622#include <inttypes.h>
623#define GLX_OML_sync_control 1
624
625typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
626typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc);
627typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
628typedef 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);
629typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc);
630
631#define glXGetMscRateOML GLXEW_GET_FUN(__glewXGetMscRateOML)
632#define glXGetSyncValuesOML GLXEW_GET_FUN(__glewXGetSyncValuesOML)
633#define glXSwapBuffersMscOML GLXEW_GET_FUN(__glewXSwapBuffersMscOML)
634#define glXWaitForMscOML GLXEW_GET_FUN(__glewXWaitForMscOML)
635#define glXWaitForSbcOML GLXEW_GET_FUN(__glewXWaitForSbcOML)
636
637#define GLXEW_OML_sync_control GLXEW_GET_VAR(__GLXEW_OML_sync_control)
638
639#endif /* GLX_OML_sync_control */
640
641/* ------------------------ GLX_SGIS_blended_overlay ----------------------- */
642
643#ifndef GLX_SGIS_blended_overlay
644#define GLX_SGIS_blended_overlay 1
645
646#define GLX_BLENDED_RGBA_SGIS 0x8025
647
648#define GLXEW_SGIS_blended_overlay GLXEW_GET_VAR(__GLXEW_SGIS_blended_overlay)
649
650#endif /* GLX_SGIS_blended_overlay */
651
652/* -------------------------- GLX_SGIS_color_range ------------------------- */
653
654#ifndef GLX_SGIS_color_range
655#define GLX_SGIS_color_range 1
656
657#define GLX_MIN_RED_SGIS 0
658#define GLX_MAX_GREEN_SGIS 0
659#define GLX_MIN_BLUE_SGIS 0
660#define GLX_MAX_ALPHA_SGIS 0
661#define GLX_MIN_GREEN_SGIS 0
662#define GLX_MIN_ALPHA_SGIS 0
663#define GLX_MAX_RED_SGIS 0
664#define GLX_EXTENDED_RANGE_SGIS 0
665#define GLX_MAX_BLUE_SGIS 0
666
667#define GLXEW_SGIS_color_range GLXEW_GET_VAR(__GLXEW_SGIS_color_range)
668
669#endif /* GLX_SGIS_color_range */
670
671/* -------------------------- GLX_SGIS_multisample ------------------------- */
672
673#ifndef GLX_SGIS_multisample
674#define GLX_SGIS_multisample 1
675
676#define GLX_SAMPLE_BUFFERS_SGIS 100000
677#define GLX_SAMPLES_SGIS 100001
678
679#define GLXEW_SGIS_multisample GLXEW_GET_VAR(__GLXEW_SGIS_multisample)
680
681#endif /* GLX_SGIS_multisample */
682
683/* ---------------------- GLX_SGIS_shared_multisample ---------------------- */
684
685#ifndef GLX_SGIS_shared_multisample
686#define GLX_SGIS_shared_multisample 1
687
688#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
689#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
690
691#define GLXEW_SGIS_shared_multisample GLXEW_GET_VAR(__GLXEW_SGIS_shared_multisample)
692
693#endif /* GLX_SGIS_shared_multisample */
694
695/* --------------------------- GLX_SGIX_fbconfig --------------------------- */
696
697#ifndef GLX_SGIX_fbconfig
698#define GLX_SGIX_fbconfig 1
699
700#define GLX_WINDOW_BIT_SGIX 0x00000001
701#define GLX_RGBA_BIT_SGIX 0x00000001
702#define GLX_PIXMAP_BIT_SGIX 0x00000002
703#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
704#define GLX_SCREEN_EXT 0x800C
705#define GLX_DRAWABLE_TYPE_SGIX 0x8010
706#define GLX_RENDER_TYPE_SGIX 0x8011
707#define GLX_X_RENDERABLE_SGIX 0x8012
708#define GLX_FBCONFIG_ID_SGIX 0x8013
709#define GLX_RGBA_TYPE_SGIX 0x8014
710#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
711
712typedef XID GLXFBConfigIDSGIX;
713typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
714
715typedef GLXFBConfigSGIX* ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
716typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
717typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, Pixmap pixmap);
718typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display* dpy, GLXFBConfigSGIX config, int attribute, int *value);
719typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display* dpy, XVisualInfo *vis);
720typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfig config);
721
722#define glXChooseFBConfigSGIX GLXEW_GET_FUN(__glewXChooseFBConfigSGIX)
723#define glXCreateContextWithConfigSGIX GLXEW_GET_FUN(__glewXCreateContextWithConfigSGIX)
724#define glXCreateGLXPixmapWithConfigSGIX GLXEW_GET_FUN(__glewXCreateGLXPixmapWithConfigSGIX)
725#define glXGetFBConfigAttribSGIX GLXEW_GET_FUN(__glewXGetFBConfigAttribSGIX)
726#define glXGetFBConfigFromVisualSGIX GLXEW_GET_FUN(__glewXGetFBConfigFromVisualSGIX)
727#define glXGetVisualFromFBConfigSGIX GLXEW_GET_FUN(__glewXGetVisualFromFBConfigSGIX)
728
729#define GLXEW_SGIX_fbconfig GLXEW_GET_VAR(__GLXEW_SGIX_fbconfig)
730
731#endif /* GLX_SGIX_fbconfig */
732
733/* --------------------------- GLX_SGIX_hyperpipe -------------------------- */
734
735#ifndef GLX_SGIX_hyperpipe
736#define GLX_SGIX_hyperpipe 1
737
738#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
739#define GLX_PIPE_RECT_SGIX 0x00000001
740#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
741#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
742#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
743#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
744#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
745#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
746#define GLX_BAD_HYPERPIPE_SGIX 92
747#define GLX_HYPERPIPE_ID_SGIX 0x8030
748
749typedef struct {
750  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
751  int  networkId; 
752} GLXHyperpipeNetworkSGIX;
753typedef struct {
754  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
755  int XOrigin; 
756  int YOrigin; 
757  int maxHeight; 
758  int maxWidth; 
759} GLXPipeRectLimits;
760typedef struct {
761  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
762  int channel; 
763  unsigned int participationType; 
764  int timeSlice; 
765} GLXHyperpipeConfigSGIX;
766typedef struct {
767  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
768  int srcXOrigin; 
769  int srcYOrigin; 
770  int srcWidth; 
771  int srcHeight; 
772  int destXOrigin; 
773  int destYOrigin; 
774  int destWidth; 
775  int destHeight; 
776} GLXPipeRect;
777
778typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
779typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
780typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
781typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
782typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
783typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
784typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
785typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
786
787#define glXBindHyperpipeSGIX GLXEW_GET_FUN(__glewXBindHyperpipeSGIX)
788#define glXDestroyHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXDestroyHyperpipeConfigSGIX)
789#define glXHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXHyperpipeAttribSGIX)
790#define glXHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXHyperpipeConfigSGIX)
791#define glXQueryHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeAttribSGIX)
792#define glXQueryHyperpipeBestAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeBestAttribSGIX)
793#define glXQueryHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeConfigSGIX)
794#define glXQueryHyperpipeNetworkSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeNetworkSGIX)
795
796#define GLXEW_SGIX_hyperpipe GLXEW_GET_VAR(__GLXEW_SGIX_hyperpipe)
797
798#endif /* GLX_SGIX_hyperpipe */
799
800/* ---------------------------- GLX_SGIX_pbuffer --------------------------- */
801
802#ifndef GLX_SGIX_pbuffer
803#define GLX_SGIX_pbuffer 1
804
805#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
806#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
807#define GLX_PBUFFER_BIT_SGIX 0x00000004
808#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
809#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
810#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
811#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
812#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
813#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
814#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
815#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
816#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
817#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
818#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
819#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
820#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
821#define GLX_LARGEST_PBUFFER_SGIX 0x801C
822#define GLX_WIDTH_SGIX 0x801D
823#define GLX_HEIGHT_SGIX 0x801E
824#define GLX_EVENT_MASK_SGIX 0x801F
825#define GLX_DAMAGED_SGIX 0x8020
826#define GLX_SAVED_SGIX 0x8021
827#define GLX_WINDOW_SGIX 0x8022
828#define GLX_PBUFFER_SGIX 0x8023
829#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
830
831typedef XID GLXPbufferSGIX;
832typedef 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;
833
834typedef GLXPbuffer ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display* dpy, GLXFBConfig config, unsigned int width, unsigned int height, int *attrib_list);
835typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf);
836typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long *mask);
837typedef void ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf, int attribute, unsigned int *value);
838typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long mask);
839
840#define glXCreateGLXPbufferSGIX GLXEW_GET_FUN(__glewXCreateGLXPbufferSGIX)
841#define glXDestroyGLXPbufferSGIX GLXEW_GET_FUN(__glewXDestroyGLXPbufferSGIX)
842#define glXGetSelectedEventSGIX GLXEW_GET_FUN(__glewXGetSelectedEventSGIX)
843#define glXQueryGLXPbufferSGIX GLXEW_GET_FUN(__glewXQueryGLXPbufferSGIX)
844#define glXSelectEventSGIX GLXEW_GET_FUN(__glewXSelectEventSGIX)
845
846#define GLXEW_SGIX_pbuffer GLXEW_GET_VAR(__GLXEW_SGIX_pbuffer)
847
848#endif /* GLX_SGIX_pbuffer */
849
850/* ------------------------- GLX_SGIX_swap_barrier ------------------------- */
851
852#ifndef GLX_SGIX_swap_barrier
853#define GLX_SGIX_swap_barrier 1
854
855typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
856typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
857
858#define glXBindSwapBarrierSGIX GLXEW_GET_FUN(__glewXBindSwapBarrierSGIX)
859#define glXQueryMaxSwapBarriersSGIX GLXEW_GET_FUN(__glewXQueryMaxSwapBarriersSGIX)
860
861#define GLXEW_SGIX_swap_barrier GLXEW_GET_VAR(__GLXEW_SGIX_swap_barrier)
862
863#endif /* GLX_SGIX_swap_barrier */
864
865/* -------------------------- GLX_SGIX_swap_group -------------------------- */
866
867#ifndef GLX_SGIX_swap_group
868#define GLX_SGIX_swap_group 1
869
870typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
871
872#define glXJoinSwapGroupSGIX GLXEW_GET_FUN(__glewXJoinSwapGroupSGIX)
873
874#define GLXEW_SGIX_swap_group GLXEW_GET_VAR(__GLXEW_SGIX_swap_group)
875
876#endif /* GLX_SGIX_swap_group */
877
878/* ------------------------- GLX_SGIX_video_resize ------------------------- */
879
880#ifndef GLX_SGIX_video_resize
881#define GLX_SGIX_video_resize 1
882
883#define GLX_SYNC_FRAME_SGIX 0x00000000
884#define GLX_SYNC_SWAP_SGIX 0x00000001
885
886typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display* display, int screen, int channel, Window window);
887typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int x, int y, int w, int h);
888typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display* display, int screen, int channel, GLenum synctype);
889typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display* display, int screen, int channel, int *x, int *y, int *w, int *h);
890typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
891
892#define glXBindChannelToWindowSGIX GLXEW_GET_FUN(__glewXBindChannelToWindowSGIX)
893#define glXChannelRectSGIX GLXEW_GET_FUN(__glewXChannelRectSGIX)
894#define glXChannelRectSyncSGIX GLXEW_GET_FUN(__glewXChannelRectSyncSGIX)
895#define glXQueryChannelDeltasSGIX GLXEW_GET_FUN(__glewXQueryChannelDeltasSGIX)
896#define glXQueryChannelRectSGIX GLXEW_GET_FUN(__glewXQueryChannelRectSGIX)
897
898#define GLXEW_SGIX_video_resize GLXEW_GET_VAR(__GLXEW_SGIX_video_resize)
899
900#endif /* GLX_SGIX_video_resize */
901
902/* ---------------------- GLX_SGIX_visual_select_group --------------------- */
903
904#ifndef GLX_SGIX_visual_select_group
905#define GLX_SGIX_visual_select_group 1
906
907#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
908
909#define GLXEW_SGIX_visual_select_group GLXEW_GET_VAR(__GLXEW_SGIX_visual_select_group)
910
911#endif /* GLX_SGIX_visual_select_group */
912
913/* ---------------------------- GLX_SGI_cushion ---------------------------- */
914
915#ifndef GLX_SGI_cushion
916#define GLX_SGI_cushion 1
917
918typedef void ( * PFNGLXCUSHIONSGIPROC) (Display* dpy, Window window, float cushion);
919
920#define glXCushionSGI GLXEW_GET_FUN(__glewXCushionSGI)
921
922#define GLXEW_SGI_cushion GLXEW_GET_VAR(__GLXEW_SGI_cushion)
923
924#endif /* GLX_SGI_cushion */
925
926/* ----------------------- GLX_SGI_make_current_read ----------------------- */
927
928#ifndef GLX_SGI_make_current_read
929#define GLX_SGI_make_current_read 1
930
931typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
932typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
933
934#define glXGetCurrentReadDrawableSGI GLXEW_GET_FUN(__glewXGetCurrentReadDrawableSGI)
935#define glXMakeCurrentReadSGI GLXEW_GET_FUN(__glewXMakeCurrentReadSGI)
936
937#define GLXEW_SGI_make_current_read GLXEW_GET_VAR(__GLXEW_SGI_make_current_read)
938
939#endif /* GLX_SGI_make_current_read */
940
941/* -------------------------- GLX_SGI_swap_control ------------------------- */
942
943#ifndef GLX_SGI_swap_control
944#define GLX_SGI_swap_control 1
945
946typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
947
948#define glXSwapIntervalSGI GLXEW_GET_FUN(__glewXSwapIntervalSGI)
949
950#define GLXEW_SGI_swap_control GLXEW_GET_VAR(__GLXEW_SGI_swap_control)
951
952#endif /* GLX_SGI_swap_control */
953
954/* --------------------------- GLX_SGI_video_sync -------------------------- */
955
956#ifndef GLX_SGI_video_sync
957#define GLX_SGI_video_sync 1
958
959typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (uint* count);
960typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count);
961
962#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
963#define glXWaitVideoSyncSGI GLXEW_GET_FUN(__glewXWaitVideoSyncSGI)
964
965#define GLXEW_SGI_video_sync GLXEW_GET_VAR(__GLXEW_SGI_video_sync)
966
967#endif /* GLX_SGI_video_sync */
968
969/* --------------------- GLX_SUN_get_transparent_index --------------------- */
970
971#ifndef GLX_SUN_get_transparent_index
972#define GLX_SUN_get_transparent_index 1
973
974typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display* dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
975
976#define glXGetTransparentIndexSUN GLXEW_GET_FUN(__glewXGetTransparentIndexSUN)
977
978#define GLXEW_SUN_get_transparent_index GLXEW_GET_VAR(__GLXEW_SUN_get_transparent_index)
979
980#endif /* GLX_SUN_get_transparent_index */
981
982/* -------------------------- GLX_SUN_video_resize ------------------------- */
983
984#ifndef GLX_SUN_video_resize
985#define GLX_SUN_video_resize 1
986
987#define GLX_VIDEO_RESIZE_SUN 0x8171
988#define GL_VIDEO_RESIZE_COMPENSATION_SUN 0x85CD
989
990typedef int ( * PFNGLXGETVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float* factor);
991typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float factor);
992
993#define glXGetVideoResizeSUN GLXEW_GET_FUN(__glewXGetVideoResizeSUN)
994#define glXVideoResizeSUN GLXEW_GET_FUN(__glewXVideoResizeSUN)
995
996#define GLXEW_SUN_video_resize GLXEW_GET_VAR(__GLXEW_SUN_video_resize)
997
998#endif /* GLX_SUN_video_resize */
999
1000/* ------------------------------------------------------------------------- */
1001
1002#ifdef GLEW_MX
1003#define GLXEW_EXPORT
1004#else
1005#define GLXEW_EXPORT extern
1006#endif /* GLEW_MX */
1007
1008extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
1009
1010extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
1011extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
1012extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
1013extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
1014extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
1015extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
1016extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
1017extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
1018extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
1019extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
1020extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
1021extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
1022extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
1023extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
1024extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
1025extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
1026extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
1027
1028extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
1029extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
1030extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
1031
1032extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
1033extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
1034extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
1035extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
1036
1037extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
1038
1039extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
1040
1041extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
1042
1043extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
1044
1045extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
1046
1047extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
1048extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
1049
1050#ifdef GLX_OML_sync_control
1051extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
1052extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
1053extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
1054extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
1055extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
1056#endif
1057
1058extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
1059extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
1060extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
1061extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
1062extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
1063extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
1064
1065extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
1066extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
1067extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
1068extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
1069extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
1070extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
1071extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
1072extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
1073
1074extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
1075extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
1076extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
1077extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
1078extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
1079
1080extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
1081extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
1082
1083extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
1084
1085extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
1086extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
1087extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
1088extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
1089extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
1090
1091extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
1092
1093extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
1094extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
1095
1096extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
1097
1098extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
1099extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
1100
1101extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
1102
1103extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
1104extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
1105
1106#if defined(GLEW_MX)
1107struct GLXEWContextStruct
1108{
1109#endif /* GLEW_MX */
1110
1111GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;
1112GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;
1113GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
1114GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
1115GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
1116GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
1117GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
1118GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
1119GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
1120GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
1121GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
1122GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
1123GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
1124GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
1125GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
1126GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
1127GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
1128GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
1129GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
1130GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
1131GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
1132GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
1133GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
1134GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
1135GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
1136GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
1137GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
1138GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
1139GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
1140GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
1141GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
1142GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
1143GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
1144GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
1145GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
1146GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize;
1147GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
1148GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion;
1149GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read;
1150GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control;
1151GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync;
1152GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
1153GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
1154
1155#ifdef GLEW_MX
1156}; /* GLXEWContextStruct */
1157#endif /* GLEW_MX */
1158
1159/* ------------------------------------------------------------------------ */
1160
1161#ifdef GLEW_MX
1162
1163typedef struct GLXEWContextStruct GLXEWContext;
1164extern GLenum glxewContextInit (GLXEWContext* ctx);
1165extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
1166
1167#define glxewInit() glxewContextInit(glxewGetContext())
1168#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
1169
1170#define GLXEW_GET_VAR(x) (*(const GLboolean*)&(glxewGetContext()->x))
1171#define GLXEW_GET_FUN(x) x
1172
1173#else /* GLEW_MX */
1174
1175#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
1176#define GLXEW_GET_FUN(x) x
1177
1178extern GLboolean glxewIsSupported (const char* name);
1179
1180#endif /* GLEW_MX */
1181
1182extern GLboolean glxewGetExtension (const char* name);
1183
1184#ifdef __cplusplus
1185}
1186#endif
1187
1188#endif /* __glxew_h__ */
Note: See TracBrowser for help on using the repository browser.