| OLD | NEW |
| 1 /* | 1 /* |
| 2 ** The OpenGL Extension Wrangler Library | 2 ** The OpenGL Extension Wrangler Library |
| 3 ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> | 3 ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> |
| 4 ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> | 4 ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> |
| 5 ** Copyright (C) 2002, Lev Povalahev | 5 ** Copyright (C) 2002, Lev Povalahev |
| 6 ** All rights reserved. | 6 ** All rights reserved. |
| 7 ** | 7 ** |
| 8 ** Redistribution and use in source and binary forms, with or without | 8 ** Redistribution and use in source and binary forms, with or without |
| 9 ** modification, are permitted provided that the following conditions are met: | 9 ** modification, are permitted provided that the following conditions are met: |
| 10 ** | 10 ** |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 typedef XID GLXDrawable; | 133 typedef XID GLXDrawable; |
| 134 typedef XID GLXPixmap; | 134 typedef XID GLXPixmap; |
| 135 #ifdef __sun | 135 #ifdef __sun |
| 136 typedef struct __glXContextRec *GLXContext; | 136 typedef struct __glXContextRec *GLXContext; |
| 137 #else | 137 #else |
| 138 typedef struct __GLXcontextRec *GLXContext; | 138 typedef struct __GLXcontextRec *GLXContext; |
| 139 #endif | 139 #endif |
| 140 | 140 |
| 141 typedef unsigned int GLXVideoDeviceNV; | 141 typedef unsigned int GLXVideoDeviceNV; |
| 142 | 142 |
| 143 extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase); | 143 typedef Bool ( * PFNGLXQUERYEXTENSIONPROC) (Display *dpy, int *errorBase, int *e
ventBase); |
| 144 extern Bool glXQueryVersion (Display *dpy, int *major, int *minor); | 144 typedef Bool ( * PFNGLXQUERYVERSIONPROC) (Display *dpy, int *major, int *minor); |
| 145 extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value)
; | 145 typedef int ( * PFNGLXGETCONFIGPROC) (Display *dpy, XVisualInfo *vis, int attrib
, int *value); |
| 146 extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList); | 146 typedef XVisualInfo* ( * PFNGLXCHOOSEVISUALPROC) (Display *dpy, int screen, int
*attribList); |
| 147 extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixm
ap); | 147 typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPPROC) (Display *dpy, XVisualInfo *vis
, Pixmap pixmap); |
| 148 extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix); | 148 typedef void ( * PFNGLXDESTROYGLXPIXMAPPROC) (Display *dpy, GLXPixmap pix); |
| 149 extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext s
hareList, Bool direct); | 149 typedef GLXContext ( * PFNGLXCREATECONTEXTPROC) (Display *dpy, XVisualInfo *vis,
GLXContext shareList, Bool direct); |
| 150 extern void glXDestroyContext (Display *dpy, GLXContext ctx); | 150 typedef void ( * PFNGLXDESTROYCONTEXTPROC) (Display *dpy, GLXContext ctx); |
| 151 extern Bool glXIsDirect (Display *dpy, GLXContext ctx); | 151 typedef Bool ( * PFNGLXISDIRECTPROC) (Display *dpy, GLXContext ctx); |
| 152 extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLulon
g mask); | 152 typedef void ( * PFNGLXCOPYCONTEXTPROC) (Display *dpy, GLXContext src, GLXContex
t dst, GLulong mask); |
| 153 extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx); | 153 typedef Bool ( * PFNGLXMAKECURRENTPROC) (Display *dpy, GLXDrawable drawable, GLX
Context ctx); |
| 154 extern GLXContext glXGetCurrentContext (void); | 154 typedef GLXContext ( * PFNGLXGETCURRENTCONTEXTPROC) (void); |
| 155 extern GLXDrawable glXGetCurrentDrawable (void); | 155 typedef GLXDrawable ( * PFNGLXGETCURRENTDRAWABLEPROC) (void); |
| 156 extern void glXWaitGL (void); | 156 typedef void ( * PFNGLXWAITGLPROC) (void); |
| 157 extern void glXWaitX (void); | 157 typedef void ( * PFNGLXWAITXPROC) (void); |
| 158 extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable); | 158 typedef void ( * PFNGLXSWAPBUFFERSPROC) (Display *dpy, GLXDrawable drawable); |
| 159 extern void glXUseXFont (Font font, int first, int count, int listBase); | 159 typedef void ( * PFNGLXUSEXFONTPROC) (Font font, int first, int count, int listB
ase); |
| 160 |
| 161 #define glXQueryExtension GLXEW_GET_FUN(__glewXQueryExtension) |
| 162 #define glXQueryVersion GLXEW_GET_FUN(__glewXQueryVersion) |
| 163 #define glXGetConfig GLXEW_GET_FUN(__glewXGetConfig) |
| 164 #define glXChooseVisual GLXEW_GET_FUN(__glewXChooseVisual) |
| 165 #define glXCreateGLXPixmap GLXEW_GET_FUN(__glewXCreateGLXPixmap) |
| 166 #define glXDestroyGLXPixmap GLXEW_GET_FUN(__glewXDestroyGLXPixmap) |
| 167 #define glXCreateContext GLXEW_GET_FUN(__glewXCreateContext) |
| 168 #define glXDestroyContext GLXEW_GET_FUN(__glewXDestroyContext) |
| 169 #define glXIsDirect GLXEW_GET_FUN(__glewXIsDirect) |
| 170 #define glXCopyContext GLXEW_GET_FUN(__glewXCopyContext) |
| 171 #define glXMakeCurrent GLXEW_GET_FUN(__glewXMakeCurrent) |
| 172 #define glXGetCurrentContext GLXEW_GET_FUN(__glewXGetCurrentContext) |
| 173 #define glXGetCurrentDrawable GLXEW_GET_FUN(__glewXGetCurrentDrawable) |
| 174 #define glXWaitGL GLXEW_GET_FUN(__glewXWaitGL) |
| 175 #define glXWaitX GLXEW_GET_FUN(__glewXWaitX) |
| 176 #define glXSwapBuffers GLXEW_GET_FUN(__glewXSwapBuffers) |
| 177 #define glXUseXFont GLXEW_GET_FUN(__glewXUseXFont) |
| 160 | 178 |
| 161 #define GLXEW_VERSION_1_0 GLXEW_GET_VAR(__GLXEW_VERSION_1_0) | 179 #define GLXEW_VERSION_1_0 GLXEW_GET_VAR(__GLXEW_VERSION_1_0) |
| 162 | 180 |
| 163 #endif /* GLX_VERSION_1_0 */ | 181 #endif /* GLX_VERSION_1_0 */ |
| 164 | 182 |
| 165 /* ---------------------------- GLX_VERSION_1_1 --------------------------- */ | 183 /* ---------------------------- GLX_VERSION_1_1 --------------------------- */ |
| 166 | 184 |
| 167 #ifndef GLX_VERSION_1_1 | 185 #ifndef GLX_VERSION_1_1 |
| 168 #define GLX_VERSION_1_1 | 186 #define GLX_VERSION_1_1 |
| 169 | 187 |
| 170 #define GLX_VENDOR 0x1 | 188 #define GLX_VENDOR 0x1 |
| 171 #define GLX_VERSION 0x2 | 189 #define GLX_VERSION 0x2 |
| 172 #define GLX_EXTENSIONS 0x3 | 190 #define GLX_EXTENSIONS 0x3 |
| 173 | 191 |
| 174 extern const char* glXQueryExtensionsString (Display *dpy, int screen); | 192 typedef const char* (* PFNGLXQUERYEXTENSIONSSTRINGPROC) (Display *dpy, int scree
n); |
| 175 extern const char* glXGetClientString (Display *dpy, int name); | 193 typedef const char* (* PFNGLXGETCLIENTSTRINGPROC) (Display *dpy, int name); |
| 176 extern const char* glXQueryServerString (Display *dpy, int screen, int name); | 194 typedef const char* (* PFNGLXQUERYSERVERSTRINGPROC) (Display *dpy, int screen, i
nt name); |
| 195 |
| 196 #define glXQueryExtensionsString GLXEW_GET_FUN(__glewXQueryExtensionsString) |
| 197 #define glXGetClientString GLXEW_GET_FUN(__glewXGetClientString) |
| 198 #define glXQueryServerString GLXEW_GET_FUN(__glewXQueryServerString) |
| 177 | 199 |
| 178 #define GLXEW_VERSION_1_1 GLXEW_GET_VAR(__GLXEW_VERSION_1_1) | 200 #define GLXEW_VERSION_1_1 GLXEW_GET_VAR(__GLXEW_VERSION_1_1) |
| 179 | 201 |
| 180 #endif /* GLX_VERSION_1_1 */ | 202 #endif /* GLX_VERSION_1_1 */ |
| 181 | 203 |
| 182 /* ---------------------------- GLX_VERSION_1_2 ---------------------------- */ | 204 /* ---------------------------- GLX_VERSION_1_2 ---------------------------- */ |
| 183 | 205 |
| 184 #ifndef GLX_VERSION_1_2 | 206 #ifndef GLX_VERSION_1_2 |
| 185 #define GLX_VERSION_1_2 1 | 207 #define GLX_VERSION_1_2 1 |
| 186 | 208 |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 #endif /* GLX_SUN_video_resize */ | 1201 #endif /* GLX_SUN_video_resize */ |
| 1180 | 1202 |
| 1181 /* ------------------------------------------------------------------------- */ | 1203 /* ------------------------------------------------------------------------- */ |
| 1182 | 1204 |
| 1183 #ifdef GLEW_MX | 1205 #ifdef GLEW_MX |
| 1184 #define GLXEW_EXPORT | 1206 #define GLXEW_EXPORT |
| 1185 #else | 1207 #else |
| 1186 #define GLXEW_EXPORT extern | 1208 #define GLXEW_EXPORT extern |
| 1187 #endif /* GLEW_MX */ | 1209 #endif /* GLEW_MX */ |
| 1188 | 1210 |
| 1211 extern PFNGLXQUERYEXTENSIONPROC __glewXQueryExtension; |
| 1212 extern PFNGLXQUERYVERSIONPROC __glewXQueryVersion; |
| 1213 extern PFNGLXGETCONFIGPROC __glewXGetConfig; |
| 1214 extern PFNGLXCHOOSEVISUALPROC __glewXChooseVisual; |
| 1215 extern PFNGLXCREATEGLXPIXMAPPROC __glewXCreateGLXPixmap; |
| 1216 extern PFNGLXDESTROYGLXPIXMAPPROC __glewXDestroyGLXPixmap; |
| 1217 extern PFNGLXCREATECONTEXTPROC __glewXCreateContext; |
| 1218 extern PFNGLXDESTROYCONTEXTPROC __glewXDestroyContext; |
| 1219 extern PFNGLXISDIRECTPROC __glewXIsDirect; |
| 1220 extern PFNGLXCOPYCONTEXTPROC __glewXCopyContext; |
| 1221 extern PFNGLXMAKECURRENTPROC __glewXMakeCurrent; |
| 1222 extern PFNGLXGETCURRENTCONTEXTPROC __glewXGetCurrentContext; |
| 1223 extern PFNGLXGETCURRENTDRAWABLEPROC __glewXGetCurrentDrawable; |
| 1224 extern PFNGLXWAITGLPROC __glewXWaitGL; |
| 1225 extern PFNGLXWAITXPROC __glewXWaitX; |
| 1226 extern PFNGLXSWAPBUFFERSPROC __glewXSwapBuffers; |
| 1227 extern PFNGLXUSEXFONTPROC __glewXUseXFont; |
| 1228 |
| 1229 extern PFNGLXQUERYEXTENSIONSSTRINGPROC __glewXQueryExtensionsString; |
| 1230 extern PFNGLXGETCLIENTSTRINGPROC __glewXGetClientString; |
| 1231 extern PFNGLXQUERYSERVERSTRINGPROC __glewXQueryServerString; |
| 1232 |
| 1189 extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay; | 1233 extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay; |
| 1190 | 1234 |
| 1191 extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig; | 1235 extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig; |
| 1192 extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext; | 1236 extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext; |
| 1193 extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer; | 1237 extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer; |
| 1194 extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap; | 1238 extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap; |
| 1195 extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow; | 1239 extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow; |
| 1196 extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer; | 1240 extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer; |
| 1197 extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap; | 1241 extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap; |
| 1198 extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow; | 1242 extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 #define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x) | 1421 #define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x) |
| 1378 | 1422 |
| 1379 #define GLXEW_GET_VAR(x) (*(const GLboolean*)&(glxewGetContext()->x)) | 1423 #define GLXEW_GET_VAR(x) (*(const GLboolean*)&(glxewGetContext()->x)) |
| 1380 #define GLXEW_GET_FUN(x) x | 1424 #define GLXEW_GET_FUN(x) x |
| 1381 | 1425 |
| 1382 #else /* GLEW_MX */ | 1426 #else /* GLEW_MX */ |
| 1383 | 1427 |
| 1384 #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) | 1428 #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) |
| 1385 #define GLXEW_GET_FUN(x) x | 1429 #define GLXEW_GET_FUN(x) x |
| 1386 | 1430 |
| 1431 extern GLenum glxewInit (); |
| 1387 extern GLboolean glxewIsSupported (const char* name); | 1432 extern GLboolean glxewIsSupported (const char* name); |
| 1388 | 1433 |
| 1389 #endif /* GLEW_MX */ | 1434 #endif /* GLEW_MX */ |
| 1390 | 1435 |
| 1391 extern GLboolean glxewGetExtension (const char* name); | 1436 extern GLboolean glxewGetExtension (const char* name); |
| 1392 | 1437 |
| 1393 #ifdef __cplusplus | 1438 #ifdef __cplusplus |
| 1394 } | 1439 } |
| 1395 #endif | 1440 #endif |
| 1396 | 1441 |
| 1397 #endif /* __glxew_h__ */ | 1442 #endif /* __glxew_h__ */ |
| OLD | NEW |