Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
glx.c
Go to the documentation of this file.
1/**
2 * SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
3 */
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7#include <glad/glx.h>
8
9#ifndef GLAD_IMPL_UTIL_C_
10#define GLAD_IMPL_UTIL_C_
11
12#ifdef _MSC_VER
13#define GLAD_IMPL_UTIL_SSCANF sscanf_s
14#else
15#define GLAD_IMPL_UTIL_SSCANF sscanf
16#endif
17
18#endif /* GLAD_IMPL_UTIL_C_ */
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24
25
32
33
34
74
75
76static void glad_glx_load_GLX_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {
77 if(!GLAD_GLX_VERSION_1_0) return;
78 glad_glXChooseVisual = (PFNGLXCHOOSEVISUALPROC) load(userptr, "glXChooseVisual");
79 glad_glXCopyContext = (PFNGLXCOPYCONTEXTPROC) load(userptr, "glXCopyContext");
80 glad_glXCreateContext = (PFNGLXCREATECONTEXTPROC) load(userptr, "glXCreateContext");
81 glad_glXCreateGLXPixmap = (PFNGLXCREATEGLXPIXMAPPROC) load(userptr, "glXCreateGLXPixmap");
82 glad_glXDestroyContext = (PFNGLXDESTROYCONTEXTPROC) load(userptr, "glXDestroyContext");
83 glad_glXDestroyGLXPixmap = (PFNGLXDESTROYGLXPIXMAPPROC) load(userptr, "glXDestroyGLXPixmap");
84 glad_glXGetConfig = (PFNGLXGETCONFIGPROC) load(userptr, "glXGetConfig");
85 glad_glXGetCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC) load(userptr, "glXGetCurrentContext");
86 glad_glXGetCurrentDrawable = (PFNGLXGETCURRENTDRAWABLEPROC) load(userptr, "glXGetCurrentDrawable");
87 glad_glXIsDirect = (PFNGLXISDIRECTPROC) load(userptr, "glXIsDirect");
88 glad_glXMakeCurrent = (PFNGLXMAKECURRENTPROC) load(userptr, "glXMakeCurrent");
89 glad_glXQueryExtension = (PFNGLXQUERYEXTENSIONPROC) load(userptr, "glXQueryExtension");
90 glad_glXQueryVersion = (PFNGLXQUERYVERSIONPROC) load(userptr, "glXQueryVersion");
91 glad_glXSwapBuffers = (PFNGLXSWAPBUFFERSPROC) load(userptr, "glXSwapBuffers");
92 glad_glXUseXFont = (PFNGLXUSEXFONTPROC) load(userptr, "glXUseXFont");
93 glad_glXWaitGL = (PFNGLXWAITGLPROC) load(userptr, "glXWaitGL");
94 glad_glXWaitX = (PFNGLXWAITXPROC) load(userptr, "glXWaitX");
95}
96static void glad_glx_load_GLX_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {
97 if(!GLAD_GLX_VERSION_1_1) return;
98 glad_glXGetClientString = (PFNGLXGETCLIENTSTRINGPROC) load(userptr, "glXGetClientString");
99 glad_glXQueryExtensionsString = (PFNGLXQUERYEXTENSIONSSTRINGPROC) load(userptr, "glXQueryExtensionsString");
100 glad_glXQueryServerString = (PFNGLXQUERYSERVERSTRINGPROC) load(userptr, "glXQueryServerString");
101}
102static void glad_glx_load_GLX_VERSION_1_2( GLADuserptrloadfunc load, void* userptr) {
103 if(!GLAD_GLX_VERSION_1_2) return;
104 glad_glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC) load(userptr, "glXGetCurrentDisplay");
105}
106static void glad_glx_load_GLX_VERSION_1_3( GLADuserptrloadfunc load, void* userptr) {
107 if(!GLAD_GLX_VERSION_1_3) return;
108 glad_glXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) load(userptr, "glXChooseFBConfig");
109 glad_glXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC) load(userptr, "glXCreateNewContext");
110 glad_glXCreatePbuffer = (PFNGLXCREATEPBUFFERPROC) load(userptr, "glXCreatePbuffer");
111 glad_glXCreatePixmap = (PFNGLXCREATEPIXMAPPROC) load(userptr, "glXCreatePixmap");
112 glad_glXCreateWindow = (PFNGLXCREATEWINDOWPROC) load(userptr, "glXCreateWindow");
113 glad_glXDestroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) load(userptr, "glXDestroyPbuffer");
114 glad_glXDestroyPixmap = (PFNGLXDESTROYPIXMAPPROC) load(userptr, "glXDestroyPixmap");
115 glad_glXDestroyWindow = (PFNGLXDESTROYWINDOWPROC) load(userptr, "glXDestroyWindow");
116 glad_glXGetCurrentReadDrawable = (PFNGLXGETCURRENTREADDRAWABLEPROC) load(userptr, "glXGetCurrentReadDrawable");
117 glad_glXGetFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC) load(userptr, "glXGetFBConfigAttrib");
118 glad_glXGetFBConfigs = (PFNGLXGETFBCONFIGSPROC) load(userptr, "glXGetFBConfigs");
119 glad_glXGetSelectedEvent = (PFNGLXGETSELECTEDEVENTPROC) load(userptr, "glXGetSelectedEvent");
120 glad_glXGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC) load(userptr, "glXGetVisualFromFBConfig");
121 glad_glXMakeContextCurrent = (PFNGLXMAKECONTEXTCURRENTPROC) load(userptr, "glXMakeContextCurrent");
122 glad_glXQueryContext = (PFNGLXQUERYCONTEXTPROC) load(userptr, "glXQueryContext");
123 glad_glXQueryDrawable = (PFNGLXQUERYDRAWABLEPROC) load(userptr, "glXQueryDrawable");
124 glad_glXSelectEvent = (PFNGLXSELECTEVENTPROC) load(userptr, "glXSelectEvent");
125}
126static void glad_glx_load_GLX_VERSION_1_4( GLADuserptrloadfunc load, void* userptr) {
127 if(!GLAD_GLX_VERSION_1_4) return;
128 glad_glXGetProcAddress = (PFNGLXGETPROCADDRESSPROC) load(userptr, "glXGetProcAddress");
129}
130
131
132
133static int glad_glx_has_extension(Display *display, int screen, const char *ext) {
134#ifndef GLX_VERSION_1_1
135 GLAD_UNUSED(display);
136 GLAD_UNUSED(screen);
137 GLAD_UNUSED(ext);
138#else
139 const char *terminator;
140 const char *loc;
141 const char *extensions;
142
144 return 0;
145 }
146
147 extensions = glXQueryExtensionsString(display, screen);
148
149 if(extensions == NULL || ext == NULL) {
150 return 0;
151 }
152
153 while(1) {
154 loc = strstr(extensions, ext);
155 if(loc == NULL)
156 break;
157
158 terminator = loc + strlen(ext);
159 if((loc == extensions || *(loc - 1) == ' ') &&
160 (*terminator == ' ' || *terminator == '\0')) {
161 return 1;
162 }
163 extensions = terminator;
164 }
165#endif
166
167 return 0;
168}
169
170static GLADapiproc glad_glx_get_proc_from_userptr(void *userptr, const char* name) {
171 return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
172}
173
174static int glad_glx_find_extensions(Display *display, int screen) {
175 GLAD_GLX_ARB_multisample = glad_glx_has_extension(display, screen, "GLX_ARB_multisample");
176 return 1;
177}
178
179static int glad_glx_find_core_glx(Display **display, int *screen) {
180 int major = 0, minor = 0;
181 if(*display == NULL) {
182#ifdef GLAD_GLX_NO_X11
183 GLAD_UNUSED(screen);
184 return 0;
185#else
186 *display = XOpenDisplay(0);
187 if (*display == NULL) {
188 return 0;
189 }
190 *screen = XScreenNumberOfScreen(XDefaultScreenOfDisplay(*display));
191#endif
192 }
193 glXQueryVersion(*display, &major, &minor);
194 GLAD_GLX_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
195 GLAD_GLX_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
196 GLAD_GLX_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
197 GLAD_GLX_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
198 GLAD_GLX_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
199 return GLAD_MAKE_VERSION(major, minor);
200}
201
202int gladLoadGLXUserPtr(Display *display, int screen, GLADuserptrloadfunc load, void *userptr) {
203 int version;
204 glXQueryVersion = (PFNGLXQUERYVERSIONPROC) load(userptr, "glXQueryVersion");
205 if(glXQueryVersion == NULL) return 0;
206 version = glad_glx_find_core_glx(&display, &screen);
207
208 glad_glx_load_GLX_VERSION_1_0(load, userptr);
209 glad_glx_load_GLX_VERSION_1_1(load, userptr);
210 glad_glx_load_GLX_VERSION_1_2(load, userptr);
211 glad_glx_load_GLX_VERSION_1_3(load, userptr);
212 glad_glx_load_GLX_VERSION_1_4(load, userptr);
213
214 if (!glad_glx_find_extensions(display, screen)) return 0;
215
216
217 return version;
218}
219
220int gladLoadGLX(Display *display, int screen, GLADloadfunc load) {
221 return gladLoadGLXUserPtr(display, screen, glad_glx_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
222}
223
224
225
226#ifdef GLAD_GLX
227
228#ifndef GLAD_LOADER_LIBRARY_C_
229#define GLAD_LOADER_LIBRARY_C_
230
231#include <stddef.h>
232#include <stdlib.h>
233
234#if GLAD_PLATFORM_WIN32
235#include <windows.h>
236#else
237#include <dlfcn.h>
238#endif
239
240
241static void* glad_get_dlopen_handle(const char *lib_names[], int length) {
242 void *handle = NULL;
243 int i;
244
245 for (i = 0; i < length; ++i) {
246#if GLAD_PLATFORM_WIN32
247 #if GLAD_PLATFORM_UWP
248 size_t buffer_size = (strlen(lib_names[i]) + 1) * sizeof(WCHAR);
249 LPWSTR buffer = (LPWSTR) malloc(buffer_size);
250 if (buffer != NULL) {
251 int ret = MultiByteToWideChar(CP_ACP, 0, lib_names[i], -1, buffer, buffer_size);
252 if (ret != 0) {
253 handle = (void*) LoadPackagedLibrary(buffer, 0);
254 }
255 free((void*) buffer);
256 }
257 #else
258 handle = (void*) LoadLibraryA(lib_names[i]);
259 #endif
260#else
261 handle = dlopen(lib_names[i], RTLD_LAZY | RTLD_LOCAL);
262#endif
263 if (handle != NULL) {
264 return handle;
265 }
266 }
267
268 return NULL;
269}
270
271static void glad_close_dlopen_handle(void* handle) {
272 if (handle != NULL) {
273#if GLAD_PLATFORM_WIN32
274 FreeLibrary((HMODULE) handle);
275#else
276 dlclose(handle);
277#endif
278 }
279}
280
281static GLADapiproc glad_dlsym_handle(void* handle, const char *name) {
282 if (handle == NULL) {
283 return NULL;
284 }
285
286#if GLAD_PLATFORM_WIN32
287 return (GLADapiproc) GetProcAddress((HMODULE) handle, name);
288#else
290#endif
291}
292
293#endif /* GLAD_LOADER_LIBRARY_C_ */
294
295typedef void* (GLAD_API_PTR *GLADglxprocaddrfunc)(const char*);
296
297static GLADapiproc glad_glx_get_proc(void *userptr, const char *name) {
298 return GLAD_GNUC_EXTENSION ((GLADapiproc (*)(const char *name)) userptr)(name);
299}
300
301static void* _glx_handle;
302
303static void* glad_glx_dlopen_handle(void) {
304 static const char *NAMES[] = {
305#if defined __CYGWIN__
306 "libGL-1.so",
307#endif
308 "libGL.so.1",
309 "libGL.so"
310 };
311
312 if (_glx_handle == NULL) {
313 _glx_handle = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0]));
314 }
315
316 return _glx_handle;
317}
318
319int gladLoaderLoadGLX(Display *display, int screen) {
320 int version = 0;
321 void *handle = NULL;
322 int did_load = 0;
323 GLADglxprocaddrfunc loader;
324
325 did_load = _glx_handle == NULL;
326 handle = glad_glx_dlopen_handle();
327 if (handle != NULL) {
328 loader = (GLADglxprocaddrfunc) glad_dlsym_handle(handle, "glXGetProcAddressARB");
329 if (loader != NULL) {
330 version = gladLoadGLXUserPtr(display, screen, glad_glx_get_proc, GLAD_GNUC_EXTENSION (void*) loader);
331 }
332
333 if (!version && did_load) {
335 }
336 }
337
338 return version;
339}
340
341
342void gladLoaderUnloadGLX() {
343 if (_glx_handle != NULL) {
344 glad_close_dlopen_handle(_glx_handle);
345 _glx_handle = NULL;
346 }
347}
348
349#endif /* GLAD_GLX */
350
351#ifdef __cplusplus
352}
353#endif
char * ret
Definition Rotated.cxx:221
char name[80]
Definition TGX11.cxx:148
#define NULL
Definition ZInflate.c:15
#define free
Definition civetweb.c:1578
#define malloc
Definition civetweb.c:1575
GLADapiproc(* GLADuserptrloadfunc)(void *userptr, const char *name)
Definition gl.h:172
void(* GLADapiproc)(void)
Definition gl.h:169
#define GLAD_UNUSED(x)
Definition gl.h:119
#define GLAD_MAKE_VERSION(major, minor)
Definition gl.h:163
#define GLAD_GNUC_EXTENSION
Definition gl.h:116
GLADapiproc(* GLADloadfunc)(const char *name)
Definition gl.h:171
#define GLAD_API_PTR
Definition gl.h:152
static int glad_glx_has_extension(Display *display, int screen, const char *ext)
Definition glx.c:133
static void glad_glx_load_GLX_VERSION_1_0(GLADuserptrloadfunc load, void *userptr)
Definition glx.c:76
static GLADapiproc glad_glx_get_proc_from_userptr(void *userptr, const char *name)
Definition glx.c:170
int gladLoadGLX(Display *display, int screen, GLADloadfunc load)
Definition glx.c:220
static void glad_glx_load_GLX_VERSION_1_3(GLADuserptrloadfunc load, void *userptr)
Definition glx.c:106
static void glad_glx_load_GLX_VERSION_1_1(GLADuserptrloadfunc load, void *userptr)
Definition glx.c:96
static int glad_glx_find_extensions(Display *display, int screen)
Definition glx.c:174
int gladLoadGLXUserPtr(Display *display, int screen, GLADuserptrloadfunc load, void *userptr)
Definition glx.c:202
static void glad_glx_load_GLX_VERSION_1_4(GLADuserptrloadfunc load, void *userptr)
Definition glx.c:126
static void glad_glx_load_GLX_VERSION_1_2(GLADuserptrloadfunc load, void *userptr)
Definition glx.c:102
static int glad_glx_find_core_glx(Display **display, int *screen)
Definition glx.c:179
PFNGLXQUERYVERSIONPROC glad_glXQueryVersion
Definition glx.c:68
int gladLoaderLoadGLX(Display *display, int screen)
GLXContext(* PFNGLXCREATENEWCONTEXTPROC)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
Definition glx.h:439
int GLAD_GLX_VERSION_1_1
Definition glx.c:27
PFNGLXDESTROYWINDOWPROC glad_glXDestroyWindow
Definition glx.c:48
Bool(* PFNGLXISDIRECTPROC)(Display *dpy, GLXContext ctx)
Definition glx.h:459
PFNGLXDESTROYPIXMAPPROC glad_glXDestroyPixmap
Definition glx.c:47
PFNGLXUSEXFONTPROC glad_glXUseXFont
Definition glx.c:71
Bool(* PFNGLXMAKECONTEXTCURRENTPROC)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
Definition glx.h:460
PFNGLXGETVISUALFROMFBCONFIGPROC glad_glXGetVisualFromFBConfig
Definition glx.c:59
PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable
Definition glx.c:53
PFNGLXGETFBCONFIGATTRIBPROC glad_glXGetFBConfigAttrib
Definition glx.c:55
PFNGLXCREATENEWCONTEXTPROC glad_glXCreateNewContext
Definition glx.c:40
PFNGLXCREATEPIXMAPPROC glad_glXCreatePixmap
Definition glx.c:42
PFNGLXQUERYSERVERSTRINGPROC glad_glXQueryServerString
Definition glx.c:67
const char *(* PFNGLXGETCLIENTSTRINGPROC)(Display *dpy, int name)
Definition glx.h:448
void(* PFNGLXWAITGLPROC)(void)
Definition glx.h:471
PFNGLXQUERYCONTEXTPROC glad_glXQueryContext
Definition glx.c:63
PFNGLXCREATECONTEXTPROC glad_glXCreateContext
Definition glx.c:38
void(* PFNGLXDESTROYGLXPIXMAPPROC)(Display *dpy, GLXPixmap pixmap)
Definition glx.h:444
int GLAD_GLX_VERSION_1_4
Definition glx.c:30
GLXPbuffer(* PFNGLXCREATEPBUFFERPROC)(Display *dpy, GLXFBConfig config, const int *attrib_list)
Definition glx.h:440
Bool(* PFNGLXMAKECURRENTPROC)(Display *dpy, GLXDrawable drawable, GLXContext ctx)
Definition glx.h:461
PFNGLXDESTROYPBUFFERPROC glad_glXDestroyPbuffer
Definition glx.c:46
int(* PFNGLXGETCONFIGPROC)(Display *dpy, XVisualInfo *visual, int attrib, int *value)
Definition glx.h:449
__GLXextFuncPtr(* PFNGLXGETPROCADDRESSPROC)(const GLubyte *procName)
Definition glx.h:456
GLXFBConfig *(* PFNGLXCHOOSEFBCONFIGPROC)(Display *dpy, int screen, const int *attrib_list, int *nelements)
Definition glx.h:434
int(* PFNGLXQUERYCONTEXTPROC)(Display *dpy, GLXContext ctx, int attribute, int *value)
Definition glx.h:462
void(* PFNGLXDESTROYPBUFFERPROC)(Display *dpy, GLXPbuffer pbuf)
Definition glx.h:445
Bool(* PFNGLXQUERYVERSIONPROC)(Display *dpy, int *maj, int *min)
Definition glx.h:467
Display *(* PFNGLXGETCURRENTDISPLAYPROC)(void)
Definition glx.h:451
PFNGLXCOPYCONTEXTPROC glad_glXCopyContext
Definition glx.c:37
PFNGLXCHOOSEVISUALPROC glad_glXChooseVisual
Definition glx.c:36
GLXContext(* PFNGLXCREATECONTEXTPROC)(Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct)
Definition glx.h:437
PFNGLXSWAPBUFFERSPROC glad_glXSwapBuffers
Definition glx.c:70
int GLAD_GLX_VERSION_1_3
Definition glx.c:29
PFNGLXGETCONFIGPROC glad_glXGetConfig
Definition glx.c:50
PFNGLXWAITGLPROC glad_glXWaitGL
Definition glx.c:72
void gladLoaderUnloadGLX(void)
int GLAD_GLX_ARB_multisample
Definition glx.c:31
XVisualInfo *(* PFNGLXGETVISUALFROMFBCONFIGPROC)(Display *dpy, GLXFBConfig config)
Definition glx.h:458
void(* PFNGLXCOPYCONTEXTPROC)(Display *dpy, GLXContext src, GLXContext dst, unsigned long mask)
Definition glx.h:436
PFNGLXQUERYDRAWABLEPROC glad_glXQueryDrawable
Definition glx.c:64
void(* PFNGLXSWAPBUFFERSPROC)(Display *dpy, GLXDrawable drawable)
Definition glx.h:469
PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress
Definition glx.c:57
GLXPixmap(* PFNGLXCREATEPIXMAPPROC)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list)
Definition glx.h:441
PFNGLXQUERYEXTENSIONPROC glad_glXQueryExtension
Definition glx.c:65
int(* PFNGLXGETFBCONFIGATTRIBPROC)(Display *dpy, GLXFBConfig config, int attribute, int *value)
Definition glx.h:454
int GLAD_GLX_VERSION_1_0
Definition glx.c:26
PFNGLXGETCLIENTSTRINGPROC glad_glXGetClientString
Definition glx.c:49
const char *(* PFNGLXQUERYSERVERSTRINGPROC)(Display *dpy, int screen, int name)
Definition glx.h:466
PFNGLXSELECTEVENTPROC glad_glXSelectEvent
Definition glx.c:69
PFNGLXQUERYEXTENSIONSSTRINGPROC glad_glXQueryExtensionsString
Definition glx.c:66
PFNGLXDESTROYCONTEXTPROC glad_glXDestroyContext
Definition glx.c:44
void(* PFNGLXDESTROYWINDOWPROC)(Display *dpy, GLXWindow win)
Definition glx.h:447
PFNGLXCHOOSEFBCONFIGPROC glad_glXChooseFBConfig
Definition glx.c:35
const char *(* PFNGLXQUERYEXTENSIONSSTRINGPROC)(Display *dpy, int screen)
Definition glx.h:465
void(* PFNGLXSELECTEVENTPROC)(Display *dpy, GLXDrawable draw, unsigned long event_mask)
Definition glx.h:468
PFNGLXMAKECURRENTPROC glad_glXMakeCurrent
Definition glx.c:62
GLXFBConfig *(* PFNGLXGETFBCONFIGSPROC)(Display *dpy, int screen, int *nelements)
Definition glx.h:455
GLXWindow(* PFNGLXCREATEWINDOWPROC)(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list)
Definition glx.h:442
PFNGLXGETSELECTEDEVENTPROC glad_glXGetSelectedEvent
Definition glx.c:58
GLXDrawable(* PFNGLXGETCURRENTDRAWABLEPROC)(void)
Definition glx.h:452
PFNGLXISDIRECTPROC glad_glXIsDirect
Definition glx.c:60
void(* PFNGLXDESTROYCONTEXTPROC)(Display *dpy, GLXContext ctx)
Definition glx.h:443
GLXPixmap(* PFNGLXCREATEGLXPIXMAPPROC)(Display *dpy, XVisualInfo *visual, Pixmap pixmap)
Definition glx.h:438
void(* PFNGLXUSEXFONTPROC)(Font font, int first, int count, int list)
Definition glx.h:470
GLXDrawable(* PFNGLXGETCURRENTREADDRAWABLEPROC)(void)
Definition glx.h:453
void(* PFNGLXDESTROYPIXMAPPROC)(Display *dpy, GLXPixmap pixmap)
Definition glx.h:446
PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable
Definition glx.c:54
PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay
Definition glx.c:52
PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent
Definition glx.c:61
GLXContext(* PFNGLXGETCURRENTCONTEXTPROC)(void)
Definition glx.h:450
PFNGLXCREATEWINDOWPROC glad_glXCreateWindow
Definition glx.c:43
#define glXQueryExtensionsString
Definition glx.h:537
PFNGLXDESTROYGLXPIXMAPPROC glad_glXDestroyGLXPixmap
Definition glx.c:45
PFNGLXCREATEPBUFFERPROC glad_glXCreatePbuffer
Definition glx.c:41
Bool(* PFNGLXQUERYEXTENSIONPROC)(Display *dpy, int *errorb, int *event)
Definition glx.h:464
void(* PFNGLXQUERYDRAWABLEPROC)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
Definition glx.h:463
#define glXQueryVersion
Definition glx.h:541
PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext
Definition glx.c:51
void(* PFNGLXWAITXPROC)(void)
Definition glx.h:472
PFNGLXGETFBCONFIGSPROC glad_glXGetFBConfigs
Definition glx.c:56
XVisualInfo *(* PFNGLXCHOOSEVISUALPROC)(Display *dpy, int screen, int *attribList)
Definition glx.h:435
PFNGLXCREATEGLXPIXMAPPROC glad_glXCreateGLXPixmap
Definition glx.c:39
int GLAD_GLX_VERSION_1_2
Definition glx.c:28
PFNGLXWAITXPROC glad_glXWaitX
Definition glx.c:73
void(* PFNGLXGETSELECTEDEVENTPROC)(Display *dpy, GLXDrawable draw, unsigned long *event_mask)
Definition glx.h:457
BVH_ALWAYS_INLINE T length(const Vec< T, N > &v)
Definition vec.h:122
void * handle(void *ptr)
Definition threads.C:21