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 2009/01/08 */
56 /* Current version at http://www.opengl.org/registry/ */
57 #define GLX_GLXEXT_VERSION 21
59 #ifndef GLX_ARB_get_proc_address
62 #ifndef GLX_ARB_multisample
63 #define GLX_SAMPLE_BUFFERS_ARB 100000
64 #define GLX_SAMPLES_ARB 100001
67 #ifndef GLX_ARB_fbconfig_float
68 #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
69 #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
72 #ifndef GLX_ARB_create_context
73 #define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
74 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
75 #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
76 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
77 #define GLX_CONTEXT_FLAGS_ARB 0x2094
80 #ifndef GLX_SGIS_multisample
81 #define GLX_SAMPLE_BUFFERS_SGIS 100000
82 #define GLX_SAMPLES_SGIS 100001
85 #ifndef GLX_EXT_visual_info
86 #define GLX_X_VISUAL_TYPE_EXT 0x22
87 #define GLX_TRANSPARENT_TYPE_EXT 0x23
88 #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
89 #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
90 #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
91 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
92 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
93 #define GLX_NONE_EXT 0x8000
94 #define GLX_TRUE_COLOR_EXT 0x8002
95 #define GLX_DIRECT_COLOR_EXT 0x8003
96 #define GLX_PSEUDO_COLOR_EXT 0x8004
97 #define GLX_STATIC_COLOR_EXT 0x8005
98 #define GLX_GRAY_SCALE_EXT 0x8006
99 #define GLX_STATIC_GRAY_EXT 0x8007
100 #define GLX_TRANSPARENT_RGB_EXT 0x8008
101 #define GLX_TRANSPARENT_INDEX_EXT 0x8009
104 #ifndef GLX_SGI_swap_control
107 #ifndef GLX_SGI_video_sync
110 #ifndef GLX_SGI_make_current_read
113 #ifndef GLX_SGIX_video_source
116 #ifndef GLX_EXT_visual_rating
117 #define GLX_VISUAL_CAVEAT_EXT 0x20
118 #define GLX_SLOW_VISUAL_EXT 0x8001
119 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
120 /* reuse GLX_NONE_EXT */
123 #ifndef GLX_EXT_import_context
124 #define GLX_SHARE_CONTEXT_EXT 0x800A
125 #define GLX_VISUAL_ID_EXT 0x800B
126 #define GLX_SCREEN_EXT 0x800C
129 #ifndef GLX_SGIX_fbconfig
130 #define GLX_WINDOW_BIT_SGIX 0x00000001
131 #define GLX_PIXMAP_BIT_SGIX 0x00000002
132 #define GLX_RGBA_BIT_SGIX 0x00000001
133 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
134 #define GLX_DRAWABLE_TYPE_SGIX 0x8010
135 #define GLX_RENDER_TYPE_SGIX 0x8011
136 #define GLX_X_RENDERABLE_SGIX 0x8012
137 #define GLX_FBCONFIG_ID_SGIX 0x8013
138 #define GLX_RGBA_TYPE_SGIX 0x8014
139 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
140 /* reuse GLX_SCREEN_EXT */
143 #ifndef GLX_SGIX_pbuffer
144 #define GLX_PBUFFER_BIT_SGIX 0x00000004
145 #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
146 #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
147 #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
148 #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
149 #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
150 #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
151 #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
152 #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
153 #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
154 #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
155 #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
156 #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
157 #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
158 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
159 #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
160 #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
161 #define GLX_LARGEST_PBUFFER_SGIX 0x801C
162 #define GLX_WIDTH_SGIX 0x801D
163 #define GLX_HEIGHT_SGIX 0x801E
164 #define GLX_EVENT_MASK_SGIX 0x801F
165 #define GLX_DAMAGED_SGIX 0x8020
166 #define GLX_SAVED_SGIX 0x8021
167 #define GLX_WINDOW_SGIX 0x8022
168 #define GLX_PBUFFER_SGIX 0x8023
171 #ifndef GLX_SGI_cushion
174 #ifndef GLX_SGIX_video_resize
175 #define GLX_SYNC_FRAME_SGIX 0x00000000
176 #define GLX_SYNC_SWAP_SGIX 0x00000001
179 #ifndef GLX_SGIX_dmbuffer
180 #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
183 #ifndef GLX_SGIX_swap_group
186 #ifndef GLX_SGIX_swap_barrier
189 #ifndef GLX_SGIS_blended_overlay
190 #define GLX_BLENDED_RGBA_SGIS 0x8025
193 #ifndef GLX_SGIS_shared_multisample
194 #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
195 #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
198 #ifndef GLX_SUN_get_transparent_index
201 #ifndef GLX_3DFX_multisample
202 #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
203 #define GLX_SAMPLES_3DFX 0x8051
206 #ifndef GLX_MESA_copy_sub_buffer
209 #ifndef GLX_MESA_pixmap_colormap
212 #ifndef GLX_MESA_release_buffers
215 #ifndef GLX_MESA_set_3dfx_mode
216 #define GLX_3DFX_WINDOW_MODE_MESA 0x1
217 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
220 #ifndef GLX_SGIX_visual_select_group
221 #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
224 #ifndef GLX_OML_swap_method
225 #define GLX_SWAP_METHOD_OML 0x8060
226 #define GLX_SWAP_EXCHANGE_OML 0x8061
227 #define GLX_SWAP_COPY_OML 0x8062
228 #define GLX_SWAP_UNDEFINED_OML 0x8063
231 #ifndef GLX_OML_sync_control
234 #ifndef GLX_NV_float_buffer
235 #define GLX_FLOAT_COMPONENTS_NV 0x20B0
238 #ifndef GLX_SGIX_hyperpipe
239 #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
240 #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
241 #define GLX_BAD_HYPERPIPE_SGIX 92
242 #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
243 #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
244 #define GLX_PIPE_RECT_SGIX 0x00000001
245 #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
246 #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
247 #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
248 #define GLX_HYPERPIPE_ID_SGIX 0x8030
251 #ifndef GLX_MESA_agp_offset
255 /*************************************************************/
257 #ifndef GLX_ARB_get_proc_address
259 * Linux OpenGL ABI specifies glXGetProcAddressARB should be
260 * in glx.h moving related defines there as well.
264 #ifndef GLX_SGIX_video_source
265 typedef XID GLXVideoSourceSGIX
;
268 #ifndef GLX_SGIX_fbconfig
269 typedef XID GLXFBConfigIDSGIX
;
270 typedef struct __GLXFBConfigRec
*GLXFBConfigSGIX
;
273 #ifndef GLX_SGIX_pbuffer
274 typedef XID GLXPbufferSGIX
;
277 unsigned long serial
; /* # of last request processed by server */
278 Bool send_event
; /* true if this came for SendEvent request */
279 Display
*display
; /* display the event was read from */
280 GLXDrawable drawable
; /* i.d. of Drawable */
281 int event_type
; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
282 int draw_type
; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
283 unsigned int mask
; /* mask indicating which buffers are affected*/
286 int count
; /* if nonzero, at least this many more */
287 } GLXBufferClobberEventSGIX
;
290 #ifndef GLX_NV_swap_group
293 #ifndef GLX_NV_video_out
295 * GLXVideoDeviceNV is an opaque handle to a video device (part of the
296 * GLX_NV_video_out extension).
298 typedef unsigned int GLXVideoDeviceNV
;
300 /* glXBindVideoImageNV iVideoBuffer values (NV_video_out) */
301 #define GLX_VIDEO_OUT_COLOR_NV 0x20C3
302 #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
303 #define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
304 #define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
305 #define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
307 /* glXSendPbufferToVideoNV iBufferType values (NV_video_out) */
308 #define GLX_VIDEO_OUT_FRAME_NV 0x20C8
309 #define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
310 #define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
311 #define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
312 #define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
315 #ifndef GLX_EXT_fbconfig_packed_float
316 #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
317 #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
320 #ifndef GLX_EXT_framebuffer_sRGB
321 #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
324 #ifndef GLX_EXT_texture_from_pixmap
325 /* New glXGetFBConfigAttrib <attrib_list> tokens */
326 #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
327 #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
328 #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
329 #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
330 #define GLX_Y_INVERTED_EXT 0x20D4
332 /* New glXCreatePixmap attributes and glXQueryDrawable attributes */
333 #define GLX_TEXTURE_FORMAT_EXT 0x20D5
334 #define GLX_TEXTURE_TARGET_EXT 0x20D6
335 #define GLX_MIPMAP_TEXTURE_EXT 0x20D7
337 /* Values for GLX_TEXTURE_FORMAT_EXT */
338 #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
339 #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
340 #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
342 /* Bits for GLX_BIND_TO_TEXTURE_TARGETS_EXT mask */
343 #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
344 #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
345 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
347 /* Values for GLX_TEXTURE_TARGET_EXT */
348 #define GLX_TEXTURE_1D_EXT 0x20DB
349 #define GLX_TEXTURE_2D_EXT 0x20DC
350 #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
353 * Values for the buffer parameter of glXBindTexImageEXT and
354 * glXReleaseTexImageEXT
356 #define GLX_FRONT_LEFT_EXT 0x20DE
357 #define GLX_FRONT_RIGHT_EXT 0x20DF
358 #define GLX_BACK_LEFT_EXT 0x20E0
359 #define GLX_BACK_RIGHT_EXT 0x20E1
360 #define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
361 #define GLX_BACK_EXT GLX_BACK_LEFT_EXT
362 #define GLX_AUX0_EXT 0x20E2
363 #define GLX_AUX1_EXT 0x20E3
364 #define GLX_AUX2_EXT 0x20E4
365 #define GLX_AUX3_EXT 0x20E5
366 #define GLX_AUX4_EXT 0x20E6
367 #define GLX_AUX5_EXT 0x20E7
368 #define GLX_AUX6_EXT 0x20E8
369 #define GLX_AUX7_EXT 0x20E9
370 #define GLX_AUX8_EXT 0x20EA
371 #define GLX_AUX9_EXT 0x20EB
375 #ifndef GLX_NV_multisample_coverage
376 #define GLX_COVERAGE_SAMPLES_NV GLX_SAMPLES_ARB
377 #define GLX_COLOR_SAMPLES_NV 0x20B3
380 #ifndef GLX_NV_present_video
381 #define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
384 #ifndef GLX_NV_video_capture
386 typedef XID GLXVideoCaptureDeviceNV
;
388 #define GLX_DEVICE_ID_NV 0x20CD
389 #define GLX_UNIQUE_ID_NV 0x20CE
390 #define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
393 #ifndef GLX_EXT_swap_control
394 #define GLX_SWAP_INTERVAL_EXT 0x20F1
395 #define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
398 /* Define int32_t and int64_t types for UST/MSC */
399 /* (as used in the GLX_OML_sync_control extension). */
400 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
401 #include <inttypes.h>
402 #elif defined( __VMS ) || defined(__FreeBSD__)
403 #include <inttypes.h>
404 #elif (defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SVR4))
405 #include <inttypes.h>
406 #elif defined(__SCO__) || defined(__USLC__) || defined(__linux__)
408 #elif defined(__UNIXOS2__) || defined(__SOL64__)
409 typedef long int int32_t;
410 typedef long long int int64_t;
412 #error "int32_t and int64_t are undefined!"
415 #ifndef GLX_ARB_get_proc_address
419 #ifndef GLX_ARB_multisample
420 #define GLX_ARB_multisample 1
423 #ifndef GLX_ARB_fbconfig_float
424 #define GLX_ARB_fbconfig_float 1
427 #ifndef GLX_ARB_create_context
428 #define GLX_ARB_create_context 1
429 #ifdef GLX_GLXEXT_PROTOTYPES
430 extern GLXContext
glXCreateContextAttribsARB (Display
*, GLXFBConfig
, GLXContext
, Bool
, const int *);
431 #endif /* GLX_GLXEXT_PROTOTYPES */
432 typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC
) (Display
*dpy
, GLXFBConfig config
, GLXContext share_context
, Bool direct
, const int *attrib_list
);
435 #ifndef GLX_SGIS_multisample
436 #define GLX_SGIS_multisample 1
439 #ifndef GLX_EXT_visual_info
440 #define GLX_EXT_visual_info 1
443 #ifndef GLX_SGI_swap_control
444 #define GLX_SGI_swap_control 1
445 #ifdef GLX_GLXEXT_PROTOTYPES
446 extern int glXSwapIntervalSGI (int);
447 #endif /* GLX_GLXEXT_PROTOTYPES */
448 typedef int ( * PFNGLXSWAPINTERVALSGIPROC
) (int interval
);
451 #ifndef GLX_SGI_video_sync
452 #define GLX_SGI_video_sync 1
453 #ifdef GLX_GLXEXT_PROTOTYPES
454 extern int glXGetVideoSyncSGI (unsigned int *);
455 extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
456 extern int glXGetRefreshRateSGI(unsigned int *);
457 #endif /* GLX_GLXEXT_PROTOTYPES */
458 typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC
) (unsigned int *count
);
459 typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC
) (int divisor
, int remainder
, unsigned int *count
);
460 typedef int ( * PFNGLXGETREFRESHRATESGIPROC
) (unsigned int *);
463 #ifndef GLX_SGI_make_current_read
464 #define GLX_SGI_make_current_read 1
465 #ifdef GLX_GLXEXT_PROTOTYPES
466 extern Bool
glXMakeCurrentReadSGI (Display
*, GLXDrawable
, GLXDrawable
, GLXContext
);
467 extern GLXDrawable
glXGetCurrentReadDrawableSGI (void);
468 #endif /* GLX_GLXEXT_PROTOTYPES */
469 typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC
) (Display
*dpy
, GLXDrawable draw
, GLXDrawable read
, GLXContext ctx
);
470 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC
) (void);
473 #ifndef GLX_SGIX_video_source
474 #define GLX_SGIX_video_source 1
476 #ifdef GLX_GLXEXT_PROTOTYPES
477 extern GLXVideoSourceSGIX
glXCreateGLXVideoSourceSGIX (Display
*, int, VLServer
, VLPath
, int, VLNode
);
478 extern void glXDestroyGLXVideoSourceSGIX (Display
*, GLXVideoSourceSGIX
);
479 #endif /* GLX_GLXEXT_PROTOTYPES */
480 typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC
) (Display
*display
, int screen
, VLServer server
, VLPath path
, int nodeClass
, VLNode drainNode
);
481 typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC
) (Display
*dpy
, GLXVideoSourceSGIX glxvideosource
);
485 #ifndef GLX_EXT_visual_rating
486 #define GLX_EXT_visual_rating 1
489 #ifndef GLX_EXT_import_context
490 #define GLX_EXT_import_context 1
491 #ifdef GLX_GLXEXT_PROTOTYPES
492 extern Display
* glXGetCurrentDisplayEXT (void);
493 extern int glXQueryContextInfoEXT (Display
*, GLXContext
, int, int *);
494 extern GLXContextID
glXGetContextIDEXT (const GLXContext
);
495 extern GLXContext
glXImportContextEXT (Display
*, GLXContextID
);
496 extern void glXFreeContextEXT (Display
*, GLXContext
);
497 #endif /* GLX_GLXEXT_PROTOTYPES */
498 typedef Display
* ( * PFNGLXGETCURRENTDISPLAYEXTPROC
) (void);
499 typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC
) (Display
*dpy
, GLXContext context
, int attribute
, int *value
);
500 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC
) (const GLXContext context
);
501 typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC
) (Display
*dpy
, GLXContextID contextID
);
502 typedef void ( * PFNGLXFREECONTEXTEXTPROC
) (Display
*dpy
, GLXContext context
);
505 #ifndef GLX_SGIX_fbconfig
506 #define GLX_SGIX_fbconfig 1
507 #ifdef GLX_GLXEXT_PROTOTYPES
508 extern int glXGetFBConfigAttribSGIX (Display
*, GLXFBConfigSGIX
, int, int *);
509 extern GLXFBConfigSGIX
* glXChooseFBConfigSGIX (Display
*, int, int *, int *);
510 extern GLXPixmap
glXCreateGLXPixmapWithConfigSGIX (Display
*, GLXFBConfigSGIX
, Pixmap
);
511 extern GLXContext
glXCreateContextWithConfigSGIX (Display
*, GLXFBConfigSGIX
, int, GLXContext
, Bool
);
512 extern XVisualInfo
* glXGetVisualFromFBConfigSGIX (Display
*, GLXFBConfigSGIX
);
513 extern GLXFBConfigSGIX
glXGetFBConfigFromVisualSGIX (Display
*, XVisualInfo
*);
514 #endif /* GLX_GLXEXT_PROTOTYPES */
515 typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, int attribute
, int *value
);
516 typedef GLXFBConfigSGIX
* ( * PFNGLXCHOOSEFBCONFIGSGIXPROC
) (Display
*dpy
, int screen
, int *attrib_list
, int *nelements
);
517 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, Pixmap pixmap
);
518 typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, int render_type
, GLXContext share_list
, Bool direct
);
519 typedef XVisualInfo
* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
);
520 typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC
) (Display
*dpy
, XVisualInfo
*vis
);
523 #ifndef GLX_SGIX_pbuffer
524 #define GLX_SGIX_pbuffer 1
525 #ifdef GLX_GLXEXT_PROTOTYPES
526 extern GLXPbufferSGIX
glXCreateGLXPbufferSGIX (Display
*, GLXFBConfigSGIX
, unsigned int, unsigned int, int *);
527 extern void glXDestroyGLXPbufferSGIX (Display
*, GLXPbufferSGIX
);
528 extern int glXQueryGLXPbufferSGIX (Display
*, GLXPbufferSGIX
, int, unsigned int *);
529 extern void glXSelectEventSGIX (Display
*, GLXDrawable
, unsigned long);
530 extern void glXGetSelectedEventSGIX (Display
*, GLXDrawable
, unsigned long *);
531 #endif /* GLX_GLXEXT_PROTOTYPES */
532 typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, unsigned int width
, unsigned int height
, int *attrib_list
);
533 typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuf
);
534 typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuf
, int attribute
, unsigned int *value
);
535 typedef void ( * PFNGLXSELECTEVENTSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, unsigned long mask
);
536 typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, unsigned long *mask
);
539 #ifndef GLX_SGI_cushion
540 #define GLX_SGI_cushion 1
541 #ifdef GLX_GLXEXT_PROTOTYPES
542 extern void glXCushionSGI (Display
*, Window
, float);
543 #endif /* GLX_GLXEXT_PROTOTYPES */
544 typedef void ( * PFNGLXCUSHIONSGIPROC
) (Display
*dpy
, Window window
, float cushion
);
547 #ifndef GLX_SGIX_video_resize
548 #define GLX_SGIX_video_resize 1
549 #ifdef GLX_GLXEXT_PROTOTYPES
550 extern int glXBindChannelToWindowSGIX (Display
*, int, int, Window
);
551 extern int glXChannelRectSGIX (Display
*, int, int, int, int, int, int);
552 extern int glXQueryChannelRectSGIX (Display
*, int, int, int *, int *, int *, int *);
553 extern int glXQueryChannelDeltasSGIX (Display
*, int, int, int *, int *, int *, int *);
554 extern int glXChannelRectSyncSGIX (Display
*, int, int, GLenum
);
555 #endif /* GLX_GLXEXT_PROTOTYPES */
556 typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC
) (Display
*display
, int screen
, int channel
, Window window
);
557 typedef int ( * PFNGLXCHANNELRECTSGIXPROC
) (Display
*display
, int screen
, int channel
, int x
, int y
, int w
, int h
);
558 typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC
) (Display
*display
, int screen
, int channel
, int *dx
, int *dy
, int *dw
, int *dh
);
559 typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC
) (Display
*display
, int screen
, int channel
, int *x
, int *y
, int *w
, int *h
);
560 typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC
) (Display
*display
, int screen
, int channel
, GLenum synctype
);
563 #ifndef GLX_SGIX_dmbuffer
564 #define GLX_SGIX_dmbuffer 1
566 #ifdef GLX_GLXEXT_PROTOTYPES
567 extern Bool
glXAssociateDMPbufferSGIX (Display
*, GLXPbufferSGIX
, DMparams
*, DMbuffer
);
568 #endif /* GLX_GLXEXT_PROTOTYPES */
569 typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuffer
, DMparams
*params
, DMbuffer dmbuffer
);
570 #endif /* _DM_BUFFER_H_ */
573 #ifndef GLX_SGIX_swap_group
574 #define GLX_SGIX_swap_group 1
575 #ifdef GLX_GLXEXT_PROTOTYPES
576 extern void glXJoinSwapGroupSGIX (Display
*, GLXDrawable
, GLXDrawable
);
577 #endif /* GLX_GLXEXT_PROTOTYPES */
578 typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, GLXDrawable member
);
581 #ifndef GLX_SGIX_swap_barrier
582 #define GLX_SGIX_swap_barrier 1
583 #ifdef GLX_GLXEXT_PROTOTYPES
584 extern void glXBindSwapBarrierSGIX (Display
*, GLXDrawable
, int);
585 extern Bool
glXQueryMaxSwapBarriersSGIX (Display
*, int, int *);
586 #endif /* GLX_GLXEXT_PROTOTYPES */
587 typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, int barrier
);
588 typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC
) (Display
*dpy
, int screen
, int *max
);
591 #ifndef GLX_SUN_get_transparent_index
592 #define GLX_SUN_get_transparent_index 1
593 #ifdef GLX_GLXEXT_PROTOTYPES
594 extern Status
glXGetTransparentIndexSUN (Display
*, Window
, Window
, long *);
595 #endif /* GLX_GLXEXT_PROTOTYPES */
596 typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC
) (Display
*dpy
, Window overlay
, Window underlay
, long *pTransparentIndex
);
599 #ifndef GLX_MESA_copy_sub_buffer
600 #define GLX_MESA_copy_sub_buffer 1
601 #ifdef GLX_GLXEXT_PROTOTYPES
602 extern void glXCopySubBufferMESA (Display
*, GLXDrawable
, int, int, int, int);
603 #endif /* GLX_GLXEXT_PROTOTYPES */
604 typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC
) (Display
*dpy
, GLXDrawable drawable
, int x
, int y
, int width
, int height
);
607 #ifndef GLX_MESA_pixmap_colormap
608 #define GLX_MESA_pixmap_colormap 1
609 #ifdef GLX_GLXEXT_PROTOTYPES
610 extern GLXPixmap
glXCreateGLXPixmapMESA (Display
*, XVisualInfo
*, Pixmap
, Colormap
);
611 #endif /* GLX_GLXEXT_PROTOTYPES */
612 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC
) (Display
*dpy
, XVisualInfo
*visual
, Pixmap pixmap
, Colormap cmap
);
615 #ifndef GLX_MESA_release_buffers
616 #define GLX_MESA_release_buffers 1
617 #ifdef GLX_GLXEXT_PROTOTYPES
618 extern Bool
glXReleaseBuffersMESA (Display
*, GLXDrawable
);
619 #endif /* GLX_GLXEXT_PROTOTYPES */
620 typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC
) (Display
*dpy
, GLXDrawable drawable
);
623 #ifndef GLX_MESA_set_3dfx_mode
624 #define GLX_MESA_set_3dfx_mode 1
625 #ifdef GLX_GLXEXT_PROTOTYPES
626 extern Bool
glXSet3DfxModeMESA (int);
627 #endif /* GLX_GLXEXT_PROTOTYPES */
628 typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC
) (int mode
);
631 #ifndef GLX_SGIX_visual_select_group
632 #define GLX_SGIX_visual_select_group 1
635 #ifndef GLX_OML_swap_method
636 #define GLX_OML_swap_method 1
639 #ifndef GLX_OML_sync_control
640 #define GLX_OML_sync_control 1
641 #ifdef GLX_GLXEXT_PROTOTYPES
642 extern Bool
glXGetSyncValuesOML (Display
*, GLXDrawable
, int64_t *, int64_t *, int64_t *);
643 extern Bool
glXGetMscRateOML (Display
*, GLXDrawable
, int32_t *, int32_t *);
644 extern int64_t glXSwapBuffersMscOML (Display
*, GLXDrawable
, int64_t, int64_t, int64_t);
645 extern Bool
glXWaitForMscOML (Display
*, GLXDrawable
, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
646 extern Bool
glXWaitForSbcOML (Display
*, GLXDrawable
, int64_t, int64_t *, int64_t *, int64_t *);
647 #endif /* GLX_GLXEXT_PROTOTYPES */
648 typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int64_t *ust
, int64_t *msc
, int64_t *sbc
);
649 typedef Bool ( * PFNGLXGETMSCRATEOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int32_t *numerator
, int32_t *denominator
);
650 typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int64_t target_msc
, int64_t divisor
, int64_t remainder
);
651 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
);
652 typedef Bool ( * PFNGLXWAITFORSBCOMLPROC
) (Display
*dpy
, GLXDrawable drawable
, int64_t target_sbc
, int64_t *ust
, int64_t *msc
, int64_t *sbc
);
655 #ifndef GLX_NV_float_buffer
656 #define GLX_NV_float_buffer 1
659 #ifndef GLX_SGIX_hyperpipe
660 #define GLX_SGIX_hyperpipe 1
663 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
665 } GLXHyperpipeNetworkSGIX
;
668 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
673 } GLXHyperpipeConfigSGIX
;
676 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
677 int srcXOrigin
, srcYOrigin
, srcWidth
, srcHeight
;
678 int destXOrigin
, destYOrigin
, destWidth
, destHeight
;
682 char pipeName
[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX
];
683 int XOrigin
, YOrigin
, maxHeight
, maxWidth
;
686 #ifdef GLX_GLXEXT_PROTOTYPES
687 extern GLXHyperpipeNetworkSGIX
* glXQueryHyperpipeNetworkSGIX (Display
*, int *);
688 extern int glXHyperpipeConfigSGIX (Display
*, int, int, GLXHyperpipeConfigSGIX
*, int *);
689 extern GLXHyperpipeConfigSGIX
* glXQueryHyperpipeConfigSGIX (Display
*, int, int *);
690 extern int glXDestroyHyperpipeConfigSGIX (Display
*, int);
691 extern int glXBindHyperpipeSGIX (Display
*, int);
692 extern int glXQueryHyperpipeBestAttribSGIX (Display
*, int, int, int, void *, void *);
693 extern int glXHyperpipeAttribSGIX (Display
*, int, int, int, void *);
694 extern int glXQueryHyperpipeAttribSGIX (Display
*, int, int, int, void *);
695 #endif /* GLX_GLXEXT_PROTOTYPES */
696 typedef GLXHyperpipeNetworkSGIX
* ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC
) (Display
*dpy
, int *npipes
);
697 typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC
) (Display
*dpy
, int networkId
, int npipes
, GLXHyperpipeConfigSGIX
*cfg
, int *hpId
);
698 typedef GLXHyperpipeConfigSGIX
* ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC
) (Display
*dpy
, int hpId
, int *npipes
);
699 typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC
) (Display
*dpy
, int hpId
);
700 typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC
) (Display
*dpy
, int hpId
);
701 typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC
) (Display
*dpy
, int timeSlice
, int attrib
, int size
, void *attribList
, void *returnAttribList
);
702 typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC
) (Display
*dpy
, int timeSlice
, int attrib
, int size
, void *attribList
);
703 typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC
) (Display
*dpy
, int timeSlice
, int attrib
, int size
, void *returnAttribList
);
706 #ifndef GLX_MESA_agp_offset
707 #define GLX_MESA_agp_offset 1
708 #ifdef GLX_GLXEXT_PROTOTYPES
709 extern unsigned int glXGetAGPOffsetMESA (const void *);
710 #endif /* GLX_GLXEXT_PROTOTYPES */
711 typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC
) (const void *pointer
);
715 * GLX_NV_vertex_array_range is not a real extension name...
717 #ifndef GLX_NV_vertex_array_range
718 #define GLX_NV_vertex_array_range 1
719 #ifdef GLX_GLXEXT_PROTOTYPES
720 extern void *glXAllocateMemoryNV(GLsizei size
, GLfloat readfreq
,
721 GLfloat writefreq
, GLfloat priority
);
723 extern void glXFreeMemoryNV(GLvoid
*pointer
);
725 typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC
) (GLsizei size
,
730 typedef void ( * PFNGLXFREEMEMORYNVPROC
) (GLvoid
*pointer
);
733 #ifndef GLX_NV_swap_group
734 #define GLX_NV_swap_group 1
735 #ifdef GLX_GLXEXT_PROTOTYPES
736 extern Bool
glXJoinSwapGroupNV(Display
*dpy
, GLXDrawable drawable
,
739 extern Bool
glXBindSwapBarrierNV(Display
*dpy
, GLuint group
, GLuint barrier
);
741 extern Bool
glXQuerySwapGroupNV(Display
*dpy
, GLXDrawable drawable
,
742 GLuint
*group
, GLuint
*barrier
);
744 extern Bool
glXQueryMaxSwapGroupsNV(Display
*dpy
, int screen
,
745 GLuint
*maxGroups
, GLuint
*maxBarriers
);
747 extern Bool
glXQueryFrameCountNV(Display
*dpy
, int screen
, GLuint
*count
);
749 extern Bool
glXResetFrameCountNV(Display
*dpy
, int screen
);
751 typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC
) (Display
*dpy
,
752 GLXDrawable drawable
,
755 typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC
) (Display
*dpy
,
759 typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC
) (Display
*dpy
,
760 GLXDrawable drawable
,
764 typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC
) (Display
*dpy
,
767 GLuint
*maxBarriers
);
769 typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC
) (Display
*dpy
,
773 typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC
) (Display
*dpy
, int screen
);
776 #ifndef GLX_NV_video_out
777 #define GLX_NV_video_out 1
778 #ifdef GLX_GLXEXT_PROTOTYPES
779 extern int glXGetVideoDeviceNV(Display
*dpy
, int screen
, int numVideoDevices
,
780 GLXVideoDeviceNV
*pVideoDevice
);
782 extern int glXReleaseVideoDeviceNV(Display
*dpy
, int screen
,
783 GLXVideoDeviceNV VideoDevice
);
785 extern int glXBindVideoImageNV(Display
*dpy
, GLXVideoDeviceNV VideoDevice
,
786 GLXPbuffer pbuf
, int iVideoBuffer
);
788 extern int glXReleaseVideoImageNV(Display
*dpy
, GLXPbuffer pbuf
);
790 extern int glXSendPbufferToVideoNV(Display
*dpy
, GLXPbuffer pbuf
,
792 unsigned long *pulCounterPbuffer
,
795 extern int glXGetVideoInfoNV(Display
*dpy
, int screen
,
796 GLXVideoDeviceNV VideoDevice
,
797 unsigned long *pulCounterOutputPbuffer
,
798 unsigned long *pulCounterOutputVideo
);
800 typedef int ( * PFNGLXGETVIDEODEVICENVPROC
) (Display
*dpy
,
803 GLXVideoDeviceNV
*pVideoDevice
);
805 typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC
) (Display
*dpy
,
807 GLXVideoDeviceNV VideoDevice
);
809 typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC
) (Display
*dpy
,
810 GLXVideoDeviceNV VideoDevice
,
814 typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC
) (Display
*dpy
,
817 typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC
) (Display
*dpy
,
820 unsigned long *pulCounterPbuffer
,
823 typedef int ( * PFNGLXGETVIDEOINFONVPROC
) (Display
*dpy
, int screen
,
824 GLXVideoDeviceNV VideoDevice
,
825 unsigned long *pulCounterOutputPbuffer
,
826 unsigned long *pulCounterOutputVideo
);
829 #ifndef GLX_EXT_fbconfig_packed_float
830 #define GLX_EXT_fbconfig_packed_float 1
833 #ifndef GLX_EXT_framebuffer_sRGB
834 #define GLX_EXT_framebuffer_sRGB 1
837 #ifndef GLX_EXT_texture_from_pixmap
838 #define GLX_EXT_texture_from_pixmap
839 #ifdef GLX_GLXEXT_PROTOTYPES
840 extern void glXBindTexImageEXT(Display
*dpy
, GLXDrawable drawable
,
841 int buffer
, const int *attrib_list
);
842 extern void glXReleaseTexImageEXT(Display
*dpy
, GLXDrawable drawable
,
845 typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC
) (Display
*dpy
,
846 GLXDrawable drawable
,
848 const int *attrib_list
);
849 typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC
) (Display
*dpy
,
850 GLXDrawable drawable
,
854 #ifndef GLX_NV_present_video
855 #define GLX_NV_present_video
856 #ifdef GLX_GLXEXT_PROTOTYPES
857 extern unsigned int *glXEnumerateVideoDevicesNV(Display
*dpy
,
860 extern int glXBindVideoDeviceNV(Display
*dpy
,
861 unsigned int video_slot
,
862 unsigned int video_device
,
863 const int *attrib_list
);
865 typedef unsigned int* ( * PFNGLXENUMERATEVIDEODEVICESNVPROC
) (Display
*dpy
,
868 typedef int ( * PFNGLXBINDVIDEODEVICENVPROC
) (Display
*dpy
,
869 unsigned int video_slot
,
870 unsigned int video_device
,
871 const int *attrib_list
);
874 #ifndef GLX_NV_multisample_coverage
875 #define GLX_NV_multisample_coverage 1
878 #ifndef GLX_NV_video_capture
879 #define GLX_NV_video_capture 1
880 #ifdef GLX_GLXEXT_PROTOTYPES
881 extern int glXBindVideoCaptureDeviceNV(Display
*dpy
,
882 unsigned int video_capture_slot
,
883 GLXVideoCaptureDeviceNV device
);
885 extern GLXVideoCaptureDeviceNV
*
886 glXEnumerateVideoCaptureDevicesNV(Display
*dpy
,
890 extern void glXLockVideoCaptureDeviceNV(Display
*dpy
,
891 GLXVideoCaptureDeviceNV device
);
893 extern int glXQueryVideoCaptureDeviceNV(Display
*dpy
,
894 GLXVideoCaptureDeviceNV device
,
895 int attribute
, int *value
);
897 extern void glXReleaseVideoCaptureDeviceNV(Display
*dpy
,
898 GLXVideoCaptureDeviceNV device
);
899 #endif /* GLX_GLXEXT_PROTOTYPES */
900 typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC
) (Display
*dpy
, unsigned int video_capture_slot
, GLXVideoCaptureDeviceNV device
);
901 typedef GLXVideoCaptureDeviceNV
* ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC
) (Display
*dpy
, int screen
, int *nelements
);
902 typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC
) (Display
*dpy
, GLXVideoCaptureDeviceNV device
);
903 typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC
) (Display
*dpy
, GLXVideoCaptureDeviceNV device
, int attribute
, int *value
);
904 typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC
) (Display
*dpy
, GLXVideoCaptureDeviceNV device
);
907 #ifndef GLX_EXT_swap_control
908 #define GLX_EXT_swap_control 1
909 #ifdef GLX_GLXEXT_PROTOTYPES
910 extern void glXSwapIntervalEXT(Display
*dpy
,
911 GLXDrawable drawable
,
914 typedef void ( * PFNGLXSWAPINTERVALEXTPROC
) (Display
*dpy
,
915 GLXDrawable drawable
,