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-2000 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__)
38 #define WIN32_LEAN_AND_MEAN 1
49 /*************************************************************/
51 /* Header file version number, required by OpenGL ABI for Linux */
52 #define GLX_GLXEXT_VERSION 2
54 #ifndef GLX_VERSION_1_3
55 #define GLX_WINDOW_BIT 0x00000001
56 #define GLX_PIXMAP_BIT 0x00000002
57 #define GLX_PBUFFER_BIT 0x00000004
58 #define GLX_RGBA_BIT 0x00000001
59 #define GLX_COLOR_INDEX_BIT 0x00000002
60 #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
61 #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
62 #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
63 #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
64 #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
65 #define GLX_AUX_BUFFERS_BIT 0x00000010
66 #define GLX_DEPTH_BUFFER_BIT 0x00000020
67 #define GLX_STENCIL_BUFFER_BIT 0x00000040
68 #define GLX_ACCUM_BUFFER_BIT 0x00000080
69 #define GLX_CONFIG_CAVEAT 0x20
70 #define GLX_X_VISUAL_TYPE 0x22
71 #define GLX_TRANSPARENT_TYPE 0x23
72 #define GLX_TRANSPARENT_INDEX_VALUE 0x24
73 #define GLX_TRANSPARENT_RED_VALUE 0x25
74 #define GLX_TRANSPARENT_GREEN_VALUE 0x26
75 #define GLX_TRANSPARENT_BLUE_VALUE 0x27
76 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
77 #define GLX_DONT_CARE 0xFFFFFFFF
78 #define GLX_NONE 0x8000
79 #define GLX_SLOW_CONFIG 0x8001
80 #define GLX_TRUE_COLOR 0x8002
81 #define GLX_DIRECT_COLOR 0x8003
82 #define GLX_PSEUDO_COLOR 0x8004
83 #define GLX_STATIC_COLOR 0x8005
84 #define GLX_GRAY_SCALE 0x8006
85 #define GLX_STATIC_GRAY 0x8007
86 #define GLX_TRANSPARENT_RGB 0x8008
87 #define GLX_TRANSPARENT_INDEX 0x8009
88 #define GLX_VISUAL_ID 0x800B
89 #define GLX_SCREEN 0x800C
90 #define GLX_NON_CONFORMANT_CONFIG 0x800D
91 #define GLX_DRAWABLE_TYPE 0x8010
92 #define GLX_RENDER_TYPE 0x8011
93 #define GLX_X_RENDERABLE 0x8012
94 #define GLX_FBCONFIG_ID 0x8013
95 #define GLX_RGBA_TYPE 0x8014
96 #define GLX_COLOR_INDEX_TYPE 0x8015
97 #define GLX_MAX_PBUFFER_WIDTH 0x8016
98 #define GLX_MAX_PBUFFER_HEIGHT 0x8017
99 #define GLX_MAX_PBUFFER_PIXELS 0x8018
100 #define GLX_PRESERVED_CONTENTS 0x801B
101 #define GLX_LARGEST_PBUFFER 0x801C
102 #define GLX_WIDTH 0x801D
103 #define GLX_HEIGHT 0x801E
104 #define GLX_EVENT_MASK 0x801F
105 #define GLX_DAMAGED 0x8020
106 #define GLX_SAVED 0x8021
107 #define GLX_WINDOW 0x8022
108 #define GLX_PBUFFER 0x8023
109 #define GLX_PBUFFER_HEIGHT 0x8040
110 #define GLX_PBUFFER_WIDTH 0x8041
113 #ifndef GLX_EXT_visual_info
114 #define GLX_X_VISUAL_TYPE_EXT 0x22
115 #define GLX_TRANSPARENT_TYPE_EXT 0x23
116 #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
117 #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
118 #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
119 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
120 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
121 #define GLX_NONE_EXT 0x8000
122 #define GLX_TRUE_COLOR_EXT 0x8002
123 #define GLX_DIRECT_COLOR_EXT 0x8003
124 #define GLX_PSEUDO_COLOR_EXT 0x8004
125 #define GLX_STATIC_COLOR_EXT 0x8005
126 #define GLX_GRAY_SCALE_EXT 0x8006
127 #define GLX_STATIC_GRAY_EXT 0x8007
128 #define GLX_TRANSPARENT_RGB_EXT 0x8008
129 #define GLX_TRANSPARENT_INDEX_EXT 0x8009
132 #ifndef GLX_SGI_swap_control
135 #ifndef GLX_SGI_video_sync
138 #ifndef GLX_SGI_make_current_read
141 #ifndef GLX_SGIX_video_source
144 #ifndef GLX_EXT_visual_rating
145 #define GLX_VISUAL_CAVEAT_EXT 0x20
146 #define GLX_SLOW_VISUAL_EXT 0x8001
147 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
148 /* reuse GLX_NONE_EXT */
151 #ifndef GLX_EXT_import_context
152 #define GLX_SHARE_CONTEXT_EXT 0x800A
153 #define GLX_VISUAL_ID_EXT 0x800B
154 #define GLX_SCREEN_EXT 0x800C
157 #ifndef GLX_SGIX_fbconfig
158 #ifndef GLX_WINDOW_BIT_SGIX
159 #define GLX_WINDOW_BIT_SGIX 0x00000001
161 #ifndef GLX_PIXMAP_BIT_SGIX
162 #define GLX_PIXMAP_BIT_SGIX 0x00000002
164 #ifndef GLX_RGBA_BIT_SGIX
165 #define GLX_RGBA_BIT_SGIX 0x00000001
167 #ifndef GLX_COLOR_INDEX_BIT_SGIX
168 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
170 #ifndef GLX_DRAWABLE_TYPE_SGIX
171 #define GLX_DRAWABLE_TYPE_SGIX 0x8010
173 #ifndef GLX_RENDER_TYPE_SGIX
174 #define GLX_RENDER_TYPE_SGIX 0x8011
176 #ifndef GLX_X_RENDERABLE_SGIX
177 #define GLX_X_RENDERABLE_SGIX 0x8012
179 #ifndef GLX_FBCONFIG_ID_SGIX
180 #define GLX_FBCONFIG_ID_SGIX 0x8013
182 #ifndef GLX_RGBA_TYPE_SGIX
183 #define GLX_RGBA_TYPE_SGIX 0x8014
185 #ifndef GLX_COLOR_INDEX_TYPE_SGIX
186 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
188 /* reuse GLX_SCREEN_EXT */
191 #ifndef GLX_SGIX_pbuffer
192 #ifndef GLX_PBUFFER_BIT_SGIX
193 #define GLX_PBUFFER_BIT_SGIX 0x00000004
195 #ifndef GLX_BUFFER_CLOBBER_MASK_SGIX
196 #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
198 #ifndef GLX_FRONT_LEFT_BUFFER_BIT_SGIX
199 #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
201 #ifndef GLX_FRONT_RIGHT_BUFFER_BIT_SGIX
202 #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
204 #ifndef GLX_BACK_LEFT_BUFFER_BIT_SGIX
205 #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
207 #ifndef GLX_BACK_RIGHT_BUFFER_BIT_SGIX
208 #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
210 #ifndef GLX_AUX_BUFFERS_BIT_SGIX
211 #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
213 #ifndef GLX_DEPTH_BUFFER_BIT_SGIX
214 #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
216 #ifndef GLX_STENCIL_BUFFER_BIT_SGIX
217 #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
219 #ifndef GLX_ACCUM_BUFFER_BIT_SGIX
220 #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
222 #ifndef GLX_SAMPLE_BUFFERS_BIT_SGIX
223 #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
225 #ifndef GLX_MAX_PBUFFER_WIDTH_SGIX
226 #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
228 #ifndef GLX_MAX_PBUFFER_HEIGHT_SGIX
229 #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
231 #ifndef GLX_MAX_PBUFFER_PIXELS_SGIX
232 #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
234 #ifndef GLX_OPTIMAL_PBUFFER_WIDTH_SGIX
235 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
237 #ifndef GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX
238 #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
240 #ifndef GLX_PRESERVED_CONTENTS_SGIX
241 #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
243 #ifndef GLX_LARGEST_PBUFFER_SGIX
244 #define GLX_LARGEST_PBUFFER_SGIX 0x801C
246 #ifndef GLX_WIDTH_SGIX
247 #define GLX_WIDTH_SGIX 0x801D
249 #ifndef GLX_HEIGHT_SGIX
250 #define GLX_HEIGHT_SGIX 0x801E
252 #ifndef GLX_EVENT_MASK_SGIX
253 #define GLX_EVENT_MASK_SGIX 0x801F
255 #ifndef GLX_DAMAGED_SGIX
256 #define GLX_DAMAGED_SGIX 0x8020
258 #ifndef GLX_SAVED_SGIX
259 #define GLX_SAVED_SGIX 0x8021
261 #ifndef GLX_WINDOW_SGIX
262 #define GLX_WINDOW_SGIX 0x8022
264 #ifndef GLX_PBUFFER_SGIX
265 #define GLX_PBUFFER_SGIX 0x8023
269 #ifndef GLX_SGI_cushion
272 #ifndef GLX_SGIX_video_resize
273 #define GLX_SYNC_FRAME_SGIX 0x00000000
274 #define GLX_SYNC_SWAP_SGIX 0x00000001
277 #ifndef GLX_SGIX_dmbuffer
278 #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
281 #ifndef GLX_SGIX_swap_group
284 #ifndef GLX_SGIX_swap_barrier
287 #ifndef GLX_SGIS_blended_overlay
288 #define GLX_BLENDED_RGBA_SGIS 0x8025
291 #ifndef GLX_SGIS_shared_multisample
292 #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
293 #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
296 #ifndef GLX_SUN_get_transparent_index
299 #ifndef GLX_3DFX_multisample
300 #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
301 #define GLX_SAMPLES_3DFX 0x8051
304 #ifndef GLX_MESA_copy_sub_buffer
307 #ifndef GLX_MESA_pixmap_colormap
310 #ifndef GLX_MESA_release_buffers
313 #ifndef GLX_MESA_set_3dfx_mode
314 #define GLX_3DFX_WINDOW_MODE_MESA 0x1
315 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
319 /*************************************************************/
321 #ifndef GLX_ARB_get_proc_address
322 typedef void (*__GLXextFuncPtr
)();
325 #ifndef GLX_SGIX_video_source
326 typedef XID GLXVideoSourceSGIX
;
329 #ifndef GLX_SGIX_fbconfig
330 typedef XID GLXFBConfigIDSGIX
;
331 typedef struct __GLXFBConfigRec
*GLXFBConfigSGIX
;
334 #ifndef GLX_SGIX_pbuffer
335 typedef XID GLXPbufferSGIX
;
338 unsigned long serial
; /* # of last request processed by server */
339 Bool send_event
; /* true if this came for SendEvent request */
340 Display
*display
; /* display the event was read from */
341 GLXDrawable drawable
; /* i.d. of Drawable */
342 int event_type
; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
343 int draw_type
; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
344 unsigned int mask
; /* mask indicating which buffers are affected*/
347 int count
; /* if nonzero, at least this many more */
348 } GLXBufferClobberEventSGIX
;
351 #ifndef GLX_VERSION_1_3
352 #define GLX_VERSION_1_3 1
353 #ifdef GLX_GLXEXT_PROTOTYPES
354 extern GLXFBConfig
* glXGetFBConfigs (Display
*, int, int *);
355 extern GLXFBConfig
* glXChooseFBConfig (Display
*, int, const int *, int *);
356 extern int glXGetFBConfigAttrib (Display
*, GLXFBConfig
, int, int *);
357 extern XVisualInfo
* glXGetVisualFromFBConfig (Display
*, GLXFBConfig
);
358 extern GLXWindow
glXCreateWindow (Display
*, GLXFBConfig
, Window
, const int *);
359 extern void glXDestroyWindow (Display
*, GLXWindow
);
360 extern GLXPixmap
glXCreatePixmap (Display
*, GLXFBConfig
, Pixmap
, const int *);
361 extern void glXDestroyPixmap (Display
*, GLXPixmap
);
362 extern GLXPbuffer
glXCreatePbuffer (Display
*, GLXFBConfig
, const int *);
363 extern void glXDestroyPbuffer (Display
*, GLXPbuffer
);
364 extern void glXQueryDrawable (Display
*, GLXDrawable
, int, unsigned int *);
365 extern GLXContext
glXCreateNewContext (Display
*, GLXFBConfig
, int, GLXContext
, Bool
);
366 extern Bool
glXMakeContextCurrent (Display
*, GLXDrawable
, GLXDrawable
, GLXContext
);
367 extern GLXDrawable
glXGetCurrentReadDrawable (void);
368 extern Display
* glXGetCurrentDisplay (void);
369 extern int glXQueryContext (Display
*, GLXContext
, int, int *);
370 extern void glXSelectEvent (Display
*, GLXDrawable
, unsigned long);
371 extern void glXGetSelectedEvent (Display
*, GLXDrawable
, unsigned long *);
372 #endif /* GLX_GLXEXT_PROTOTYPES */
373 typedef GLXFBConfig
* ( * PFNGLXGETFBCONFIGSPROC
) (Display
*dpy
, int screen
, int *nelements
);
374 typedef GLXFBConfig
* ( * PFNGLXCHOOSEFBCONFIGPROC
) (Display
*dpy
, int screen
, const int *attrib_list
, int *nelements
);
375 typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC
) (Display
*dpy
, GLXFBConfig config
, int attribute
, int *value
);
376 typedef XVisualInfo
* ( * PFNGLXGETVISUALFROMFBCONFIGPROC
) (Display
*dpy
, GLXFBConfig config
);
377 typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC
) (Display
*dpy
, GLXFBConfig config
, Window win
, const int *attrib_list
);
378 typedef void ( * PFNGLXDESTROYWINDOWPROC
) (Display
*dpy
, GLXWindow win
);
379 typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC
) (Display
*dpy
, GLXFBConfig config
, Pixmap pixmap
, const int *attrib_list
);
380 typedef void ( * PFNGLXDESTROYPIXMAPPROC
) (Display
*dpy
, GLXPixmap pixmap
);
381 typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC
) (Display
*dpy
, GLXFBConfig config
, const int *attrib_list
);
382 typedef void ( * PFNGLXDESTROYPBUFFERPROC
) (Display
*dpy
, GLXPbuffer pbuf
);
383 typedef void ( * PFNGLXQUERYDRAWABLEPROC
) (Display
*dpy
, GLXDrawable draw
, int attribute
, unsigned int *value
);
384 typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC
) (Display
*dpy
, GLXFBConfig config
, int render_type
, GLXContext share_list
, Bool direct
);
385 typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC
) (Display
*dpy
, GLXDrawable draw
, GLXDrawable read
, GLXContext ctx
);
386 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC
) (void);
387 typedef Display
* ( * PFNGLXGETCURRENTDISPLAYPROC
) (void);
388 typedef int ( * PFNGLXQUERYCONTEXTPROC
) (Display
*dpy
, GLXContext ctx
, int attribute
, int *value
);
389 typedef void ( * PFNGLXSELECTEVENTPROC
) (Display
*dpy
, GLXDrawable draw
, unsigned long event_mask
);
390 typedef void ( * PFNGLXGETSELECTEDEVENTPROC
) (Display
*dpy
, GLXDrawable draw
, unsigned long *event_mask
);
393 #ifndef GLX_ARB_get_proc_address
394 #define GLX_ARB_get_proc_address 1
395 #ifdef GLX_GLXEXT_PROTOTYPES
396 extern __GLXextFuncPtr
glXGetProcAddressARB (const GLubyte
*);
397 #endif /* GLX_GLXEXT_PROTOTYPES */
398 typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC
) (const GLubyte
*procName
);
401 #ifndef GLX_SGIS_multisample
402 #define GLX_SGIS_multisample 1
405 #ifndef GLX_EXT_visual_info
406 #define GLX_EXT_visual_info 1
409 #ifndef GLX_NV_vertex_array_range
410 #define GLX_NV_vertex_array_range
411 #ifdef GLX_GLXEXT_PROTOTYPES
412 extern void *glXAllocateMemoryNV (GLsizei
, GLfloat
, GLfloat
, GLfloat
);
413 extern void glXFreeMemoryNV (void *);
415 typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC
) (GLsizei
, GLfloat
, GLfloat
, GLfloat
);
416 typedef void ( * PFNGLXFREEMEMORYNVPROC
) (void *);
419 #ifndef GLX_SGI_swap_control
420 #define GLX_SGI_swap_control 1
421 #ifdef GLX_GLXEXT_PROTOTYPES
422 extern int glXSwapIntervalSGI (int);
423 #endif /* GLX_GLXEXT_PROTOTYPES */
424 typedef int ( * PFNGLXSWAPINTERVALSGIPROC
) (int interval
);
427 #ifndef GLX_SGI_video_sync
428 #define GLX_SGI_video_sync 1
429 #ifdef GLX_GLXEXT_PROTOTYPES
430 extern int glXGetVideoSyncSGI (unsigned int *);
431 extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
432 #endif /* GLX_GLXEXT_PROTOTYPES */
433 typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC
) (unsigned int *count
);
434 typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC
) (int divisor
, int remainder
, unsigned int *count
);
437 #ifndef GLX_SGI_make_current_read
438 #define GLX_SGI_make_current_read 1
439 #ifdef GLX_GLXEXT_PROTOTYPES
440 extern Bool
glXMakeCurrentReadSGI (Display
*, GLXDrawable
, GLXDrawable
, GLXContext
);
441 extern GLXDrawable
glXGetCurrentReadDrawableSGI (void);
442 #endif /* GLX_GLXEXT_PROTOTYPES */
443 typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC
) (Display
*dpy
, GLXDrawable draw
, GLXDrawable read
, GLXContext ctx
);
444 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC
) (void);
448 #ifndef GLX_SGIX_video_source
449 #define GLX_SGIX_video_source 1
450 #ifdef GLX_GLXEXT_PROTOTYPES
451 extern GLXVideoSourceSGIX
glXCreateGLXVideoSourceSGIX (Display
*, int, VLServer
, VLPath
, int, VLNode
);
452 extern void glXDestroyGLXVideoSourceSGIX (Display
*, GLXVideoSourceSGIX
);
453 #endif /* GLX_GLXEXT_PROTOTYPES */
454 typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC
) (Display
*display
, int screen
, VLServer server
, VLPath path
, int nodeClass
, VLNode drainNode
);
455 typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC
) (Display
*dpy
, GLXVideoSourceSGIX glxvideosource
);
459 #ifndef GLX_EXT_visual_rating
460 #define GLX_EXT_visual_rating 1
463 #ifndef GLX_EXT_import_context
464 #define GLX_EXT_import_context 1
465 #ifdef GLX_GLXEXT_PROTOTYPES
466 extern Display
* glXGetCurrentDisplayEXT (void);
467 extern int glXQueryContextInfoEXT (Display
*, GLXContext
, int, int *);
468 extern GLXContextID
glXGetContextIDEXT (GLXContext
);
469 extern GLXContext
glXImportContextEXT (Display
*, GLXContextID
);
470 extern void glXFreeContextEXT (Display
*, GLXContext
);
471 #endif /* GLX_GLXEXT_PROTOTYPES */
472 typedef Display
* ( * PFNGLXGETCURRENTDISPLAYEXTPROC
) (void);
473 typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC
) (Display
*dpy
, GLXContext context
, int attribute
, int *value
);
474 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC
) (GLXContext context
);
475 typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC
) (Display
*dpy
, GLXContextID contextID
);
476 typedef void ( * PFNGLXFREECONTEXTEXTPROC
) (Display
*dpy
, GLXContext context
);
479 #ifndef GLX_SGIX_fbconfig
480 #define GLX_SGIX_fbconfig 1
481 #ifdef GLX_GLXEXT_PROTOTYPES
482 extern int glXGetFBConfigAttribSGIX (Display
*, GLXFBConfigSGIX
, int, int *);
483 extern GLXFBConfigSGIX
* glXChooseFBConfigSGIX (Display
*, int, int *, int *);
484 extern GLXPixmap
glXCreateGLXPixmapWithConfigSGIX (Display
*, GLXFBConfigSGIX
, Pixmap
);
485 extern GLXContext
glXCreateContextWithConfigSGIX (Display
*, GLXFBConfigSGIX
, int, GLXContext
, Bool
);
486 extern XVisualInfo
* glXGetVisualFromFBConfigSGIX (Display
*, GLXFBConfigSGIX
);
487 extern GLXFBConfigSGIX
glXGetFBConfigFromVisualSGIX (Display
*, XVisualInfo
*);
488 #endif /* GLX_GLXEXT_PROTOTYPES */
489 typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, int attribute
, int *value
);
490 typedef GLXFBConfigSGIX
* ( * PFNGLXCHOOSEFBCONFIGSGIXPROC
) (Display
*dpy
, int screen
, int *attrib_list
, int *nelements
);
491 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, Pixmap pixmap
);
492 typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, int render_type
, GLXContext share_list
, Bool direct
);
493 typedef XVisualInfo
* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
);
494 typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC
) (Display
*dpy
, XVisualInfo
*vis
);
497 #ifndef GLX_SGIX_pbuffer
498 #define GLX_SGIX_pbuffer 1
499 #ifdef GLX_GLXEXT_PROTOTYPES
500 extern GLXPbufferSGIX
glXCreateGLXPbufferSGIX (Display
*, GLXFBConfigSGIX
, unsigned int, unsigned int, int *);
501 extern void glXDestroyGLXPbufferSGIX (Display
*, GLXPbufferSGIX
);
502 extern int glXQueryGLXPbufferSGIX (Display
*, GLXPbufferSGIX
, int, unsigned int *);
503 extern void glXSelectEventSGIX (Display
*, GLXDrawable
, unsigned long);
504 extern void glXGetSelectedEventSGIX (Display
*, GLXDrawable
, unsigned long *);
505 #endif /* GLX_GLXEXT_PROTOTYPES */
506 typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXFBConfigSGIX config
, unsigned int width
, unsigned int height
, int *attrib_list
);
507 typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuf
);
508 typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuf
, int attribute
, unsigned int *value
);
509 typedef void ( * PFNGLXSELECTEVENTSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, unsigned long mask
);
510 typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, unsigned long *mask
);
513 #ifndef GLX_NV_float_buffer
514 #define GLX_NV_float_buffer 1
517 #ifndef GLX_SGI_cushion
518 #define GLX_SGI_cushion 1
519 #ifdef GLX_GLXEXT_PROTOTYPES
520 extern void glXCushionSGI (Display
*, Window
, float);
521 #endif /* GLX_GLXEXT_PROTOTYPES */
522 typedef void ( * PFNGLXCUSHIONSGIPROC
) (Display
*dpy
, Window window
, float cushion
);
525 #ifndef GLX_SGIX_video_resize
526 #define GLX_SGIX_video_resize 1
527 #ifdef GLX_GLXEXT_PROTOTYPES
528 extern int glXBindChannelToWindowSGIX (Display
*, int, int, Window
);
529 extern int glXChannelRectSGIX (Display
*, int, int, int, int, int, int);
530 extern int glXQueryChannelRectSGIX (Display
*, int, int, int *, int *, int *, int *);
531 extern int glXQueryChannelDeltasSGIX (Display
*, int, int, int *, int *, int *, int *);
532 extern int glXChannelRectSyncSGIX (Display
*, int, int, GLenum
);
533 #endif /* GLX_GLXEXT_PROTOTYPES */
534 typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC
) (Display
*display
, int screen
, int channel
, Window window
);
535 typedef int ( * PFNGLXCHANNELRECTSGIXPROC
) (Display
*display
, int screen
, int channel
, int x
, int y
, int w
, int h
);
536 typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC
) (Display
*display
, int screen
, int channel
, int *dx
, int *dy
, int *dw
, int *dh
);
537 typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC
) (Display
*display
, int screen
, int channel
, int *x
, int *y
, int *w
, int *h
);
538 typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC
) (Display
*display
, int screen
, int channel
, GLenum synctype
);
542 #ifndef GLX_SGIX_dmbuffer
543 #define GLX_SGIX_dmbuffer 1
544 #ifdef GLX_GLXEXT_PROTOTYPES
545 extern Bool
glXAssociateDMPbufferSGIX (Display
*, GLXPbufferSGIX
, DMparams
*, DMbuffer
);
546 #endif /* GLX_GLXEXT_PROTOTYPES */
547 typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC
) (Display
*dpy
, GLXPbufferSGIX pbuffer
, DMparams
*params
, DMbuffer dmbuffer
);
550 #endif /* _DM_BUFFER_H_ */
551 #ifndef GLX_SGIX_swap_group
552 #define GLX_SGIX_swap_group 1
553 #ifdef GLX_GLXEXT_PROTOTYPES
554 extern void glXJoinSwapGroupSGIX (Display
*, GLXDrawable
, GLXDrawable
);
555 #endif /* GLX_GLXEXT_PROTOTYPES */
556 typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, GLXDrawable member
);
559 #ifndef GLX_SGIX_swap_barrier
560 #define GLX_SGIX_swap_barrier 1
561 #ifdef GLX_GLXEXT_PROTOTYPES
562 extern void glXBindSwapBarrierSGIX (Display
*, GLXDrawable
, int);
563 extern Bool
glXQueryMaxSwapBarriersSGIX (Display
*, int, int *);
564 #endif /* GLX_GLXEXT_PROTOTYPES */
565 typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC
) (Display
*dpy
, GLXDrawable drawable
, int barrier
);
566 typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC
) (Display
*dpy
, int screen
, int *max
);
569 #ifndef GLX_SUN_get_transparent_index
570 #define GLX_SUN_get_transparent_index 1
571 #ifdef GLX_GLXEXT_PROTOTYPES
572 extern Status
glXGetTransparentIndexSUN (Display
*, Window
, Window
, long *);
573 #endif /* GLX_GLXEXT_PROTOTYPES */
574 typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC
) (Display
*dpy
, Window overlay
, Window underlay
, long *pTransparentIndex
);
577 #ifndef GLX_MESA_copy_sub_buffer
578 #define GLX_MESA_copy_sub_buffer 1
579 #ifdef GLX_GLXEXT_PROTOTYPES
580 extern void glXCopySubBufferMESA (Display
*, GLXDrawable
, int, int, int, int);
581 #endif /* GLX_GLXEXT_PROTOTYPES */
582 typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC
) (Display
*dpy
, GLXDrawable drawable
, int x
, int y
, int width
, int height
);
585 #ifndef GLX_MESA_pixmap_colormap
586 #define GLX_MESA_pixmap_colormap 1
587 #ifdef GLX_GLXEXT_PROTOTYPES
588 extern GLXPixmap
glXCreateGLXPixmapMESA (Display
*, XVisualInfo
*, Pixmap
, Colormap
);
589 #endif /* GLX_GLXEXT_PROTOTYPES */
590 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC
) (Display
*dpy
, XVisualInfo
*visual
, Pixmap pixmap
, Colormap cmap
);
593 #ifndef GLX_MESA_release_buffers
594 #define GLX_MESA_release_buffers 1
595 #ifdef GLX_GLXEXT_PROTOTYPES
596 extern Bool
glXReleaseBuffersMESA (Display
*, GLXDrawable
);
597 #endif /* GLX_GLXEXT_PROTOTYPES */
598 typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC
) (Display
*dpy
, GLXDrawable drawable
);
601 #ifndef GLX_MESA_set_3dfx_mode
602 #define GLX_MESA_set_3dfx_mode 1
603 #ifdef GLX_GLXEXT_PROTOTYPES
604 extern Bool
glXSet3DfxModeMESA (int);
605 #endif /* GLX_GLXEXT_PROTOTYPES */
606 typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC
) (int mode
);