00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef __glxew_h__
00040 #define __glxew_h__
00041
00042 #ifdef __glxext_h_
00043 #error glxext.h included before glxew.h
00044 #endif
00045
00046 #define __glxext_h_
00047
00048 #ifndef _WIN32
00049
00050 #include <X11/Xlib.h>
00051 #include <X11/Xutil.h>
00052 #include <X11/Xmd.h>
00053 #include <GL/glew.h>
00054
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058
00059
00060 #define GLX_VERSION_1_0 1
00061 #define GLX_VERSION_1_1 1
00062 #define GLX_VERSION_1_2 1
00063 #define GLX_VERSION_1_3 1
00064 #define GLX_VERSION_1_4 1
00065
00066 #define GLX_ARB_get_proc_address 1
00067 #define GLX_ARB_multisample 1
00068
00069 #define GLX_EXT_import_context 1
00070 #define GLX_EXT_visual_info 1
00071 #define GLX_EXT_visual_rating 1
00072
00073 #define GLX_MESA_copy_sub_buffer 1
00074 #define GLX_MESA_pixmap_colormap 1
00075 #define GLX_MESA_release_buffers 1
00076 #define GLX_MESA_set_3dfx_mode 1
00077
00078 #define GLX_NV_vertex_array_range 1
00079
00080 #define GLX_OML_swap_method 1
00081 #define GLX_OML_sync_control 1
00082
00083 #define GLX_SGI_cushion 1
00084 #define GLX_SGI_make_current_read 1
00085 #define GLX_SGI_swap_control 1
00086 #define GLX_SGI_video_sync 1
00087 #define GLX_SGIS_blended_overlay 1
00088 #define GLX_SGIS_multisample 1
00089 #define GLX_SGIS_shared_multisample 1
00090
00091 #define GLX_SGIX_fbconfig 1
00092 #define GLX_SGIX_pbuffer 1
00093 #define GLX_SGIX_swap_group 1
00094 #define GLX_SGIX_swap_barrier 1
00095
00096
00097 #define GLX_SGIX_visual_select_group 1
00098
00099 #define GLX_SUN_get_transparent_index 1
00100
00101
00102
00103 #ifdef GLX_VERSION_1_0
00104
00105 #define GLX_USE_GL 1
00106 #define GLX_BUFFER_SIZE 2
00107 #define GLX_LEVEL 3
00108 #define GLX_RGBA 4
00109 #define GLX_DOUBLEBUFFER 5
00110 #define GLX_STEREO 6
00111 #define GLX_AUX_BUFFERS 7
00112 #define GLX_RED_SIZE 8
00113 #define GLX_GREEN_SIZE 9
00114 #define GLX_BLUE_SIZE 10
00115 #define GLX_ALPHA_SIZE 11
00116 #define GLX_DEPTH_SIZE 12
00117 #define GLX_STENCIL_SIZE 13
00118 #define GLX_ACCUM_RED_SIZE 14
00119 #define GLX_ACCUM_GREEN_SIZE 15
00120 #define GLX_ACCUM_BLUE_SIZE 16
00121 #define GLX_ACCUM_ALPHA_SIZE 17
00122 #define GLX_BAD_SCREEN 1
00123 #define GLX_BAD_ATTRIBUTE 2
00124 #define GLX_NO_EXTENSION 3
00125 #define GLX_BAD_VISUAL 4
00126 #define GLX_BAD_CONTEXT 5
00127 #define GLX_BAD_VALUE 6
00128 #define GLX_BAD_ENUM 7
00129
00130 typedef XID GLXDrawable;
00131 typedef XID GLXPixmap;
00132 typedef struct __GLXcontextRec *GLXContext;
00133
00134 #ifdef GLEW_PROTOTYPES
00135 typedef Bool ( * PFNGLXQUERYEXTENSIONPROC) (Display *dpy, int *errorBase, int *eventBase);
00136 typedef Bool ( * PFNGLXQUERYVERSIONPROC) (Display *dpy, int *major, int *minor);
00137 typedef int ( * PFNGLXGETCONFIGPROC) (Display *dpy, XVisualInfo *vis, int attrib, int *value);
00138 typedef XVisualInfo* ( * PFNGLXCHOOSEVISUALPROC) (Display *dpy, int screen, int *attribList);
00139 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPPROC) (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
00140 typedef void ( * PFNGLXDESTROYGLXPIXMAPPROC) (Display *dpy, GLXPixmap pix);
00141 typedef GLXContext ( * PFNGLXCREATECONTEXTPROC) (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
00142 typedef void ( * PFNGLXDESTROYCONTEXTPROC) (Display *dpy, GLXContext ctx);
00143 typedef Bool ( * PFNGLXISDIRECTPROC) (Display *dpy, GLXContext ctx);
00144 typedef void ( * PFNGLXCOPYCONTEXTPROC) (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
00145 typedef Bool ( * PFNGLXMAKECURRENTPROC) (Display *dpy, GLXDrawable drawable, GLXContext ctx);
00146 typedef GLXContext ( * PFNGLXGETCURRENTCONTEXTPROC) (void);
00147 typedef GLXDrawable ( * PFNGLXGETCURRENTDRAWABLEPROC) (void);
00148 typedef void ( * PFNGLXWAITGLPROC) (void);
00149 typedef void ( * PFNGLXWAITXPROC) (void);
00150 typedef void ( * PFNGLXSWAPBUFFERSPROC) (Display *dpy, GLXDrawable drawable);
00151 typedef void ( * PFNGLXUSEXFONTPROC) (Font font, int first, int count, int listBase);
00152
00153 extern PFNGLXQUERYEXTENSIONPROC glXQueryExtension;
00154 extern PFNGLXQUERYVERSIONPROC glXQueryVersion;
00155 extern PFNGLXGETCONFIGPROC glXGetConfig;
00156 extern PFNGLXCHOOSEVISUALPROC glXChooseVisual;
00157 extern PFNGLXCREATEGLXPIXMAPPROC glXCreateGLXPixmap;
00158 extern PFNGLXDESTROYGLXPIXMAPPROC glXDestroyGLXPixmap;
00159 extern PFNGLXCREATECONTEXTPROC glXCreateContext;
00160 extern PFNGLXDESTROYCONTEXTPROC glXDestroyContext;
00161 extern PFNGLXISDIRECTPROC glXIsDirect;
00162 extern PFNGLXCOPYCONTEXTPROC glXCopyContext;
00163 extern PFNGLXMAKECURRENTPROC glXMakeCurrent;
00164 extern PFNGLXGETCURRENTCONTEXTPROC glXGetCurrentContext;
00165 extern PFNGLXGETCURRENTDRAWABLEPROC glXGetCurrentDrawable;
00166 extern PFNGLXWAITGLPROC glXWaitGL;
00167 extern PFNGLXWAITXPROC glXWaitX;
00168 extern PFNGLXSWAPBUFFERSPROC glXSwapBuffers;
00169 extern PFNGLXUSEXFONTPROC glXUseXFont;
00170 #else
00171 extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
00172 extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
00173 extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
00174 extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
00175 extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
00176 extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
00177 extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
00178 extern void glXDestroyContext (Display *dpy, GLXContext ctx);
00179 extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
00180 extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
00181 extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
00182 extern GLXContext glXGetCurrentContext (void);
00183 extern GLXDrawable glXGetCurrentDrawable (void);
00184 extern void glXWaitGL (void);
00185 extern void glXWaitX (void);
00186 extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
00187 extern void glXUseXFont (Font font, int first, int count, int listBase);
00188 #endif
00189
00190 #endif
00191
00192
00193
00194 #ifdef GLX_VERSION_1_1
00195
00196 #define GLX_VENDOR 0x1
00197 #define GLX_VERSION 0x2
00198 #define GLX_EXTENSIONS 0x3
00199
00200 #ifdef GLEW_PROTOTYPES
00201 typedef const char* ( * PFNGLXQUERYEXTENSIONSSTRINGPROC) (Display *dpy, int screen);
00202 typedef const char* ( * PFNGLXGETCLIENTSTRINGPROC) (Display *dpy, int name);
00203 typedef const char* ( * PFNGLXQUERYSERVERSTRINGPROC) (Display *dpy, int screen, int name);
00204
00205 extern PFNGLXQUERYEXTENSIONSSTRINGPROC glXQueryExtensionsString;
00206 extern PFNGLXGETCLIENTSTRINGPROC glXGetClientString;
00207 extern PFNGLXQUERYSERVERSTRINGPROC glXQueryServerString;
00208 #else
00209 extern const char* glXQueryExtensionsString (Display *dpy, int screen);
00210 extern const char* glXGetClientString (Display *dpy, int name);
00211 extern const char* glXQueryServerString (Display *dpy, int screen, int name);
00212 #endif
00213
00214 #endif
00215
00216
00217
00218 #ifdef GLX_VERSION_1_2
00219
00220 typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
00221
00222 extern PFNGLXGETCURRENTDISPLAYPROC glXGetCurrentDisplay;
00223
00224 #endif
00225
00226
00227
00228 #ifdef GLX_VERSION_1_3
00229
00230 #define GLX_WINDOW_BIT 0x00000001
00231 #define GLX_PIXMAP_BIT 0x00000002
00232 #define GLX_PBUFFER_BIT 0x00000004
00233 #define GLX_RGBA_BIT 0x00000001
00234 #define GLX_COLOR_INDEX_BIT 0x00000002
00235 #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
00236 #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
00237 #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
00238 #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
00239 #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
00240 #define GLX_AUX_BUFFERS_BIT 0x00000010
00241 #define GLX_DEPTH_BUFFER_BIT 0x00000020
00242 #define GLX_STENCIL_BUFFER_BIT 0x00000040
00243 #define GLX_ACCUM_BUFFER_BIT 0x00000080
00244 #define GLX_CONFIG_CAVEAT 0x20
00245 #define GLX_X_VISUAL_TYPE 0x22
00246 #define GLX_TRANSPARENT_TYPE 0x23
00247 #define GLX_TRANSPARENT_INDEX_VALUE 0x24
00248 #define GLX_TRANSPARENT_RED_VALUE 0x25
00249 #define GLX_TRANSPARENT_GREEN_VALUE 0x26
00250 #define GLX_TRANSPARENT_BLUE_VALUE 0x27
00251 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
00252 #define GLX_DONT_CARE 0xFFFFFFFF
00253 #define GLX_NONE 0x8000
00254 #define GLX_SLOW_CONFIG 0x8001
00255 #define GLX_TRUE_COLOR 0x8002
00256 #define GLX_DIRECT_COLOR 0x8003
00257 #define GLX_PSEUDO_COLOR 0x8004
00258 #define GLX_STATIC_COLOR 0x8005
00259 #define GLX_GRAY_SCALE 0x8006
00260 #define GLX_STATIC_GRAY 0x8007
00261 #define GLX_TRANSPARENT_RGB 0x8008
00262 #define GLX_TRANSPARENT_INDEX 0x8009
00263 #define GLX_VISUAL_ID 0x800B
00264 #define GLX_SCREEN 0x800C
00265 #define GLX_NON_CONFORMANT_CONFIG 0x800D
00266 #define GLX_DRAWABLE_TYPE 0x8010
00267 #define GLX_RENDER_TYPE 0x8011
00268 #define GLX_X_RENDERABLE 0x8012
00269 #define GLX_FBCONFIG_ID 0x8013
00270 #define GLX_RGBA_TYPE 0x8014
00271 #define GLX_COLOR_INDEX_TYPE 0x8015
00272 #define GLX_MAX_PBUFFER_WIDTH 0x8016
00273 #define GLX_MAX_PBUFFER_HEIGHT 0x8017
00274 #define GLX_MAX_PBUFFER_PIXELS 0x8018
00275 #define GLX_PRESERVED_CONTENTS 0x801B
00276 #define GLX_LARGEST_PBUFFER 0x801C
00277 #define GLX_WIDTH 0x801D
00278 #define GLX_HEIGHT 0x801E
00279 #define GLX_EVENT_MASK 0x801F
00280 #define GLX_DAMAGED 0x8020
00281 #define GLX_SAVED 0x8021
00282 #define GLX_WINDOW 0x8022
00283 #define GLX_PBUFFER 0x8023
00284 #define GLX_PBUFFER_HEIGHT 0x8040
00285 #define GLX_PBUFFER_WIDTH 0x8041
00286
00287 typedef XID GLXWindow;
00288 typedef XID GLXPbuffer;
00289 typedef XID GLXFBConfigID;
00290 typedef struct __GLXFBConfigRec *GLXFBConfig;
00291 typedef struct {
00292 int event_type;
00293 int draw_type;
00294 unsigned long serial;
00295 Bool send_event;
00296 Display *display;
00297 GLXDrawable drawable;
00298 unsigned int buffer_mask;
00299 unsigned int aux_buffer;
00300 int x, y;
00301 int width, height;
00302 int count;
00303 } GLXPbufferClobberEvent;
00304 typedef union __GLXEvent {
00305 GLXPbufferClobberEvent glxpbufferclobber;
00306 long pad[24];
00307 } GLXEvent;
00308
00309 typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
00310 typedef GLXFBConfig* ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
00311 typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
00312 typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
00313 typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
00314 typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
00315 typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
00316 typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
00317 typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
00318 typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
00319 typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
00320 typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
00321 typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
00322 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
00323 typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
00324 typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
00325 typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
00326
00327 extern PFNGLXCHOOSEFBCONFIGPROC glXChooseFBConfig;
00328 extern PFNGLXGETFBCONFIGSPROC glXGetFBConfigs;
00329 extern PFNGLXGETVISUALFROMFBCONFIGPROC glXGetVisualFromFBConfig;
00330 extern PFNGLXGETFBCONFIGATTRIBPROC glXGetFBConfigAttrib;
00331 extern PFNGLXCREATEWINDOWPROC glXCreateWindow;
00332 extern PFNGLXDESTROYWINDOWPROC glXDestroyWindow;
00333 extern PFNGLXCREATEPIXMAPPROC glXCreatePixmap;
00334 extern PFNGLXDESTROYPIXMAPPROC glXDestroyPixmap;
00335 extern PFNGLXCREATEPBUFFERPROC glXCreatePbuffer;
00336 extern PFNGLXDESTROYPBUFFERPROC glXDestroyPbuffer;
00337 extern PFNGLXQUERYDRAWABLEPROC glXQueryDrawable;
00338 extern PFNGLXCREATENEWCONTEXTPROC glXCreateNewContext;
00339 extern PFNGLXMAKECONTEXTCURRENTPROC glXMakeContextCurrent;
00340 extern PFNGLXGETCURRENTREADDRAWABLEPROC glXGetCurrentReadDrawable;
00341 extern PFNGLXQUERYCONTEXTPROC glXQueryContext;
00342 extern PFNGLXSELECTEVENTPROC glXSelectEvent;
00343 extern PFNGLXGETSELECTEDEVENTPROC glXGetSelectedEvent;
00344
00345 #if 0
00346 extern GLXFBConfig* glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
00347 extern GLXFBConfig* glXGetFBConfigs (Display *dpy, int screen, int *nelements);
00348 extern XVisualInfo* glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
00349 extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
00350 extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
00351 extern void glXDestroyWindow (Display *dpy, GLXWindow win);
00352 extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
00353 extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
00354 extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
00355 extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
00356 extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
00357 extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
00358 extern Bool glXMakeContextCurrent (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
00359 extern GLXDrawable glXGetCurrentReadDrawable (void);
00360 extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
00361 extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
00362 extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
00363 #endif
00364
00365 #endif
00366
00367
00368
00369 #ifdef GLX_VERSION_1_4
00370
00371 #define GLX_SAMPLE_BUFFERS 100000
00372 #define GLX_SAMPLES 100001
00373
00374 extern void ( * glXGetProcAddress(const GLubyte *procName))(void);
00375
00376 #endif
00377
00378
00379
00380 #ifdef GLX_ARB_get_proc_address
00381
00382 extern void ( * glXGetProcAddressARB(const GLubyte *procName))(void);
00383
00384 #endif
00385
00386
00387
00388 #ifdef GLX_ARB_multisample
00389
00390 #define GLX_SAMPLE_BUFFERS_ARB 100000
00391 #define GLX_SAMPLES_ARB 100001
00392
00393 #endif
00394
00395
00396
00397 #ifdef GLX_EXT_visual_info
00398
00399 #define GLX_X_VISUAL_TYPE_EXT 0x22
00400 #define GLX_TRANSPARENT_TYPE_EXT 0x23
00401 #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
00402 #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
00403 #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
00404 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
00405 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
00406 #define GLX_NONE_EXT 0x8000
00407 #define GLX_TRUE_COLOR_EXT 0x8002
00408 #define GLX_DIRECT_COLOR_EXT 0x8003
00409 #define GLX_PSEUDO_COLOR_EXT 0x8004
00410 #define GLX_STATIC_COLOR_EXT 0x8005
00411 #define GLX_GRAY_SCALE_EXT 0x8006
00412 #define GLX_STATIC_GRAY_EXT 0x8007
00413 #define GLX_TRANSPARENT_RGB_EXT 0x8008
00414 #define GLX_TRANSPARENT_INDEX_EXT 0x8009
00415
00416 #endif
00417
00418
00419
00420 #ifdef GLX_EXT_visual_rating
00421
00422 #define GLX_VISUAL_CAVEAT_EXT 0x20
00423 #define GLX_SLOW_VISUAL_EXT 0x8001
00424 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
00425
00426 #endif
00427
00428
00429
00430 #ifdef GLX_EXT_import_context
00431
00432 #define GLX_SHARE_CONTEXT_EXT 0x800A
00433 #define GLX_VISUAL_ID_EXT 0x800B
00434 #define GLX_SCREEN_EXT 0x800C
00435
00436 typedef XID GLXContextID;
00437
00438 typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
00439 typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
00440 typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
00441 typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
00442 typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
00443
00444 extern PFNGLXGETCURRENTDISPLAYEXTPROC glXGetCurrentDisplayEXT;
00445 extern PFNGLXQUERYCONTEXTINFOEXTPROC glXQueryContextInfoEXT;
00446 extern PFNGLXGETCONTEXTIDEXTPROC glXGetContextIDEXT;
00447 extern PFNGLXIMPORTCONTEXTEXTPROC glXImportContextEXT;
00448 extern PFNGLXFREECONTEXTEXTPROC glXFreeContextEXT;
00449
00450 #endif
00451
00452
00453
00454 #ifdef GLX_MESA_copy_sub_buffer
00455
00456 typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
00457
00458 extern PFNGLXCOPYSUBBUFFERMESAPROC glXCopySubBufferMESA;
00459
00460 #endif
00461
00462
00463
00464 #ifdef GLX_MESA_pixmap_colormap
00465
00466 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
00467
00468 extern PFNGLXCREATEGLXPIXMAPMESAPROC glXCreateGLXPixmapMESA;
00469
00470 #endif
00471
00472
00473
00474 #ifdef GLX_MESA_release_buffers
00475
00476 typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
00477
00478 extern PFNGLXRELEASEBUFFERSMESAPROC glXReleaseBuffersMESA;
00479
00480 #endif
00481
00482
00483
00484 #ifdef GLX_MESA_set_3dfx_mode
00485
00486 typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
00487
00488 extern PFNGLXSET3DFXMODEMESAPROC glXSet3DfxModeMESA;
00489
00490 #endif
00491
00492
00493
00494 #ifdef GLX_OML_swap_method
00495
00496 #define GLX_SWAP_METHOD_OML 0x8060
00497 #define GLX_SWAP_EXCHANGE_OML 0x8061
00498 #define GLX_SWAP_COPY_OML 0x8062
00499 #define GLX_SWAP_UNDEFINED_OML 0x8063
00500
00501 #endif
00502
00503
00504
00505 #ifdef GLX_OML_sync_control
00506
00507 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
00508 #include <inttypes.h>
00509 typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
00510 typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
00511 typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
00512 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);
00513 typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
00514
00515 extern PFNGLXGETSYNCVALUESOMLPROC glXGetSyncValuesOML;
00516 extern PFNGLXGETMSCRATEOMLPROC glXGetMscRateOML;
00517 extern PFNGLXSWAPBUFFERSMSCOMLPROC glXSwapBuffersMscOML;
00518 extern PFNGLXWAITFORMSCOMLPROC glXWaitForMscOML;
00519 extern PFNGLXWAITFORSBCOMLPROC glXWaitForSbcOML;
00520 #endif
00521
00522 #endif
00523
00524
00525
00526 #ifdef GLX_NV_vertex_array_range
00527
00528 typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
00529 typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
00530
00531 extern PFNGLXALLOCATEMEMORYNVPROC glXAllocateMemoryNV;
00532 extern PFNGLXFREEMEMORYNVPROC glXFreeMemoryNV;
00533
00534 #endif
00535
00536
00537
00538 #ifdef GLX_SGI_cushion
00539
00540 typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
00541
00542 extern PFNGLXCUSHIONSGIPROC glXCushionSGI;
00543
00544 #endif
00545
00546
00547
00548 #ifdef GLX_SGI_make_current_read
00549
00550 typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
00551 typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
00552
00553 extern PFNGLXMAKECURRENTREADSGIPROC glXMakeCurrentReadSGI;
00554 extern PFNGLXGETCURRENTREADDRAWABLESGIPROC glXGetCurrentReadDrawableSGI;
00555
00556 #endif
00557
00558
00559
00560 #ifdef GLX_SGI_swap_control
00561
00562 typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
00563
00564 extern PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI;
00565
00566 #endif
00567
00568
00569
00570 #ifdef GLX_SGI_video_sync
00571
00572 typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
00573 typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
00574 typedef int ( * PFNGLXGETREFRESHRATESGIPROC) (unsigned int *rate);
00575
00576 extern PFNGLXGETVIDEOSYNCSGIPROC glXGetVideoSyncSGI;
00577 extern PFNGLXWAITVIDEOSYNCSGIPROC glXWaitVideoSyncSGI;
00578 extern PFNGLXGETREFRESHRATESGIPROC glXGetRefreshRateSGI;
00579
00580 #endif
00581
00582
00583
00584 #ifdef GLX_SGIS_blended_overlay
00585
00586 #define GLX_BLENDED_RGBA_SGIS 0x8025
00587
00588 #endif
00589
00590
00591
00592 #ifdef GLX_SGIS_multisample
00593
00594 #define GLX_SAMPLE_BUFFERS_SGIS 100000
00595 #define GLX_SAMPLES_SGIS 100001
00596
00597 #endif
00598
00599
00600
00601 #ifdef GLX_SGIS_shared_multisample
00602
00603 #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
00604 #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
00605
00606 #endif
00607
00608
00609
00610 #ifdef GLX_SGIX_fbconfig
00611
00612 #define GLX_WINDOW_BIT_SGIX 0x00000001
00613 #define GLX_PIXMAP_BIT_SGIX 0x00000002
00614 #define GLX_RGBA_BIT_SGIX 0x00000001
00615 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
00616 #define GLX_DRAWABLE_TYPE_SGIX 0x8010
00617 #define GLX_RENDER_TYPE_SGIX 0x8011
00618 #define GLX_X_RENDERABLE_SGIX 0x8012
00619 #define GLX_FBCONFIG_ID_SGIX 0x8013
00620 #define GLX_RGBA_TYPE_SGIX 0x8014
00621 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
00622
00623 typedef XID GLXFBConfigIDSGIX;
00624 typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
00625
00626 typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
00627 typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
00628 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
00629 typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
00630 typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
00631 typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
00632
00633 extern PFNGLXGETFBCONFIGATTRIBSGIXPROC glXGetFBConfigAttribSGIX;
00634 extern PFNGLXCHOOSEFBCONFIGSGIXPROC glXChooseFBConfigSGIX;
00635 extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC glXCreateGLXPixmapWithConfigSGIX;
00636 extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC glXCreateContextWithConfigSGIX;
00637 extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC glXGetVisualFromFBConfigSGIX;
00638 extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC glXGetFBConfigFromVisualSGIX;
00639
00640 #endif
00641
00642
00643
00644 #ifdef GLX_SGIX_pbuffer
00645
00646 #define GLX_PBUFFER_BIT_SGIX 0x00000004
00647 #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
00648 #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
00649 #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
00650 #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
00651 #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
00652 #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
00653 #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
00654 #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
00655 #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
00656 #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
00657 #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
00658 #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
00659 #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
00660 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
00661 #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
00662 #define GLX_PRESERVED_CONTENTS_SGIX 0x801B
00663 #define GLX_LARGEST_PBUFFER_SGIX 0x801C
00664 #define GLX_WIDTH_SGIX 0x801D
00665 #define GLX_HEIGHT_SGIX 0x801E
00666 #define GLX_EVENT_MASK_SGIX 0x801F
00667 #define GLX_DAMAGED_SGIX 0x8020
00668 #define GLX_SAVED_SGIX 0x8021
00669 #define GLX_WINDOW_SGIX 0x8022
00670 #define GLX_PBUFFER_SGIX 0x8023
00671
00672 typedef XID GLXPbufferSGIX;
00673 typedef struct {
00674 int type;
00675 unsigned long serial;
00676 Bool send_event;
00677 Display *display;
00678 GLXDrawable drawable;
00679 int event_type;
00680 int draw_type;
00681 unsigned int mask;
00682 int x, y;
00683 int width, height;
00684 int count;
00685 } GLXBufferClobberEventSGIX;
00686
00687 typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
00688 typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
00689 typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
00690 typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
00691 typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
00692
00693 extern PFNGLXCREATEGLXPBUFFERSGIXPROC glXCreateGLXPbufferSGIX;
00694 extern PFNGLXDESTROYGLXPBUFFERSGIXPROC glXDestroyGLXPbufferSGIX;
00695 extern PFNGLXQUERYGLXPBUFFERSGIXPROC glXQueryGLXPbufferSGIX;
00696 extern PFNGLXSELECTEVENTSGIXPROC glXSelectEventSGIX;
00697 extern PFNGLXGETSELECTEDEVENTSGIXPROC glXGetSelectedEventSGIX;
00698
00699 #endif
00700
00701
00702
00703 #ifdef GLX_SGIX_swap_barrier
00704
00705 typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
00706 typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
00707
00708 extern PFNGLXBINDSWAPBARRIERSGIXPROC glXBindSwapBarrierSGIX;
00709 extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC glXQueryMaxSwapBarriersSGIX;
00710
00711 #endif
00712
00713
00714
00715 #ifdef GLX_SGIX_swap_group
00716
00717 typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
00718
00719 extern PFNGLXJOINSWAPGROUPSGIXPROC glXJoinSwapGroupSGIX;
00720
00721 #endif
00722
00723
00724
00725 #ifndef GLX_SGIX_visual_select_group
00726
00727 #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
00728
00729 #endif
00730
00731
00732
00733 #ifdef GLX_SUN_get_transparent_index
00734
00735 typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
00736
00737 extern PFNGLXGETTRANSPARENTINDEXSUNPROC glXGetTransparentIndexSUN;
00738
00739 #endif
00740
00741
00742
00743 struct GLXEW
00744 {
00745 unsigned int GLX_10 : 1;
00746 unsigned int GLX_11 : 1;
00747 unsigned int GLX_12 : 1;
00748 unsigned int GLX_13 : 1;
00749 unsigned int GLX_14 : 1;
00750
00751 unsigned int ARB_get_proc_address : 1;
00752 unsigned int ARB_multisample : 1;
00753
00754 unsigned int EXT_import_context : 1;
00755 unsigned int EXT_visual_info : 1;
00756 unsigned int EXT_visual_rating : 1;
00757
00758 unsigned int MESA_copy_sub_buffer : 1;
00759 unsigned int MESA_pixmap_colormap : 1;
00760 unsigned int MESA_release_buffers : 1;
00761 unsigned int MESA_set_3dfx_mode : 1;
00762
00763 unsigned int NV_vertex_array_range : 1;
00764
00765 unsigned int OML_swap_method : 1;
00766 unsigned int OML_sync_control : 1;
00767
00768 unsigned int SGI_cushion : 1;
00769 unsigned int SGI_make_current_read : 1;
00770 unsigned int SGI_swap_control : 1;
00771 unsigned int SGI_video_sync : 1;
00772 unsigned int SGIS_blended_overlay : 1;
00773 unsigned int SGIS_multisample : 1;
00774 unsigned int SGIS_shared_multisample : 1;
00775
00776
00777 unsigned int SGIX_fbconfig : 1;
00778 unsigned int SGIX_pbuffer : 1;
00779 unsigned int SGIX_swap_group : 1;
00780 unsigned int SGIX_swap_barrier : 1;
00781
00782
00783 unsigned int SGIX_visual_select_group : 1;
00784
00785 unsigned int SUN_get_transparent_index : 1;
00786 };
00787
00788 extern struct GLXEW glxew;
00789 extern GLboolean glxewGetExtension (const char* name);
00790
00791 #ifdef __cplusplus
00792 }
00793 #endif
00794
00795 #endif
00796
00797 #endif