From 011184885c5459053d5e3017d8d8a1cab85dc330 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Sun, 13 Dec 2020 00:40:21 +0200 Subject: [PATCH] fixed incorrect checking of the existence of GLX_EXT_swap_control and friends --- src/opengl.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/opengl.c b/src/opengl.c index 2d5e6a4..8b5af75 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -16,9 +16,14 @@ int init_opengl(void) glewInit(); #ifdef __unix__ + glxewInit(); dpy = glXGetCurrentDisplay(); win = glXGetCurrentDrawable(); #endif +#ifdef _WIN32 + wglewInit(); +} +#endif return 0; } @@ -26,14 +31,14 @@ int init_opengl(void) void gl_swap_interval(int val) { #ifdef __unix__ - if(GLX_EXT_swap_control) { + if(GLXEW_EXT_swap_control) { glXSwapIntervalEXT(dpy, win, val); - } else if(GLX_SGI_swap_control) { + } else if(GLXEW_SGI_swap_control) { glXSwapIntervalSGI(val); } #endif #ifdef _WIN32 - if(WGL_EXT_swap_control) { + if(WGLEW_EXT_swap_control) { wglSwapIntervalEXT(val); } #endif -- 1.7.10.4