9 ** License Applicability. Except to the extent portions of this file are
10 ** made subject to an alternative license as permitted in the SGI Free
11 ** Software License B, Version 1.1 (the "License"), the contents of this
12 ** file are subject only to the provisions of the License. You may not use
13 ** this file except in compliance with the License. You may obtain a copy
14 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
15 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
17 ** http://oss.sgi.com/projects/FreeB
19 ** Note that, as provided in the License, the Software is distributed on an
20 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
21 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
23 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
25 ** Original Code. The Original Code is: OpenGL Sample Implementation,
26 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
27 ** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
28 ** Copyright in any portions created by third parties is as indicated
29 ** elsewhere herein. All Rights Reserved.
31 ** Additional Notice Provisions: This software was created using the
32 ** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
33 ** not been independently verified as being compliant with the OpenGL(R)
34 ** version 1.2.1 Specification.
37 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
38 #define WIN32_LEAN_AND_MEAN 1
46 #define APIENTRYP APIENTRY *
52 /*************************************************************/
54 /* Header file version number, required by OpenGL ABI for Linux */
55 /* glxext.h last updated 2004/07/26 */
56 /* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
57 #define GLX_GLXEXT_VERSION 6
59 #ifndef GLX_VERSION_1_3
60 #define GLX_WINDOW_BIT 0x00000001
61 #define GLX_PIXMAP_BIT 0x00000002
62 #define GLX_PBUFFER_BIT 0x00000004
63 #define GLX_RGBA_BIT 0x00000001
64 #define GLX_COLOR_INDEX_BIT 0x00000002
65 #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
66 #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
67 #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
68 #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
69 #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
70 #define GLX_AUX_BUFFERS_BIT 0x00000010
71 #define GLX_DEPTH_BUFFER_BIT 0x00000020
72 #define GLX_STENCIL_BUFFER_BIT 0x00000040
73 #define GLX_ACCUM_BUFFER_BIT 0x00000080
74 #define GLX_CONFIG_CAVEAT 0x20
75 #define GLX_X_VISUAL_TYPE 0x22
76 #define GLX_TRANSPARENT_TYPE 0x23
77 #define GLX_TRANSPARENT_INDEX_VALUE 0x24
78 #define GLX_TRANSPARENT_RED_VALUE 0x25
79 #define GLX_TRANSPARENT_GREEN_VALUE 0x26
80 #define GLX_TRANSPARENT_BLUE_VALUE 0x27
81 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
82 #define GLX_DONT_CARE 0xFFFFFFFF
83 #define GLX_NONE 0x8000
84 #define GLX_SLOW_CONFIG 0x8001
85 #define GLX_TRUE_COLOR 0x8002
86 #define GLX_DIRECT_COLOR 0x8003
87 #define GLX_PSEUDO_COLOR 0x8004
88 #define GLX_STATIC_COLOR 0x8005
89 #define GLX_GRAY_SCALE 0x8006
90 #define GLX_STATIC_GRAY 0x8007
91 #define GLX_TRANSPARENT_RGB 0x8008
92 #define GLX_TRANSPARENT_INDEX 0x8009
93 #define GLX_VISUAL_ID 0x800B
94 #define GLX_SCREEN 0x800C
95 #define GLX_NON_CONFORMANT_CONFIG 0x800D
96 #define GLX_DRAWABLE_TYPE 0x8010
97 #define GLX_RENDER_TYPE 0x8011
98 #define GLX_X_RENDERABLE 0x8012
99 #define GLX_FBCONFIG_ID 0x8013
100 #define GLX_RGBA_TYPE 0x8014
101 #define GLX_COLOR_INDEX_TYPE 0x8015
102 #define GLX_MAX_PBUFFER_WIDTH 0x8016
103 #define GLX_MAX_PBUFFER_HEIGHT 0x8017
104 #define GLX_MAX_PBUFFER_PIXELS 0x8018
105 #define GLX_PRESERVED_CONTENTS 0x801B
106 #define GLX_LARGEST_PBUFFER 0x801C
107 #define GLX_WIDTH 0x801D
108 #define GLX_HEIGHT 0x801E
109 #define GLX_EVENT_MASK 0x801F
110 #define GLX_DAMAGED 0x8020
111 #define GLX_SAVED 0x8021
112 #define GLX_WINDOW 0x8022
113 #define GLX_PBUFFER 0x8023
114 #define GLX_PBUFFER_HEIGHT 0x8040
115 #define GLX_PBUFFER_WIDTH 0x8041
118 #ifndef GLX_VERSION_1_4
119 #define GLX_SAMPLE_BUFFERS 100000
120 #define GLX_SAMPLES 100001
123 #ifndef GLX_ARB_get_proc_address
126 #ifndef GLX_ARB_multisample
127 #define GLX_SAMPLE_BUFFERS_ARB 100000
128 #define GLX_SAMPLES_ARB 100001
131 #ifndef GLX_SGIS_multisample
132 #define GLX_SAMPLE_BUFFERS_SGIS 100000
133 #define GLX_SAMPLES_SGIS 100001
136 #ifndef GLX_EXT_visual_info
137 #define GLX_X_VISUAL_TYPE_EXT 0x22
138 #define GLX_TRANSPARENT_TYPE_EXT 0x23
139 #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
140 #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
141 #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
142 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
143 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
144 #define GLX_NONE_EXT 0x8000
145 #define GLX_TRUE_COLOR_EXT 0x8002
146 #define GLX_DIRECT_COLOR_EXT 0x8003
147 #define GLX_PSEUDO_COLOR_EXT 0x8004
148 #define GLX_STATIC_COLOR_EXT 0x8005
149 #define GLX_GRAY_SCALE_EXT 0x8006
150 #define GLX_STATIC_GRAY_EXT 0x8007
151 #define GLX_TRANSPARENT_RGB_EXT 0x8008
152 #define GLX_TRANSPARENT_INDEX_EXT 0x8009
155 #ifndef GLX_SGI_swap_control
158 #ifndef GLX_SGI_video_sync
161 #ifndef GLX_SGI_make_current_read
164 #ifndef GLX_SGIX_video_source
167 #ifndef GLX_EXT_visual_rating
168 #define GLX_VISUAL_CAVEAT_EXT 0x20
169 #define GLX_SLOW_VISUAL_EXT 0x8001
170 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
171 /* reuse GLX_NONE_EXT */
174 #ifndef GLX_EXT_import_context
175 #define GLX_SHARE_CONTEXT_EXT 0x800A
176 #define GLX_VISUAL_ID_EXT 0x800B
177 #define GLX_SCREEN_EXT 0x800C
180 #ifndef GLX_SGIX_fbconfig
181 #define GLX_WINDOW_BIT_SGIX 0x00000001
182 #define GLX_PIXMAP_BIT_SGIX 0x00000002
183 #define GLX_RGBA_BIT_SGIX 0x00000001
184 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
185 #define GLX_DRAWABLE_TYPE_SGIX 0x8010
186 #define GLX_RENDER_TYPE_SGIX 0x8011
187 #define GLX_X_RENDERABLE_SGIX 0x8012
188 #define GLX_FBCONFIG_ID_SGIX 0x8013
189 #define GLX_RGBA_TYPE_SGIX 0x8014
190 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
191 /* reuse GLX_SCREEN_EXT */
194 #ifndef GLX_SGIX_pbuffer
195 #define GLX_PBUFFER_BIT_SGIX 0x00000004
196 #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
197 #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
198 #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
199 #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
200 #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
201 #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
202 #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
203 #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
204 #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
205 #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
206 #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
207 #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
208 #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
209 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
210 #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
211 #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
212 #define GLX_LARGEST_PBUFFER_SGIX 0x801C
213 #define GLX_WIDTH_SGIX 0x801D
214 #define GLX_HEIGHT_SGIX 0x801E
215 #define GLX_EVENT_MASK_SGIX 0x801F
216 #define GLX_DAMAGED_SGIX 0x8020
217 #define GLX_SAVED_SGIX 0x8021
218 #define GLX_WINDOW_SGIX 0x8022
219 #define GLX_PBUFFER_SGIX 0x8023
222 #ifndef GLX_SGI_cushion
225 #ifndef GLX_SGIX_video_resize
226 #define GLX_SYNC_FRAME_SGIX 0x00000000
227 #define GLX_SYNC_SWAP_SGIX 0x00000001
230 #ifndef GLX_SGIX_dmbuffer
231 #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
234 #ifndef GLX_SGIX_swap_group
237 #ifndef GLX_SGIX_swap_barrier
240 #ifndef GLX_SGIS_blended_overlay
241 #define GLX_BLENDED_RGBA_SGIS 0x8025
244 #ifndef GLX_SGIS_shared_multisample
245 #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
246 #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
249 #ifndef GLX_SUN_get_transparent_index
252 #ifndef GLX_3DFX_multisample
253 #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
254 #define GLX_SAMPLES_3DFX 0x8051
257 #ifndef GLX_MESA_copy_sub_buffer
260 #ifndef GLX_MESA_pixmap_colormap
263 #ifndef GLX_MESA_release_buffers
266 #ifndef GLX_MESA_set_3dfx_mode
267 #define GLX_3DFX_WINDOW_MODE_MESA 0x1
268 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
271 #ifndef GLX_SGIX_visual_select_group
272 #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
275 #ifndef GLX_OML_swap_method
276 #define GLX_SWAP_METHOD_OML 0x8060
277 #define GLX_SWAP_EXCHANGE_OML 0x8061
278 #define GLX_SWAP_COPY_OML 0x8062
279 #define GLX_SWAP_UNDEFINED_OML 0x8063
282 #ifndef GLX_OML_sync_control
285 #ifndef GLX_SGIX_hyperpipe_group
286 #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
287 #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
288 #define GLX_BAD_HYPERPIPE_SGIX 92
289 #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
290 #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
291 #define GLX_PIPE_RECT_SGIX 0x00000001
292 #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
293 #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
294 #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
295 #define GLX_HYPERPIPE_ID_SGIX 0x8030
298 #ifndef GLX_MESA_agp_offset
302 /*************************************************************/
304 #ifndef GLX_ARB_get_proc_address
305 typedef void (*__GLXextFuncPtr
)(void);
308 #ifndef GLX_SGIX_video_source
309 typedef XID GLXVideoSourceSGIX
;
312 #ifndef GLX_SGIX_fbconfig
313 typedef XID GLXFBConfigIDSGIX
;
314 typedef struct __GLXFBConfigRec
*GLXFBConfigSGIX
;
317 #ifndef GLX_SGIX_pbuffer
318 typedef XID GLXPbufferSGIX
;
321 unsigned long serial
; /* # of last request processed by server */
322 Bool send_event
; /* true if this came for SendEvent request */
323 Display
*display
; /* display the event was read from */
324 GLXDrawable drawable
; /* i.d. of Drawable */
325 int event_type
; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
326 int draw_type
; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
327 unsigned int mask
; /* mask indicating which buffers are affected*/
330 int count
; /* if nonzero, at least this many more */
331 } GLXBufferClobberEventSGIX
;
334 #ifndef GLX_VERSION_1_3
335 #define GLX_VERSION_1_3 1
336 #ifdef GLX_GLXEXT_PROTOTYPES
337 extern GLXFBConfig
* glXGetFBConfigs (Display
*, int, int *);
338 extern GLXFBConfig
* glXChooseFBConfig (Display
*, int, const int *, int *);
339 extern int glXGetFBConfigAttrib (Display
*, GLXFBConfig
, int, int *);
340 extern XVisualInfo
* glXGetVisualFromFBConfig (Display
*, GLXFBConfig
);
341 extern GLXWindow
glXCreateWindow (Display
*, GLXFBConfig
, Window
, const int *);
342 extern void glXDestroyWindow (Display
*, GLXWindow
);
343 extern GLXPixmap
glXCreatePixmap (Display
*, GLXFBConfig
, Pixmap
, const int *);
344 extern void glXDestroyPixmap (Display
*, GLXPixmap
);
345 extern GLXPbuffer
glXCreatePbuffer (Display
*, GLXFBConfig
, const int *);
346 extern void glXDestroyPbuffer (Display
*, GLXPbuffer
);
347 extern void glXQueryDrawable (Display
*, GLXDrawable
, int, unsigned int *);
348 extern GLXContext
glXCreateNewContext (Display
*, GLXFBConfig
, int, GLXContext
, Bool
);
349 extern Bool
glXMakeContextCurrent (Display
*, GLXDrawable
, GLXDrawable
, GLXContext
);
350 extern GLXDrawable
glXGetCurrentReadDrawable (void);
351 extern Display
* glXGetCurrentDisplay (void);
352 extern int glXQueryContext (Display
*, GLXContext
, int, int *);
353 extern void glXSelectEvent (Display
*, GLXDrawable
, unsigned long);
354 extern void glXGetSelectedEvent (Display
*, GLXDrawable
, unsigned long *);
355 #endif /* GLX_GLXEXT_PROTOTYPES */
356 typedef GLXFBConfig
* ( * PFNGLXGETFBCONFIGSPROC
) (Display
*dpy
, int screen
, int *nelements
);
357 typedef GLXFBConfig
* ( * PFNGLXCHOOSEFBCONFIGPROC
) (Display
*dpy
, int screen
, const int *attrib_list
, int *nelements
);
358 typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC
) (Display
*dpy
, GLXFBConfig config
, int attribute
, int *value
);
359 typedef XVisualInfo
* ( * PFNGLXGETVISUALFROMFBCONFIGPROC
) (Display
*dpy
, GLXFBConfig config
);
360 typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC
) (Display
*dpy
, GLXFBConfig config
, Window win
, const int *attrib_list
);
361 typedef void ( * PFNGLXDESTROYWINDOWPROC
) (Display
*dpy
, GLXWindow win
);
362 typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC
) (Display
*dpy
, GLXFBConfig config
, Pixmap pixmap
, const int *attrib_list
);
363 typedef void ( * PFNGLXDESTROYPIXMAPPROC
) (Display
*dpy
, GLXPixmap pixmap
);
364 typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC
) (Display
*dpy
, GLXFBConfig config
, const int *attrib_list
);
365 typedef void ( * PFNGLXDESTROYPBUFFERPROC
) (Display
*dpy
, GLXPbuffer pbuf
);
366 typedef void ( * PFNGLXQUERYDRAWABLEPROC
) (Display
*dpy
, GLXDrawable draw
, int attribute
, unsigned int *value
);
367 typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC
) (Display
*dpy
, GLXFBConfig config
, int render_type
, GLXContext share_list
, Bool direct
);
368 typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC
) (Display
*dpy
, GLXDrawable draw
, GLXDrawable read
, GLXContext ctx
);
369 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC
) (void);
370 typedef Display
* ( * PFNGLXGETCURRENTDISPLAYPROC
) (void);
371 typedef int ( * PFNGLXQUERYCONTEXTPROC
) (Display
*dpy
, GLXContext ctx
, int attribute
, int *value
);
372 typedef void ( * PFNGLXSELECTEVENTPROC
) (Display
*dpy
, GLXDrawable draw
, unsigned long event_mask
);
373 typedef void ( * PFNGLXGETSELECTEDEVENTPROC
) (Display
*dpy
, GLXDrawable draw
, unsigned long *event_mask
);
376 #ifndef GLX_VERSION_1_4
377 #define GLX_VERSION_1_4 1
378 #ifdef GLX_GLXEXT_PROTOTYPES
379 extern __GLXextFuncPtr
glXGetProcAddress (const GLubyte
*);
380 #endif /* GLX_GLXEXT_PROTOTYPES */
381 typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC
) (const GLubyte
*procName
);
384 #ifndef GLX_ARB_get_proc_address
385 #define GLX_ARB_get_proc_address 1
386 #ifdef GLX_GLXEXT_PROTOTYPES
387 extern __GLXextFuncPtr
glXGetProcAddressARB (const GLubyte
*);
388 #endif /* GLX_GLXEXT_PROTOTYPES */
389 typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC
) (const GLubyte
*procName
);
392 #ifndef GLX_ARB_multisample
393 #define GLX_ARB_multisample 1
396 #ifndef GLX_SGIS_multisample
397 #define GLX_SGIS_multisample 1
400 #ifndef GLX_EXT_visual_info
401 #define GLX_EXT_visual_info 1
404 #ifndef GLX_SGI_swap_control
405 #define GLX_SGI_swap_control 1
406 #ifdef GLX_GLXEXT_PROTOTYPES
407 extern int glXSwapIntervalSGI (int);
408 #endif /* GLX_GLXEXT_PROTOTYPES */
409 typedef int ( * PFNGLXSWAPINTERVALSGIPROC
) (int interval
);
412 #ifndef GLX_SGI_video_sync
413 #define GLX_SGI_video_sync 1
414 #ifdef GLX_GLXEXT_PROTOTYPES
415 extern int glXGetVideoSyncSGI (unsigned int *);
416 extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
417 #endif /* GLX_GLXEXT_PROTOTYPES */
418 typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC
) (unsigned int *count
);
419 typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC
) (int divisor
, int remainder
, unsigned int *count
);
422 #ifndef GLX_SGI_make_current_read
423 #define GLX_SGI_make_current_read 1
424 #ifdef GLX_GLXEXT_PROTOTYPES
425 extern Bool
glXMakeCurrentReadSGI (Display
*, GLXDrawable
, GLXDrawable
, GLXContext
);
426 extern GLXDrawable
glXGetCurrentReadDrawableSGI (void);
427 #endif /* GLX_GLXEXT_PROTOTYPES */
428 typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC
) (Display
*dpy
, GLXDrawable draw
, GLXDrawable read
, GLXContext ctx
);
429 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC
) (void);
432 #ifndef GLX_SGIX_video_source
433 #define GLX_SGIX_video_source 1
435 #ifdef GLX_GLXEXT_PROTOTYPES
436 extern GLXVideoSourceSGIX
glXCreateGLXVideoSourceSGIX (Display
*, int, VLServer
, VLPath
, int, VLNode
);
437 extern void glXDestroyGLXVideoSourceSGIX (Display
*, GLXVideoSourceSGIX
);
438 #endif /* GLX_GLXEXT_PROTOTYPES */
439 typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC
) (Display
*display
, int screen
, VLServer server
, VLPath path
, int nodeClass
, VLNode drainNode
);
440 typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC
) (Display
*dpy
, GLXVideoSourceSGIX glxvideosource
);
444 #ifndef GLX_EXT_visual_rating
445 #define GLX_EXT_visual_rating 1
448 #ifndef GLX_EXT_import_context
449 #define GLX_EXT_import_context 1
450 #ifdef GLX_GLXEXT_PROTOTYPES
451 extern Display
* glXGetCurrentDisplayEXT (void);
452 extern int glXQueryContextInfoEXT (Display
*, GLXContext
, int, int *);
453 extern GLXContextID
glXGetContextIDEXT (const GLXContext
);
454 extern GLXContext
glXImportContextEXT (Display
*, GLXContextID
);
455 extern void glXFreeContextEXT (Display
*, GLXContext
);
456 #endif /* GLX_GLXEXT_PROTOTYPES */
457 typedef Display
* ( * PFNGLXGETCURRENTDISPLAYEXTPROC
) (void);
458 typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC
) (Display
*dpy
, GLXContext context
, int attribute
, int *value
);
459 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC
) (const GLXContext context
);
460 typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC
) (Display
*dpy
, GLXContextID contextID
);
461 typedef void ( * PFNGLXFREECONTEXTEXTPROC
) (Display
*dpy
, GLXContext context
);
464 #ifndef GLX_SGIX_fbconfig
465 #define GLX_SGIX_fbconfig 1
466 #ifdef GLX_GLXEXT_PROTOTYPES
467 extern int glXGetFBConfigAttribSGIX (Display
*, GLXFBConfigSGIX
, int, int *);
468 extern GLXFBConfigSGIX
* glXChooseFBConfigSGIX (Display
*, int, int *, int *);
469 extern GLXPixmap
glXCreateGLXPixmapWithConfigSGIX (Display
*, GLXFBConfigSGIX
, Pixmap
);
470 extern GLXContext
glXCreateContextWithConfigSGIX (Display
*, GLXFBConfigSGIX
, int, GLXContext
, Bool
);
471 extern XVisualInfo
* glXGetVisualFromFBConfigSGIX (Display
*, GLXFBConfigSGIX
);
472 extern GLXFBConfigSGIX
glXGetFBConfigFromVisualSGIX (Display
*, XVisualInfo
*);
473 #endif /* GLX_GLXEXT_PROTOTYPES */
474 typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, int attribute
, int *value
);
475 typedef GLXFBConfigSGIX
* ( * PFNGLXCHOOSEFBCONFIGSGIXPROC
) (Display
*dpy
, int screen
, int *attrib_list
, int *nelements
);
476 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, Pixmap pixmap
);
477 typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, int render_type
, GLXContext share_list
, Bool direct
);
478 typedef XVisualInfo
* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
);
479 typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC
) (Display
*dpy
, XVisualInfo
*vis
);
482 #ifndef GLX_SGIX_pbuffer
483 #define GLX_SGIX_pbuffer 1
484 #ifdef GLX_GLXEXT_PROTOTYPES
485 extern GLXPbufferSGIX
glXCreateGLXPbufferSGIX (Display
*, GLXFBConfigSGIX
, unsigned int, unsigned int, int *);
486 extern void glXDestroyGLXPbufferSGIX (Display
*, GLXPbufferSGIX
);
487 extern int glXQueryGLXPbufferSGIX (Display
*, GLXPbufferSGIX
, int, unsigned int *);
488 extern void glXSelectEventSGIX (Display
*, GLXDrawable
, unsigned long);
489 extern void glXGetSelectedEventSGIX (Display
*, GLXDrawable
, unsigned long *);
490 #endif /* GLX_GLXEXT_PROTOTYPES */
491 typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, unsigned int width
, unsigned int height
, int *attrib_list
);
492 typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuf
);
493 typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuf
, int attribute
, unsigned int *value
);
494 typedef void ( * PFNGLXSELECTEVENTSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, unsigned long mask
);
495 typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, unsigned long *mask
);
498 #ifndef GLX_SGI_cushion
499 #define GLX_SGI_cushion 1
500 #ifdef GLX_GLXEXT_PROTOTYPES
501 extern void glXCushionSGI (Display
*, Window
, float);
502 #endif /* GLX_GLXEXT_PROTOTYPES */
503 typedef void ( * PFNGLXCUSHIONSGIPROC
) (Display
*dpy
, Window window
, float cushion
);
506 #ifndef GLX_SGIX_video_resize
507 #define GLX_SGIX_video_resize 1
508 #ifdef GLX_GLXEXT_PROTOTYPES
509 extern int glXBindChannelToWindowSGIX (Display
*, int, int, Window
);
510 extern int glXChannelRectSGIX (Display
*, int, int, int, int, int, int);
511 extern int glXQueryChannelRectSGIX (Display
*, int, int, int *, int *, int *, int *);
512 extern int glXQueryChannelDeltasSGIX (Display
*, int, int, int *, int *, int *, int *);
513 extern int glXChannelRectSyncSGIX (Display
*, int, int, GLenum
);
514 #endif /* GLX_GLXEXT_PROTOTYPES */
515 typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC
) (Display
*display
, int screen
, int channel
, Window window
);
516 typedef int ( * PFNGLXCHANNELRECTSGIXPROC
) (Display
*display
, int screen
, int channel
, int x
, int y
, int w
, int h
);
517 typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC
) (Display
*display
, int screen
, int channel
, int *dx
, int *dy
, int *dw
, int *dh
);
518 typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC
) (Display
*display
, int screen
, int channel
, int *x
, int *y
, int *w
, int *h
);
519 typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC
) (Display
*display
, int screen
, int channel
, GLenum synctype
);
522 #ifndef GLX_SGIX_dmbuffer
523 #define GLX_SGIX_dmbuffer 1
525 #ifdef GLX_GLXEXT_PROTOTYPES
526 extern Bool
glXAssociateDMPbufferSGIX (Display
*, GLXPbufferSGIX
, DMparams
*, DMbuffer
);
527 #endif /* GLX_GLXEXT_PROTOTYPES */
528 typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuffer
, DMparams
*params
, DMbuffer dmbuffer
);
529 #endif /* _DM_BUFFER_H_ */
532 #ifndef GLX_SGIX_swap_group
533 #define GLX_SGIX_swap_group 1
534 #ifdef GLX_GLXEXT_PROTOTYPES
535 extern void glXJoinSwapGroupSGIX (Display
*, GLXDrawable
, GLXDrawable
);
536 #endif /* GLX_GLXEXT_PROTOTYPES */
537 typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, GLXDrawable member
);
540 #ifndef GLX_SGIX_swap_barrier
541 #define GLX_SGIX_swap_barrier 1
542 #ifdef GLX_GLXEXT_PROTOTYPES
543 extern void glXBindSwapBarrierSGIX (Display
*, GLXDrawable
, int);
544 extern Bool
glXQueryMaxSwapBarriersSGIX (Display
*, int, int *);
545 #endif /* GLX_GLXEXT_PROTOTYPES */
546 typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, int barrier
);
547 typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC
) (Display
*dpy
, int screen
, int *max
);
550 #ifndef GLX_SUN_get_transparent_index
551 #define GLX_SUN_get_transparent_index 1
552 #ifdef GLX_GLXEXT_PROTOTYPES
553 extern Status
glXGetTransparentIndexSUN (Display
*, Window
, Window
, long *);
554 #endif /* GLX_GLXEXT_PROTOTYPES */
555 typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC
) (Display
*dpy
, Window overlay
, Window underlay
, long *pTransparentIndex
);
558 #ifndef GLX_MESA_copy_sub_buffer
559 #define GLX_MESA_copy_sub_buffer 1
560 #ifdef GLX_GLXEXT_PROTOTYPES
561 extern void glXCopySubBufferMESA (Display
*, GLXDrawable
, int, int, int, int);
562 #endif /* GLX_GLXEXT_PROTOTYPES */
563 typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC
) (Display
*dpy
, GLXDrawable drawable
, int x
, int y
, int width
, int height
);
566 #ifndef GLX_MESA_pixmap_colormap
567 #define GLX_MESA_pixmap_colormap 1
568 #ifdef GLX_GLXEXT_PROTOTYPES
569 extern GLXPixmap
glXCreateGLXPixmapMESA (Display
*, XVisualInfo
*, Pixmap
, Colormap
);
570 #endif /* GLX_GLXEXT_PROTOTYPES */
571 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC
) (Display
*dpy
, XVisualInfo
*visual
, Pixmap pixmap
, Colormap cmap
);
574 #ifndef GLX_MESA_release_buffers
575 #define GLX_MESA_release_buffers 1
576 #ifdef GLX_GLXEXT_PROTOTYPES
577 extern Bool
glXReleaseBuffersMESA (Display
*, GLXDrawable
);
578 #endif /* GLX_GLXEXT_PROTOTYPES */
579 typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC
) (Display
*dpy
, GLXDrawable drawable
);
582 #ifndef GLX_MESA_set_3dfx_mode
583 #define GLX_MESA_set_3dfx_mode 1
584 #ifdef GLX_GLXEXT_PROTOTYPES
585 extern Bool
glXSet3DfxModeMESA (int);
586 #endif /* GLX_GLXEXT_PROTOTYPES */
587 typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC
) (int mode
);
590 #ifndef GLX_SGIX_visual_select_group
591 #define GLX_SGIX_visual_select_group 1
594 #ifndef GLX_OML_swap_method
595 #define GLX_OML_swap_method 1
598 #ifndef GLX_OML_sync_control
599 #define GLX_OML_sync_control 1
600 #if defined(__STDC_VERSION__)
601 #if __STDC_VERSION__ >= 199901L
602 /* Include ISO C99 integer types for OML_sync_control; need a better test */
603 #include <inttypes.h>
605 #ifdef GLX_GLXEXT_PROTOTYPES
606 extern Bool
glXGetSyncValuesOML (Display
*, GLXDrawable
, int64_t *, int64_t *, int64_t *);
607 extern Bool
glXGetMscRateOML (Display
*, GLXDrawable
, int32_t *, int32_t *);
608 extern int64_t glXSwapBuffersMscOML (Display
*, GLXDrawable
, int64_t, int64_t, int64_t);
609 extern Bool
glXWaitForMscOML (Display
*, GLXDrawable
, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
610 extern Bool
glXWaitForSbcOML (Display
*, GLXDrawable
, int64_t, int64_t *, int64_t *, int64_t *);
611 #endif /* GLX_GLXEXT_PROTOTYPES */
612 typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int64_t *ust
, int64_t *msc
, int64_t *sbc
);
613 typedef Bool ( * PFNGLXGETMSCRATEOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int32_t *numerator
, int32_t *denominator
);
614 typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int64_t target_msc
, int64_t divisor
, int64_t remainder
);
615 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
);
616 typedef Bool ( * PFNGLXWAITFORSBCOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int64_t target_sbc
, int64_t *ust
, int64_t *msc
, int64_t *sbc
);
617 #endif /* C99 version test */
618 #endif /* STDC test */
621 #ifndef GLX_SGIX_hyperpipe_group
622 #define GLX_SGIX_hyperpipe_group 1
625 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
627 } GLXHyperpipeNetworkSGIX
;
630 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
635 } GLXHyperpipeConfigSGIX
;
638 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
639 int srcXOrigin
, srcYOrigin
, srcWidth
, srcHeight
;
640 int destXOrigin
, destYOrigin
, destWidth
, destHeight
;
644 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
645 int XOrigin
, YOrigin
, maxHeight
, maxWidth
;
648 #ifdef GLX_GLXEXT_PROTOTYPES
649 extern GLXHyperpipeNetworkSGIX
* glXQueryHyperpipeNetworkSGIX (Display
*, int *);
650 extern int glXHyperpipeConfigSGIX (Display
*, int, int, GLXHyperpipeConfigSGIX
*, int *);
651 extern GLXHyperpipeConfigSGIX
* glXQueryHyperpipeConfigSGIX (Display
*, int, int *);
652 extern int glXDestroyHyperpipeConfigSGIX (Display
*, int);
653 extern int glXBindHyperpipeSGIX (Display
*, int);
654 extern int glXQueryHyperpipeBestAttribSGIX (Display
*, int, int, int, void *, void *);
655 extern int glXHyperpipeAttribSGIX (Display
*, int, int, int, void *);
656 extern int glXQueryHyperpipeAttribSGIX (Display
*, int, int, int, void *);
657 #endif /* GLX_GLXEXT_PROTOTYPES */
658 typedef GLXHyperpipeNetworkSGIX
* ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC
) (Display
*dpy
, int *npipes
);
659 typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC
) (Display
*dpy
, int networkId
, int npipes
, GLXHyperpipeConfigSGIX
*cfg
, int *hpId
);
660 typedef GLXHyperpipeConfigSGIX
* ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC
) (Display
*dpy
, int hpId
, int *npipes
);
661 typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC
) (Display
*dpy
, int hpId
);
662 typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC
) (Display
*dpy
, int hpId
);
663 typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC
) (Display
*dpy
, int timeSlice
, int attrib
, int size
, void *attribList
, void *returnAttribList
);
664 typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC
) (Display
*dpy
, int timeSlice
, int attrib
, int size
, void *attribList
);
665 typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC
) (Display
*dpy
, int timeSlice
, int attrib
, int size
, void *returnAttribList
);
668 #ifndef GLX_MESA_agp_offset
669 #define GLX_MESA_agp_offset 1
670 #ifdef GLX_GLXEXT_PROTOTYPES
671 extern unsigned int glXGetAGPOffsetMESA (const void *);
672 #endif /* GLX_GLXEXT_PROTOTYPES */
673 typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC
) (const void *pointer
);