fixed incorrect checking of the existence of GLX_EXT_swap_control and friends master
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 12 Dec 2020 22:40:21 +0000 (00:40 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 12 Dec 2020 22:40:21 +0000 (00:40 +0200)
src/opengl.c

index 2d5e6a4..8b5af75 100644 (file)
@@ -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