1/*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.  Oracle designates this
7 * particular file as subject to the "Classpath" exception as provided
8 * by Oracle in the LICENSE file that accompanied this code.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24
25#ifndef __glxext_h_
26#define __glxext_h_
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/*
33** This file is available under and governed by the GNU General Public
34** License version 2 only, as published by the Free Software Foundation.
35** However, the following notice accompanied the original version of this
36** file:
37**
38** Copyright (c) 2007 The Khronos Group Inc.
39**
40** Permission is hereby granted, free of charge, to any person obtaining a
41** copy of this software and/or associated documentation files (the
42** "Materials"), to deal in the Materials without restriction, including
43** without limitation the rights to use, copy, modify, merge, publish,
44** distribute, sublicense, and/or sell copies of the Materials, and to
45** permit persons to whom the Materials are furnished to do so, subject to
46** the following conditions:
47**
48** The above copyright notice and this permission notice shall be included
49** in all copies or substantial portions of the Materials.
50**
51** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
54** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
55** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
56** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
57** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
58*/
59
60#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
61#define WIN32_LEAN_AND_MEAN 1
62#include <windows.h>
63#endif
64
65#ifndef APIENTRY
66#define APIENTRY
67#endif
68#ifndef GLAPI
69#define GLAPI extern
70#endif
71
72/*************************************************************/
73
74/* Header file version number, required by OpenGL ABI for Linux */
75/* glxext.h last updated 2002/03/22 */
76/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
77#define GLX_GLXEXT_VERSION 5
78
79#ifndef GLX_VERSION_1_3
80#define GLX_WINDOW_BIT                     0x00000001
81#define GLX_PIXMAP_BIT                     0x00000002
82#define GLX_PBUFFER_BIT                    0x00000004
83#define GLX_RGBA_BIT                       0x00000001
84#define GLX_COLOR_INDEX_BIT                0x00000002
85#define GLX_PBUFFER_CLOBBER_MASK           0x08000000
86#define GLX_FRONT_LEFT_BUFFER_BIT          0x00000001
87#define GLX_FRONT_RIGHT_BUFFER_BIT         0x00000002
88#define GLX_BACK_LEFT_BUFFER_BIT           0x00000004
89#define GLX_BACK_RIGHT_BUFFER_BIT          0x00000008
90#define GLX_AUX_BUFFERS_BIT                0x00000010
91#define GLX_DEPTH_BUFFER_BIT               0x00000020
92#define GLX_STENCIL_BUFFER_BIT             0x00000040
93#define GLX_ACCUM_BUFFER_BIT               0x00000080
94#define GLX_CONFIG_CAVEAT                  0x20
95#define GLX_X_VISUAL_TYPE                  0x22
96#define GLX_TRANSPARENT_TYPE               0x23
97#define GLX_TRANSPARENT_INDEX_VALUE        0x24
98#define GLX_TRANSPARENT_RED_VALUE          0x25
99#define GLX_TRANSPARENT_GREEN_VALUE        0x26
100#define GLX_TRANSPARENT_BLUE_VALUE         0x27
101#define GLX_TRANSPARENT_ALPHA_VALUE        0x28
102#define GLX_DONT_CARE                      0xFFFFFFFF
103#define GLX_NONE                           0x8000
104#define GLX_SLOW_CONFIG                    0x8001
105#define GLX_TRUE_COLOR                     0x8002
106#define GLX_DIRECT_COLOR                   0x8003
107#define GLX_PSEUDO_COLOR                   0x8004
108#define GLX_STATIC_COLOR                   0x8005
109#define GLX_GRAY_SCALE                     0x8006
110#define GLX_STATIC_GRAY                    0x8007
111#define GLX_TRANSPARENT_RGB                0x8008
112#define GLX_TRANSPARENT_INDEX              0x8009
113#define GLX_VISUAL_ID                      0x800B
114#define GLX_SCREEN                         0x800C
115#define GLX_NON_CONFORMANT_CONFIG          0x800D
116#define GLX_DRAWABLE_TYPE                  0x8010
117#define GLX_RENDER_TYPE                    0x8011
118#define GLX_X_RENDERABLE                   0x8012
119#define GLX_FBCONFIG_ID                    0x8013
120#define GLX_RGBA_TYPE                      0x8014
121#define GLX_COLOR_INDEX_TYPE               0x8015
122#define GLX_MAX_PBUFFER_WIDTH              0x8016
123#define GLX_MAX_PBUFFER_HEIGHT             0x8017
124#define GLX_MAX_PBUFFER_PIXELS             0x8018
125#define GLX_PRESERVED_CONTENTS             0x801B
126#define GLX_LARGEST_PBUFFER                0x801C
127#define GLX_WIDTH                          0x801D
128#define GLX_HEIGHT                         0x801E
129#define GLX_EVENT_MASK                     0x801F
130#define GLX_DAMAGED                        0x8020
131#define GLX_SAVED                          0x8021
132#define GLX_WINDOW                         0x8022
133#define GLX_PBUFFER                        0x8023
134#define GLX_PBUFFER_HEIGHT                 0x8040
135#define GLX_PBUFFER_WIDTH                  0x8041
136#endif
137
138#ifndef GLX_VERSION_1_4
139#define GLX_SAMPLE_BUFFERS                 100000
140#define GLX_SAMPLES                        100001
141#endif
142
143#ifndef GLX_ARB_get_proc_address
144#endif
145
146#ifndef GLX_ARB_multisample
147#define GLX_SAMPLE_BUFFERS_ARB             100000
148#define GLX_SAMPLES_ARB                    100001
149#endif
150
151#ifndef GLX_SGIS_multisample
152#define GLX_SAMPLE_BUFFERS_SGIS            100000
153#define GLX_SAMPLES_SGIS                   100001
154#endif
155
156#ifndef GLX_EXT_visual_info
157#define GLX_X_VISUAL_TYPE_EXT              0x22
158#define GLX_TRANSPARENT_TYPE_EXT           0x23
159#define GLX_TRANSPARENT_INDEX_VALUE_EXT    0x24
160#define GLX_TRANSPARENT_RED_VALUE_EXT      0x25
161#define GLX_TRANSPARENT_GREEN_VALUE_EXT    0x26
162#define GLX_TRANSPARENT_BLUE_VALUE_EXT     0x27
163#define GLX_TRANSPARENT_ALPHA_VALUE_EXT    0x28
164#define GLX_NONE_EXT                       0x8000
165#define GLX_TRUE_COLOR_EXT                 0x8002
166#define GLX_DIRECT_COLOR_EXT               0x8003
167#define GLX_PSEUDO_COLOR_EXT               0x8004
168#define GLX_STATIC_COLOR_EXT               0x8005
169#define GLX_GRAY_SCALE_EXT                 0x8006
170#define GLX_STATIC_GRAY_EXT                0x8007
171#define GLX_TRANSPARENT_RGB_EXT            0x8008
172#define GLX_TRANSPARENT_INDEX_EXT          0x8009
173#endif
174
175#ifndef GLX_SGI_swap_control
176#endif
177
178#ifndef GLX_SGI_video_sync
179#endif
180
181#ifndef GLX_SGI_make_current_read
182#endif
183
184#ifndef GLX_SGIX_video_source
185#endif
186
187#ifndef GLX_EXT_visual_rating
188#define GLX_VISUAL_CAVEAT_EXT              0x20
189#define GLX_SLOW_VISUAL_EXT                0x8001
190#define GLX_NON_CONFORMANT_VISUAL_EXT      0x800D
191/* reuse GLX_NONE_EXT */
192#endif
193
194#ifndef GLX_EXT_import_context
195#define GLX_SHARE_CONTEXT_EXT              0x800A
196#define GLX_VISUAL_ID_EXT                  0x800B
197#define GLX_SCREEN_EXT                     0x800C
198#endif
199
200#ifndef GLX_SGIX_fbconfig
201#define GLX_WINDOW_BIT_SGIX                0x00000001
202#define GLX_PIXMAP_BIT_SGIX                0x00000002
203#define GLX_RGBA_BIT_SGIX                  0x00000001
204#define GLX_COLOR_INDEX_BIT_SGIX           0x00000002
205#define GLX_DRAWABLE_TYPE_SGIX             0x8010
206#define GLX_RENDER_TYPE_SGIX               0x8011
207#define GLX_X_RENDERABLE_SGIX              0x8012
208#define GLX_FBCONFIG_ID_SGIX               0x8013
209#define GLX_RGBA_TYPE_SGIX                 0x8014
210#define GLX_COLOR_INDEX_TYPE_SGIX          0x8015
211/* reuse GLX_SCREEN_EXT */
212#endif
213
214#ifndef GLX_SGIX_pbuffer
215#define GLX_PBUFFER_BIT_SGIX               0x00000004
216#define GLX_BUFFER_CLOBBER_MASK_SGIX       0x08000000
217#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX     0x00000001
218#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX    0x00000002
219#define GLX_BACK_LEFT_BUFFER_BIT_SGIX      0x00000004
220#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX     0x00000008
221#define GLX_AUX_BUFFERS_BIT_SGIX           0x00000010
222#define GLX_DEPTH_BUFFER_BIT_SGIX          0x00000020
223#define GLX_STENCIL_BUFFER_BIT_SGIX        0x00000040
224#define GLX_ACCUM_BUFFER_BIT_SGIX          0x00000080
225#define GLX_SAMPLE_BUFFERS_BIT_SGIX        0x00000100
226#define GLX_MAX_PBUFFER_WIDTH_SGIX         0x8016
227#define GLX_MAX_PBUFFER_HEIGHT_SGIX        0x8017
228#define GLX_MAX_PBUFFER_PIXELS_SGIX        0x8018
229#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX     0x8019
230#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX    0x801A
231#define GLX_PRESERVED_CONTENTS_SGIX        0x801B
232#define GLX_LARGEST_PBUFFER_SGIX           0x801C
233#define GLX_WIDTH_SGIX                     0x801D
234#define GLX_HEIGHT_SGIX                    0x801E
235#define GLX_EVENT_MASK_SGIX                0x801F
236#define GLX_DAMAGED_SGIX                   0x8020
237#define GLX_SAVED_SGIX                     0x8021
238#define GLX_WINDOW_SGIX                    0x8022
239#define GLX_PBUFFER_SGIX                   0x8023
240#endif
241
242#ifndef GLX_SGI_cushion
243#endif
244
245#ifndef GLX_SGIX_video_resize
246#define GLX_SYNC_FRAME_SGIX                0x00000000
247#define GLX_SYNC_SWAP_SGIX                 0x00000001
248#endif
249
250#ifndef GLX_SGIX_dmbuffer
251#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX     0x8024
252#endif
253
254#ifndef GLX_SGIX_swap_group
255#endif
256
257#ifndef GLX_SGIX_swap_barrier
258#endif
259
260#ifndef GLX_SGIS_blended_overlay
261#define GLX_BLENDED_RGBA_SGIS              0x8025
262#endif
263
264#ifndef GLX_SGIS_shared_multisample
265#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
266#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
267#endif
268
269#ifndef GLX_SUN_get_transparent_index
270#endif
271
272/*
273 * REMIND: This is a Sun-private constant used to get the gamma value for
274 *         a GLXFBConfig.  This was never publically documented as part of
275 *         a Sun extension, and therefore never ended up in the official SGI
276 *         glxext.h header file, so we've copied it here from the Sun OpenGL
277 *         headers (glxtokens.h).
278 */
279#define GLX_GAMMA_VALUE_SUN                0x8173
280
281#ifndef GLX_3DFX_multisample
282#define GLX_SAMPLE_BUFFERS_3DFX            0x8050
283#define GLX_SAMPLES_3DFX                   0x8051
284#endif
285
286#ifndef GLX_MESA_copy_sub_buffer
287#endif
288
289#ifndef GLX_MESA_pixmap_colormap
290#endif
291
292#ifndef GLX_MESA_release_buffers
293#endif
294
295#ifndef GLX_MESA_set_3dfx_mode
296#define GLX_3DFX_WINDOW_MODE_MESA          0x1
297#define GLX_3DFX_FULLSCREEN_MODE_MESA      0x2
298#endif
299
300#ifndef GLX_SGIX_visual_select_group
301#define GLX_VISUAL_SELECT_GROUP_SGIX       0x8028
302#endif
303
304#ifndef GLX_OML_swap_method
305#define GLX_SWAP_METHOD_OML                0x8060
306#define GLX_SWAP_EXCHANGE_OML              0x8061
307#define GLX_SWAP_COPY_OML                  0x8062
308#define GLX_SWAP_UNDEFINED_OML             0x8063
309#endif
310
311#ifndef GLX_OML_sync_control
312#endif
313
314/*************************************************************/
315
316#ifndef GLX_ARB_get_proc_address
317typedef void (*__GLXextFuncPtr)(void);
318#endif
319
320#ifndef GLX_SGIX_video_source
321typedef XID GLXVideoSourceSGIX;
322#endif
323
324#ifndef GLX_SGIX_fbconfig
325typedef XID GLXFBConfigIDSGIX;
326typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
327#endif
328
329#ifndef GLX_SGIX_pbuffer
330typedef XID GLXPbufferSGIX;
331typedef struct {
332    int type;
333    unsigned long serial;         /* # of last request processed by server */
334    Bool send_event;              /* true if this came for SendEvent request */
335    Display *display;             /* display the event was read from */
336    GLXDrawable drawable;         /* i.d. of Drawable */
337    int event_type;               /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
338    int draw_type;                /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
339    unsigned int mask;    /* mask indicating which buffers are affected*/
340    int x, y;
341    int width, height;
342    int count;            /* if nonzero, at least this many more */
343} GLXBufferClobberEventSGIX;
344#endif
345
346#ifndef GLX_VERSION_1_3
347#define GLX_VERSION_1_3 1
348#ifdef GLX_GLXEXT_PROTOTYPES
349extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
350extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
351extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
352extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
353extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
354extern void glXDestroyWindow (Display *, GLXWindow);
355extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
356extern void glXDestroyPixmap (Display *, GLXPixmap);
357extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
358extern void glXDestroyPbuffer (Display *, GLXPbuffer);
359extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
360extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
361extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
362extern GLXDrawable glXGetCurrentReadDrawable (void);
363extern Display * glXGetCurrentDisplay (void);
364extern int glXQueryContext (Display *, GLXContext, int, int *);
365extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
366extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
367#endif /* GLX_GLXEXT_PROTOTYPES */
368typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
369typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
370typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
371typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
372typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
373typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
374typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
375typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
376typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
377typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
378typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
379typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
380typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
381typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
382typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
383typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
384typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
385typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
386#endif
387
388#ifndef GLX_VERSION_1_4
389#define GLX_VERSION_1_4 1
390#ifdef GLX_GLXEXT_PROTOTYPES
391extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
392#endif /* GLX_GLXEXT_PROTOTYPES */
393typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
394#endif
395
396#ifndef GLX_ARB_get_proc_address
397#define GLX_ARB_get_proc_address 1
398#ifdef GLX_GLXEXT_PROTOTYPES
399extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
400#endif /* GLX_GLXEXT_PROTOTYPES */
401typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
402#endif
403
404#ifndef GLX_ARB_multisample
405#define GLX_ARB_multisample 1
406#endif
407
408#ifndef GLX_SGIS_multisample
409#define GLX_SGIS_multisample 1
410#endif
411
412#ifndef GLX_EXT_visual_info
413#define GLX_EXT_visual_info 1
414#endif
415
416#ifndef GLX_SGI_swap_control
417#define GLX_SGI_swap_control 1
418#ifdef GLX_GLXEXT_PROTOTYPES
419extern int glXSwapIntervalSGI (int);
420#endif /* GLX_GLXEXT_PROTOTYPES */
421typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
422#endif
423
424#ifndef GLX_SGI_video_sync
425#define GLX_SGI_video_sync 1
426#ifdef GLX_GLXEXT_PROTOTYPES
427extern int glXGetVideoSyncSGI (unsigned int *);
428extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
429#endif /* GLX_GLXEXT_PROTOTYPES */
430typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
431typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
432#endif
433
434#ifndef GLX_SGI_make_current_read
435#define GLX_SGI_make_current_read 1
436#ifdef GLX_GLXEXT_PROTOTYPES
437extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
438extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
439#endif /* GLX_GLXEXT_PROTOTYPES */
440typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
441typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
442#endif
443
444#ifdef _VL_H
445#ifndef GLX_SGIX_video_source
446#define GLX_SGIX_video_source 1
447#ifdef GLX_GLXEXT_PROTOTYPES
448extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
449extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
450#endif /* GLX_GLXEXT_PROTOTYPES */
451typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
452typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
453#endif
454
455#endif /* _VL_H */
456#ifndef GLX_EXT_visual_rating
457#define GLX_EXT_visual_rating 1
458#endif
459
460#ifndef GLX_EXT_import_context
461#define GLX_EXT_import_context 1
462#ifdef GLX_GLXEXT_PROTOTYPES
463extern Display * glXGetCurrentDisplayEXT (void);
464extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
465extern GLXContextID glXGetContextIDEXT (const GLXContext);
466extern GLXContext glXImportContextEXT (Display *, GLXContextID);
467extern void glXFreeContextEXT (Display *, GLXContext);
468#endif /* GLX_GLXEXT_PROTOTYPES */
469typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
470typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
471typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
472typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
473typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
474#endif
475
476#ifndef GLX_SGIX_fbconfig
477#define GLX_SGIX_fbconfig 1
478#ifdef GLX_GLXEXT_PROTOTYPES
479extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
480extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
481extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
482extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
483extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
484extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
485#endif /* GLX_GLXEXT_PROTOTYPES */
486typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
487typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
488typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
489typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
490typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
491typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
492#endif
493
494#ifndef GLX_SGIX_pbuffer
495#define GLX_SGIX_pbuffer 1
496#ifdef GLX_GLXEXT_PROTOTYPES
497extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
498extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
499extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
500extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
501extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
502#endif /* GLX_GLXEXT_PROTOTYPES */
503typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
504typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
505typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
506typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
507typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
508#endif
509
510#ifndef GLX_SGI_cushion
511#define GLX_SGI_cushion 1
512#ifdef GLX_GLXEXT_PROTOTYPES
513extern void glXCushionSGI (Display *, Window, float);
514#endif /* GLX_GLXEXT_PROTOTYPES */
515typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
516#endif
517
518#ifndef GLX_SGIX_video_resize
519#define GLX_SGIX_video_resize 1
520#ifdef GLX_GLXEXT_PROTOTYPES
521extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
522extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
523extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
524extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
525extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
526#endif /* GLX_GLXEXT_PROTOTYPES */
527typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
528typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
529typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
530typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
531typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
532#endif
533
534#ifdef _DM_BUFFER_H_
535#ifndef GLX_SGIX_dmbuffer
536#define GLX_SGIX_dmbuffer 1
537#ifdef GLX_GLXEXT_PROTOTYPES
538extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
539#endif /* GLX_GLXEXT_PROTOTYPES */
540typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
541#endif
542
543#endif /* _DM_BUFFER_H_ */
544#ifndef GLX_SGIX_swap_group
545#define GLX_SGIX_swap_group 1
546#ifdef GLX_GLXEXT_PROTOTYPES
547extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
548#endif /* GLX_GLXEXT_PROTOTYPES */
549typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
550#endif
551
552#ifndef GLX_SGIX_swap_barrier
553#define GLX_SGIX_swap_barrier 1
554#ifdef GLX_GLXEXT_PROTOTYPES
555extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
556extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
557#endif /* GLX_GLXEXT_PROTOTYPES */
558typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
559typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
560#endif
561
562#ifndef GLX_SUN_get_transparent_index
563#define GLX_SUN_get_transparent_index 1
564#ifdef GLX_GLXEXT_PROTOTYPES
565extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
566#endif /* GLX_GLXEXT_PROTOTYPES */
567typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
568#endif
569
570#ifndef GLX_MESA_copy_sub_buffer
571#define GLX_MESA_copy_sub_buffer 1
572#ifdef GLX_GLXEXT_PROTOTYPES
573extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
574#endif /* GLX_GLXEXT_PROTOTYPES */
575typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
576#endif
577
578#ifndef GLX_MESA_pixmap_colormap
579#define GLX_MESA_pixmap_colormap 1
580#ifdef GLX_GLXEXT_PROTOTYPES
581extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
582#endif /* GLX_GLXEXT_PROTOTYPES */
583typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
584#endif
585
586#ifndef GLX_MESA_release_buffers
587#define GLX_MESA_release_buffers 1
588#ifdef GLX_GLXEXT_PROTOTYPES
589extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
590#endif /* GLX_GLXEXT_PROTOTYPES */
591typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
592#endif
593
594#ifndef GLX_MESA_set_3dfx_mode
595#define GLX_MESA_set_3dfx_mode 1
596#ifdef GLX_GLXEXT_PROTOTYPES
597extern Bool glXSet3DfxModeMESA (int);
598#endif /* GLX_GLXEXT_PROTOTYPES */
599typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
600#endif
601
602#ifndef GLX_SGIX_visual_select_group
603#define GLX_SGIX_visual_select_group 1
604#endif
605
606#ifndef GLX_OML_swap_method
607#define GLX_OML_swap_method 1
608#endif
609
610#if defined(__STDC_VERSION__)
611#if __STDC_VERSION__ >= 199901L
612/* Include ISO C99 integer types for OML_sync_control; need a better test */
613#include <inttypes.h>
614
615#ifndef GLX_OML_sync_control
616#define GLX_OML_sync_control 1
617#ifdef GLX_GLXEXT_PROTOTYPES
618extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
619extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
620extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
621extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
622extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
623#endif /* GLX_GLXEXT_PROTOTYPES */
624typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
625typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
626typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
627typedef 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);
628typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
629#endif
630
631#endif /* C99 version test */
632#endif /* STDC test */
633
634#ifdef __cplusplus
635}
636#endif
637
638#endif
639