deps/glad: Add support for glSwapIntervalMESA
Just in case glSwapIntervalEXT and glSwapIntervalSGI aren't available for whatever reason. This entire patch is most likely completely redundant on modern mesa drivers.
This commit is contained in:
parent
726163aa29
commit
aa48c6e9bc
7
deps/glad/include/glad/glad_glx.h
vendored
7
deps/glad/include/glad/glad_glx.h
vendored
@ -764,6 +764,13 @@ typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTREADDRAWABLESGIPROC)();
|
||||
GLAPI PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI;
|
||||
#define glXGetCurrentReadDrawableSGI glad_glXGetCurrentReadDrawableSGI
|
||||
#endif
|
||||
#ifndef GLX_MESA_swap_control
|
||||
#define GLX_MESA_swap_control 1
|
||||
GLAPI int GLAD_GLX_MESA_swap_control;
|
||||
typedef int (APIENTRYP PFNGLXSWAPINTERVALMESAPROC)(int);
|
||||
GLAPI PFNGLXSWAPINTERVALMESAPROC glad_glXSwapIntervalMESA;
|
||||
#define glXSwapIntervalMESA glad_glXSwapIntervalMESA
|
||||
#endif
|
||||
#ifndef GLX_SGI_swap_control
|
||||
#define GLX_SGI_swap_control 1
|
||||
GLAPI int GLAD_GLX_SGI_swap_control;
|
||||
|
8
deps/glad/src/glad_glx.c
vendored
8
deps/glad/src/glad_glx.c
vendored
@ -203,6 +203,7 @@ int GLAD_GLX_NV_copy_image;
|
||||
int GLAD_GLX_OML_sync_control;
|
||||
int GLAD_GLX_EXT_framebuffer_sRGB;
|
||||
int GLAD_GLX_SGI_make_current_read;
|
||||
int GLAD_GLX_MESA_swap_control;
|
||||
int GLAD_GLX_SGI_swap_control;
|
||||
int GLAD_GLX_EXT_fbconfig_packed_float;
|
||||
int GLAD_GLX_EXT_buffer_age;
|
||||
@ -280,6 +281,7 @@ PFNGLXWAITFORMSCOMLPROC glad_glXWaitForMscOML;
|
||||
PFNGLXWAITFORSBCOMLPROC glad_glXWaitForSbcOML;
|
||||
PFNGLXMAKECURRENTREADSGIPROC glad_glXMakeCurrentReadSGI;
|
||||
PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI;
|
||||
PFNGLXSWAPINTERVALMESAPROC glad_glXSwapIntervalMESA;
|
||||
PFNGLXSWAPINTERVALSGIPROC glad_glXSwapIntervalSGI;
|
||||
PFNGLXGETVIDEOSYNCSGIPROC glad_glXGetVideoSyncSGI;
|
||||
PFNGLXWAITVIDEOSYNCSGIPROC glad_glXWaitVideoSyncSGI;
|
||||
@ -444,6 +446,10 @@ static void load_GLX_SGI_make_current_read(GLADloadproc load) {
|
||||
glad_glXMakeCurrentReadSGI = (PFNGLXMAKECURRENTREADSGIPROC)load("glXMakeCurrentReadSGI");
|
||||
glad_glXGetCurrentReadDrawableSGI = (PFNGLXGETCURRENTREADDRAWABLESGIPROC)load("glXGetCurrentReadDrawableSGI");
|
||||
}
|
||||
static void load_GLX_MESA_swap_control(GLADloadproc load) {
|
||||
if(!GLAD_GLX_MESA_swap_control) return;
|
||||
glad_glXSwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)load("glXSwapIntervalMESA");
|
||||
}
|
||||
static void load_GLX_SGI_swap_control(GLADloadproc load) {
|
||||
if(!GLAD_GLX_SGI_swap_control) return;
|
||||
glad_glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)load("glXSwapIntervalSGI");
|
||||
@ -584,6 +590,7 @@ static void find_extensionsGLX(void) {
|
||||
GLAD_GLX_OML_sync_control = has_ext("GLX_OML_sync_control");
|
||||
GLAD_GLX_EXT_framebuffer_sRGB = has_ext("GLX_EXT_framebuffer_sRGB");
|
||||
GLAD_GLX_SGI_make_current_read = has_ext("GLX_SGI_make_current_read");
|
||||
GLAD_GLX_MESA_swap_control = has_ext("GLX_MESA_swap_control");
|
||||
GLAD_GLX_SGI_swap_control = has_ext("GLX_SGI_swap_control");
|
||||
GLAD_GLX_EXT_fbconfig_packed_float = has_ext("GLX_EXT_fbconfig_packed_float");
|
||||
GLAD_GLX_EXT_buffer_age = has_ext("GLX_EXT_buffer_age");
|
||||
@ -664,6 +671,7 @@ void gladLoadGLXLoader(GLADloadproc load, Display *dpy, int screen) {
|
||||
load_GLX_NV_copy_image(load);
|
||||
load_GLX_OML_sync_control(load);
|
||||
load_GLX_SGI_make_current_read(load);
|
||||
load_GLX_MESA_swap_control(load);
|
||||
load_GLX_SGI_swap_control(load);
|
||||
load_GLX_SGI_video_sync(load);
|
||||
load_GLX_MESA_agp_offset(load);
|
||||
|
Loading…
x
Reference in New Issue
Block a user