Merge branch 'origin' into glsl-compiler-1
[mesa.git] / include / GL / glxext.h
1 #ifndef __glxext_h_
2 #define __glxext_h_
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 /*
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:
16 **
17 ** http://oss.sgi.com/projects/FreeB
18 **
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.
24 **
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.
30 **
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.
35 */
36
37 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
38 #define WIN32_LEAN_AND_MEAN 1
39 #include <windows.h>
40 #endif
41
42 #ifndef APIENTRY
43 #define APIENTRY
44 #endif
45 #ifndef APIENTRYP
46 #define APIENTRYP APIENTRY *
47 #endif
48 #ifndef GLAPI
49 #define GLAPI extern
50 #endif
51
52 /*************************************************************/
53
54 /* Header file version number, required by OpenGL ABI for Linux */
55 /* glxext.h last updated 2007/02/13 */
56 /* Current version at http://www.opengl.org/registry/ */
57 #define GLX_GLXEXT_VERSION 18
58
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
116 #endif
117
118 #ifndef GLX_VERSION_1_4
119 #define GLX_SAMPLE_BUFFERS 100000
120 #define GLX_SAMPLES 100001
121 #endif
122
123 #ifndef GLX_ARB_get_proc_address
124 #endif
125
126 #ifndef GLX_ARB_multisample
127 #define GLX_SAMPLE_BUFFERS_ARB 100000
128 #define GLX_SAMPLES_ARB 100001
129 #endif
130
131 #ifndef GLX_ARB_fbconfig_float
132 #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
133 #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
134 #endif
135
136 #ifndef GLX_SGIS_multisample
137 #define GLX_SAMPLE_BUFFERS_SGIS 100000
138 #define GLX_SAMPLES_SGIS 100001
139 #endif
140
141 #ifndef GLX_EXT_visual_info
142 #define GLX_X_VISUAL_TYPE_EXT 0x22
143 #define GLX_TRANSPARENT_TYPE_EXT 0x23
144 #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
145 #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
146 #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
147 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
148 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
149 #define GLX_NONE_EXT 0x8000
150 #define GLX_TRUE_COLOR_EXT 0x8002
151 #define GLX_DIRECT_COLOR_EXT 0x8003
152 #define GLX_PSEUDO_COLOR_EXT 0x8004
153 #define GLX_STATIC_COLOR_EXT 0x8005
154 #define GLX_GRAY_SCALE_EXT 0x8006
155 #define GLX_STATIC_GRAY_EXT 0x8007
156 #define GLX_TRANSPARENT_RGB_EXT 0x8008
157 #define GLX_TRANSPARENT_INDEX_EXT 0x8009
158 #endif
159
160 #ifndef GLX_SGI_swap_control
161 #endif
162
163 #ifndef GLX_SGI_video_sync
164 #endif
165
166 #ifndef GLX_SGI_make_current_read
167 #endif
168
169 #ifndef GLX_SGIX_video_source
170 #endif
171
172 #ifndef GLX_EXT_visual_rating
173 #define GLX_VISUAL_CAVEAT_EXT 0x20
174 #define GLX_SLOW_VISUAL_EXT 0x8001
175 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
176 /* reuse GLX_NONE_EXT */
177 #endif
178
179 #ifndef GLX_EXT_import_context
180 #define GLX_SHARE_CONTEXT_EXT 0x800A
181 #define GLX_VISUAL_ID_EXT 0x800B
182 #define GLX_SCREEN_EXT 0x800C
183 #endif
184
185 #ifndef GLX_SGIX_fbconfig
186 #define GLX_WINDOW_BIT_SGIX 0x00000001
187 #define GLX_PIXMAP_BIT_SGIX 0x00000002
188 #define GLX_RGBA_BIT_SGIX 0x00000001
189 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
190 #define GLX_DRAWABLE_TYPE_SGIX 0x8010
191 #define GLX_RENDER_TYPE_SGIX 0x8011
192 #define GLX_X_RENDERABLE_SGIX 0x8012
193 #define GLX_FBCONFIG_ID_SGIX 0x8013
194 #define GLX_RGBA_TYPE_SGIX 0x8014
195 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
196 /* reuse GLX_SCREEN_EXT */
197 #endif
198
199 #ifndef GLX_SGIX_pbuffer
200 #define GLX_PBUFFER_BIT_SGIX 0x00000004
201 #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
202 #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
203 #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
204 #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
205 #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
206 #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
207 #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
208 #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
209 #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
210 #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
211 #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
212 #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
213 #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
214 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
215 #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
216 #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
217 #define GLX_LARGEST_PBUFFER_SGIX 0x801C
218 #define GLX_WIDTH_SGIX 0x801D
219 #define GLX_HEIGHT_SGIX 0x801E
220 #define GLX_EVENT_MASK_SGIX 0x801F
221 #define GLX_DAMAGED_SGIX 0x8020
222 #define GLX_SAVED_SGIX 0x8021
223 #define GLX_WINDOW_SGIX 0x8022
224 #define GLX_PBUFFER_SGIX 0x8023
225 #endif
226
227 #ifndef GLX_SGI_cushion
228 #endif
229
230 #ifndef GLX_SGIX_video_resize
231 #define GLX_SYNC_FRAME_SGIX 0x00000000
232 #define GLX_SYNC_SWAP_SGIX 0x00000001
233 #endif
234
235 #ifndef GLX_SGIX_dmbuffer
236 #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
237 #endif
238
239 #ifndef GLX_SGIX_swap_group
240 #endif
241
242 #ifndef GLX_SGIX_swap_barrier
243 #endif
244
245 #ifndef GLX_SGIS_blended_overlay
246 #define GLX_BLENDED_RGBA_SGIS 0x8025
247 #endif
248
249 #ifndef GLX_SGIS_shared_multisample
250 #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
251 #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
252 #endif
253
254 #ifndef GLX_SUN_get_transparent_index
255 #endif
256
257 #ifndef GLX_3DFX_multisample
258 #define GLX_SAMPLE_BUFFERS_3DFX 0x8050
259 #define GLX_SAMPLES_3DFX 0x8051
260 #endif
261
262 #ifndef GLX_MESA_copy_sub_buffer
263 #endif
264
265 #ifndef GLX_MESA_pixmap_colormap
266 #endif
267
268 #ifndef GLX_MESA_release_buffers
269 #endif
270
271 #ifndef GLX_MESA_set_3dfx_mode
272 #define GLX_3DFX_WINDOW_MODE_MESA 0x1
273 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
274 #endif
275
276 #ifndef GLX_SGIX_visual_select_group
277 #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
278 #endif
279
280 #ifndef GLX_OML_swap_method
281 #define GLX_SWAP_METHOD_OML 0x8060
282 #define GLX_SWAP_EXCHANGE_OML 0x8061
283 #define GLX_SWAP_COPY_OML 0x8062
284 #define GLX_SWAP_UNDEFINED_OML 0x8063
285 #endif
286
287 #ifndef GLX_OML_sync_control
288 #endif
289
290 #ifndef GLX_NV_float_buffer
291 #define GLX_FLOAT_COMPONENTS_NV 0x20B0
292 #endif
293
294 #ifndef GLX_SGIX_hyperpipe
295 #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
296 #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
297 #define GLX_BAD_HYPERPIPE_SGIX 92
298 #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
299 #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
300 #define GLX_PIPE_RECT_SGIX 0x00000001
301 #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
302 #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
303 #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
304 #define GLX_HYPERPIPE_ID_SGIX 0x8030
305 #endif
306
307 #ifndef GLX_MESA_agp_offset
308 #endif
309
310 #ifndef GLX_EXT_fbconfig_packed_float
311 #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
312 #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
313 #endif
314
315 #ifndef GLX_EXT_framebuffer_sRGB
316 #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
317 #endif
318
319 #ifndef GLX_EXT_texture_from_pixmap
320 #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
321 #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
322 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
323 #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
324 #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
325 #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
326 #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
327 #define GLX_Y_INVERTED_EXT 0x20D4
328 #define GLX_TEXTURE_FORMAT_EXT 0x20D5
329 #define GLX_TEXTURE_TARGET_EXT 0x20D6
330 #define GLX_MIPMAP_TEXTURE_EXT 0x20D7
331 #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
332 #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
333 #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
334 #define GLX_TEXTURE_1D_EXT 0x20DB
335 #define GLX_TEXTURE_2D_EXT 0x20DC
336 #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
337 #define GLX_FRONT_LEFT_EXT 0x20DE
338 #define GLX_FRONT_RIGHT_EXT 0x20DF
339 #define GLX_BACK_LEFT_EXT 0x20E0
340 #define GLX_BACK_RIGHT_EXT 0x20E1
341 #define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
342 #define GLX_BACK_EXT GLX_BACK_LEFT_EXT
343 #define GLX_AUX0_EXT 0x20E2
344 #define GLX_AUX1_EXT 0x20E3
345 #define GLX_AUX2_EXT 0x20E4
346 #define GLX_AUX3_EXT 0x20E5
347 #define GLX_AUX4_EXT 0x20E6
348 #define GLX_AUX5_EXT 0x20E7
349 #define GLX_AUX6_EXT 0x20E8
350 #define GLX_AUX7_EXT 0x20E9
351 #define GLX_AUX8_EXT 0x20EA
352 #define GLX_AUX9_EXT 0x20EB
353 #endif
354
355
356 /*************************************************************/
357
358 #ifndef GLX_ARB_get_proc_address
359 typedef void (*__GLXextFuncPtr)(void);
360 #endif
361
362 #ifndef GLX_SGIX_video_source
363 typedef XID GLXVideoSourceSGIX;
364 #endif
365
366 #ifndef GLX_SGIX_fbconfig
367 typedef XID GLXFBConfigIDSGIX;
368 typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
369 #endif
370
371 #ifndef GLX_SGIX_pbuffer
372 typedef XID GLXPbufferSGIX;
373 typedef struct {
374 int type;
375 unsigned long serial; /* # of last request processed by server */
376 Bool send_event; /* true if this came for SendEvent request */
377 Display *display; /* display the event was read from */
378 GLXDrawable drawable; /* i.d. of Drawable */
379 int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
380 int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
381 unsigned int mask; /* mask indicating which buffers are affected*/
382 int x, y;
383 int width, height;
384 int count; /* if nonzero, at least this many more */
385 } GLXBufferClobberEventSGIX;
386 #endif
387
388 #ifndef GLEXT_64_TYPES_DEFINED
389 /* This code block is duplicated in glxext.h, so must be protected */
390 #define GLEXT_64_TYPES_DEFINED
391 /* Define int32_t, int64_t, and uint64_t types for UST/MSC */
392 /* (as used in the GLX_OML_sync_control extension). */
393 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
394 #include <inttypes.h>
395 #elif defined(__sun__)
396 #include <inttypes.h>
397 #if defined(__STDC__)
398 #if defined(__arch64__)
399 typedef long int int64_t;
400 typedef unsigned long int uint64_t;
401 #else
402 typedef long long int int64_t;
403 typedef unsigned long long int uint64_t;
404 #endif /* __arch64__ */
405 #endif /* __STDC__ */
406 #elif defined( __VMS )
407 #include <inttypes.h>
408 #elif defined(__SCO__) || defined(__USLC__)
409 #include <stdint.h>
410 #elif defined(__UNIXOS2__) || defined(__SOL64__)
411 typedef long int int32_t;
412 typedef long long int int64_t;
413 typedef unsigned long long int uint64_t;
414 #elif defined(_WIN32) && defined(__GNUC__)
415 #include <stdint.h>
416 #elif defined(_WIN32)
417 typedef __int32 int32_t;
418 typedef __int64 int64_t;
419 typedef unsigned __int64 uint64_t;
420 #else
421 #include <inttypes.h> /* Fallback option */
422 #endif
423 #endif
424
425 #ifndef GLX_VERSION_1_3
426 #define GLX_VERSION_1_3 1
427 #ifdef GLX_GLXEXT_PROTOTYPES
428 extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
429 extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
430 extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
431 extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
432 extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
433 extern void glXDestroyWindow (Display *, GLXWindow);
434 extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
435 extern void glXDestroyPixmap (Display *, GLXPixmap);
436 extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
437 extern void glXDestroyPbuffer (Display *, GLXPbuffer);
438 extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
439 extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
440 extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
441 extern GLXDrawable glXGetCurrentReadDrawable (void);
442 extern Display * glXGetCurrentDisplay (void);
443 extern int glXQueryContext (Display *, GLXContext, int, int *);
444 extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
445 extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
446 #endif /* GLX_GLXEXT_PROTOTYPES */
447 typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
448 typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
449 typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
450 typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
451 typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
452 typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
453 typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
454 typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
455 typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
456 typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
457 typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
458 typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
459 typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
460 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
461 typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
462 typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
463 typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
464 typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
465 #endif
466
467 #ifndef GLX_VERSION_1_4
468 #define GLX_VERSION_1_4 1
469 #ifdef GLX_GLXEXT_PROTOTYPES
470 extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
471 #endif /* GLX_GLXEXT_PROTOTYPES */
472 typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
473 #endif
474
475 #ifndef GLX_ARB_get_proc_address
476 #define GLX_ARB_get_proc_address 1
477 #ifdef GLX_GLXEXT_PROTOTYPES
478 extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
479 #endif /* GLX_GLXEXT_PROTOTYPES */
480 typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
481 #endif
482
483 #ifndef GLX_ARB_multisample
484 #define GLX_ARB_multisample 1
485 #endif
486
487 #ifndef GLX_ARB_fbconfig_float
488 #define GLX_ARB_fbconfig_float 1
489 #endif
490
491 #ifndef GLX_SGIS_multisample
492 #define GLX_SGIS_multisample 1
493 #endif
494
495 #ifndef GLX_EXT_visual_info
496 #define GLX_EXT_visual_info 1
497 #endif
498
499 #ifndef GLX_SGI_swap_control
500 #define GLX_SGI_swap_control 1
501 #ifdef GLX_GLXEXT_PROTOTYPES
502 extern int glXSwapIntervalSGI (int);
503 #endif /* GLX_GLXEXT_PROTOTYPES */
504 typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
505 #endif
506
507 #ifndef GLX_SGI_video_sync
508 #define GLX_SGI_video_sync 1
509 #ifdef GLX_GLXEXT_PROTOTYPES
510 extern int glXGetVideoSyncSGI (unsigned int *);
511 extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
512 #endif /* GLX_GLXEXT_PROTOTYPES */
513 typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
514 typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
515 #endif
516
517 #ifndef GLX_SGI_make_current_read
518 #define GLX_SGI_make_current_read 1
519 #ifdef GLX_GLXEXT_PROTOTYPES
520 extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
521 extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
522 #endif /* GLX_GLXEXT_PROTOTYPES */
523 typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
524 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
525 #endif
526
527 #ifndef GLX_SGIX_video_source
528 #define GLX_SGIX_video_source 1
529 #ifdef _VL_H
530 #ifdef GLX_GLXEXT_PROTOTYPES
531 extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
532 extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
533 #endif /* GLX_GLXEXT_PROTOTYPES */
534 typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
535 typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
536 #endif /* _VL_H */
537 #endif
538
539 #ifndef GLX_EXT_visual_rating
540 #define GLX_EXT_visual_rating 1
541 #endif
542
543 #ifndef GLX_EXT_import_context
544 #define GLX_EXT_import_context 1
545 #ifdef GLX_GLXEXT_PROTOTYPES
546 extern Display * glXGetCurrentDisplayEXT (void);
547 extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
548 extern GLXContextID glXGetContextIDEXT (const GLXContext);
549 extern GLXContext glXImportContextEXT (Display *, GLXContextID);
550 extern void glXFreeContextEXT (Display *, GLXContext);
551 #endif /* GLX_GLXEXT_PROTOTYPES */
552 typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
553 typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
554 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
555 typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
556 typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
557 #endif
558
559 #ifndef GLX_SGIX_fbconfig
560 #define GLX_SGIX_fbconfig 1
561 #ifdef GLX_GLXEXT_PROTOTYPES
562 extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
563 extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
564 extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
565 extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
566 extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
567 extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
568 #endif /* GLX_GLXEXT_PROTOTYPES */
569 typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
570 typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
571 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
572 typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
573 typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
574 typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
575 #endif
576
577 #ifndef GLX_SGIX_pbuffer
578 #define GLX_SGIX_pbuffer 1
579 #ifdef GLX_GLXEXT_PROTOTYPES
580 extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
581 extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
582 extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
583 extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
584 extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
585 #endif /* GLX_GLXEXT_PROTOTYPES */
586 typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
587 typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
588 typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
589 typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
590 typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
591 #endif
592
593 #ifndef GLX_SGI_cushion
594 #define GLX_SGI_cushion 1
595 #ifdef GLX_GLXEXT_PROTOTYPES
596 extern void glXCushionSGI (Display *, Window, float);
597 #endif /* GLX_GLXEXT_PROTOTYPES */
598 typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
599 #endif
600
601 #ifndef GLX_SGIX_video_resize
602 #define GLX_SGIX_video_resize 1
603 #ifdef GLX_GLXEXT_PROTOTYPES
604 extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
605 extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
606 extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
607 extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
608 extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
609 #endif /* GLX_GLXEXT_PROTOTYPES */
610 typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
611 typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
612 typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
613 typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
614 typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
615 #endif
616
617 #ifndef GLX_SGIX_dmbuffer
618 #define GLX_SGIX_dmbuffer 1
619 #ifdef _DM_BUFFER_H_
620 #ifdef GLX_GLXEXT_PROTOTYPES
621 extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
622 #endif /* GLX_GLXEXT_PROTOTYPES */
623 typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
624 #endif /* _DM_BUFFER_H_ */
625 #endif
626
627 #ifndef GLX_SGIX_swap_group
628 #define GLX_SGIX_swap_group 1
629 #ifdef GLX_GLXEXT_PROTOTYPES
630 extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
631 #endif /* GLX_GLXEXT_PROTOTYPES */
632 typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
633 #endif
634
635 #ifndef GLX_SGIX_swap_barrier
636 #define GLX_SGIX_swap_barrier 1
637 #ifdef GLX_GLXEXT_PROTOTYPES
638 extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
639 extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
640 #endif /* GLX_GLXEXT_PROTOTYPES */
641 typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
642 typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
643 #endif
644
645 #ifndef GLX_SUN_get_transparent_index
646 #define GLX_SUN_get_transparent_index 1
647 #ifdef GLX_GLXEXT_PROTOTYPES
648 extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
649 #endif /* GLX_GLXEXT_PROTOTYPES */
650 typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
651 #endif
652
653 #ifndef GLX_MESA_copy_sub_buffer
654 #define GLX_MESA_copy_sub_buffer 1
655 #ifdef GLX_GLXEXT_PROTOTYPES
656 extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
657 #endif /* GLX_GLXEXT_PROTOTYPES */
658 typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
659 #endif
660
661 #ifndef GLX_MESA_pixmap_colormap
662 #define GLX_MESA_pixmap_colormap 1
663 #ifdef GLX_GLXEXT_PROTOTYPES
664 extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
665 #endif /* GLX_GLXEXT_PROTOTYPES */
666 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
667 #endif
668
669 #ifndef GLX_MESA_release_buffers
670 #define GLX_MESA_release_buffers 1
671 #ifdef GLX_GLXEXT_PROTOTYPES
672 extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
673 #endif /* GLX_GLXEXT_PROTOTYPES */
674 typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
675 #endif
676
677 #ifndef GLX_MESA_set_3dfx_mode
678 #define GLX_MESA_set_3dfx_mode 1
679 #ifdef GLX_GLXEXT_PROTOTYPES
680 extern Bool glXSet3DfxModeMESA (int);
681 #endif /* GLX_GLXEXT_PROTOTYPES */
682 typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
683 #endif
684
685 #ifndef GLX_SGIX_visual_select_group
686 #define GLX_SGIX_visual_select_group 1
687 #endif
688
689 #ifndef GLX_OML_swap_method
690 #define GLX_OML_swap_method 1
691 #endif
692
693 #ifndef GLX_OML_sync_control
694 #define GLX_OML_sync_control 1
695 #ifdef GLX_GLXEXT_PROTOTYPES
696 extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
697 extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
698 extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
699 extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
700 extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
701 #endif /* GLX_GLXEXT_PROTOTYPES */
702 typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
703 typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
704 typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
705 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);
706 typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
707 #endif
708
709 #ifndef GLX_NV_float_buffer
710 #define GLX_NV_float_buffer 1
711 #endif
712
713 #ifndef GLX_SGIX_hyperpipe
714 #define GLX_SGIX_hyperpipe 1
715
716 typedef struct {
717 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
718 int networkId;
719 } GLXHyperpipeNetworkSGIX;
720
721 typedef struct {
722 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
723 int channel;
724 unsigned int
725 participationType;
726 int timeSlice;
727 } GLXHyperpipeConfigSGIX;
728
729 typedef struct {
730 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
731 int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
732 int destXOrigin, destYOrigin, destWidth, destHeight;
733 } GLXPipeRect;
734
735 typedef struct {
736 char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
737 int XOrigin, YOrigin, maxHeight, maxWidth;
738 } GLXPipeRectLimits;
739
740 #ifdef GLX_GLXEXT_PROTOTYPES
741 extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
742 extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
743 extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
744 extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
745 extern int glXBindHyperpipeSGIX (Display *, int);
746 extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
747 extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
748 extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
749 #endif /* GLX_GLXEXT_PROTOTYPES */
750 typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
751 typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
752 typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
753 typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
754 typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
755 typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
756 typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
757 typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
758 #endif
759
760 #ifndef GLX_MESA_agp_offset
761 #define GLX_MESA_agp_offset 1
762 #ifdef GLX_GLXEXT_PROTOTYPES
763 extern unsigned int glXGetAGPOffsetMESA (const void *);
764 #endif /* GLX_GLXEXT_PROTOTYPES */
765 typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
766 #endif
767
768 #ifndef GLX_EXT_fbconfig_packed_float
769 #define GLX_EXT_fbconfig_packed_float 1
770 #endif
771
772 #ifndef GLX_EXT_framebuffer_sRGB
773 #define GLX_EXT_framebuffer_sRGB 1
774 #endif
775
776 #ifndef GLX_EXT_texture_from_pixmap
777 #define GLX_EXT_texture_from_pixmap 1
778 #ifdef GLX_GLXEXT_PROTOTYPES
779 extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
780 extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
781 #endif /* GLX_GLXEXT_PROTOTYPES */
782 typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
783 typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
784 #endif
785
786
787 #ifdef __cplusplus
788 }
789 #endif
790
791 #endif