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