From: John Tsiombikas Date: Sat, 12 Dec 2020 22:40:21 +0000 (+0200) Subject: fixed incorrect checking of the existence of GLX_EXT_swap_control and friends X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=demo_prior;a=commitdiff_plain;h=HEAD fixed incorrect checking of the existence of GLX_EXT_swap_control and friends --- 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