#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glad/glx.h>
#ifndef GLAD_IMPL_UTIL_C_
#define GLAD_IMPL_UTIL_C_
#ifdef _MSC_VER
#define GLAD_IMPL_UTIL_SSCANF …
#else
#define GLAD_IMPL_UTIL_SSCANF …
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
int GLAD_GLX_VERSION_1_0 = …;
int GLAD_GLX_VERSION_1_1 = …;
int GLAD_GLX_VERSION_1_2 = …;
int GLAD_GLX_VERSION_1_3 = …;
int GLAD_GLX_VERSION_1_4 = …;
int GLAD_GLX_ARB_create_context = …;
int GLAD_GLX_ARB_create_context_profile = …;
int GLAD_GLX_ARB_get_proc_address = …;
int GLAD_GLX_EXT_swap_control = …;
int GLAD_GLX_MESA_swap_control = …;
int GLAD_GLX_SGI_swap_control = …;
PFNGLXCHOOSEFBCONFIGPROC glad_glXChooseFBConfig = …;
PFNGLXCHOOSEVISUALPROC glad_glXChooseVisual = …;
PFNGLXCOPYCONTEXTPROC glad_glXCopyContext = …;
PFNGLXCREATECONTEXTPROC glad_glXCreateContext = …;
PFNGLXCREATECONTEXTATTRIBSARBPROC glad_glXCreateContextAttribsARB = …;
PFNGLXCREATEGLXPIXMAPPROC glad_glXCreateGLXPixmap = …;
PFNGLXCREATENEWCONTEXTPROC glad_glXCreateNewContext = …;
PFNGLXCREATEPBUFFERPROC glad_glXCreatePbuffer = …;
PFNGLXCREATEPIXMAPPROC glad_glXCreatePixmap = …;
PFNGLXCREATEWINDOWPROC glad_glXCreateWindow = …;
PFNGLXDESTROYCONTEXTPROC glad_glXDestroyContext = …;
PFNGLXDESTROYGLXPIXMAPPROC glad_glXDestroyGLXPixmap = …;
PFNGLXDESTROYPBUFFERPROC glad_glXDestroyPbuffer = …;
PFNGLXDESTROYPIXMAPPROC glad_glXDestroyPixmap = …;
PFNGLXDESTROYWINDOWPROC glad_glXDestroyWindow = …;
PFNGLXGETCLIENTSTRINGPROC glad_glXGetClientString = …;
PFNGLXGETCONFIGPROC glad_glXGetConfig = …;
PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext = …;
PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay = …;
PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable = …;
PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable = …;
PFNGLXGETFBCONFIGATTRIBPROC glad_glXGetFBConfigAttrib = …;
PFNGLXGETFBCONFIGSPROC glad_glXGetFBConfigs = …;
PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress = …;
PFNGLXGETPROCADDRESSARBPROC glad_glXGetProcAddressARB = …;
PFNGLXGETSELECTEDEVENTPROC glad_glXGetSelectedEvent = …;
PFNGLXGETSWAPINTERVALMESAPROC glad_glXGetSwapIntervalMESA = …;
PFNGLXGETVISUALFROMFBCONFIGPROC glad_glXGetVisualFromFBConfig = …;
PFNGLXISDIRECTPROC glad_glXIsDirect = …;
PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent = …;
PFNGLXMAKECURRENTPROC glad_glXMakeCurrent = …;
PFNGLXQUERYCONTEXTPROC glad_glXQueryContext = …;
PFNGLXQUERYDRAWABLEPROC glad_glXQueryDrawable = …;
PFNGLXQUERYEXTENSIONPROC glad_glXQueryExtension = …;
PFNGLXQUERYEXTENSIONSSTRINGPROC glad_glXQueryExtensionsString = …;
PFNGLXQUERYSERVERSTRINGPROC glad_glXQueryServerString = …;
PFNGLXQUERYVERSIONPROC glad_glXQueryVersion = …;
PFNGLXSELECTEVENTPROC glad_glXSelectEvent = …;
PFNGLXSWAPBUFFERSPROC glad_glXSwapBuffers = …;
PFNGLXSWAPINTERVALEXTPROC glad_glXSwapIntervalEXT = …;
PFNGLXSWAPINTERVALMESAPROC glad_glXSwapIntervalMESA = …;
PFNGLXSWAPINTERVALSGIPROC glad_glXSwapIntervalSGI = …;
PFNGLXUSEXFONTPROC glad_glXUseXFont = …;
PFNGLXWAITGLPROC glad_glXWaitGL = …;
PFNGLXWAITXPROC glad_glXWaitX = …;
static void glad_glx_load_GLX_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_VERSION_1_2( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_VERSION_1_3( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_VERSION_1_4( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_ARB_create_context( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_ARB_get_proc_address( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_EXT_swap_control( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_MESA_swap_control( GLADuserptrloadfunc load, void* userptr) { … }
static void glad_glx_load_GLX_SGI_swap_control( GLADuserptrloadfunc load, void* userptr) { … }
static int glad_glx_has_extension(Display *display, int screen, const char *ext) { … }
static GLADapiproc glad_glx_get_proc_from_userptr(void *userptr, const char* name) { … }
static int glad_glx_find_extensions(Display *display, int screen) { … }
static int glad_glx_find_core_glx(Display **display, int *screen) { … }
int gladLoadGLXUserPtr(Display *display, int screen, GLADuserptrloadfunc load, void *userptr) { … }
int gladLoadGLX(Display *display, int screen, GLADloadfunc load) { … }
#ifdef GLAD_GLX
#ifndef GLAD_LOADER_LIBRARY_C_
#define GLAD_LOADER_LIBRARY_C_
#include <stddef.h>
#include <stdlib.h>
#if GLAD_PLATFORM_WIN32
#include <windows.h>
#else
#include <dlfcn.h>
#endif
static void* glad_get_dlopen_handle(const char *lib_names[], int length) { … }
static void glad_close_dlopen_handle(void* handle) { … }
static GLADapiproc glad_dlsym_handle(void* handle, const char *name) { … }
#endif
GLADglxprocaddrfunc;
static GLADapiproc glad_glx_get_proc(void *userptr, const char *name) { … }
static void* _glx_handle;
static void* glad_glx_dlopen_handle(void) { … }
int gladLoaderLoadGLX(Display *display, int screen) { … }
void gladLoaderUnloadGLX() { … }
#endif
#ifdef __cplusplus
}
#endif