Browse Source

check extension before use it

Anis 10 years ago
parent
commit
7455f12343
1 changed files with 5 additions and 2 deletions
  1. 5 2
      Engine/source/platformWin32/WinPlatformGL.cpp

+ 5 - 2
Engine/source/platformWin32/WinPlatformGL.cpp

@@ -5,7 +5,10 @@
 
 void PlatformGL::setVSync(const int i)
 {
-   wglSwapIntervalEXT( i );
+    if (WGLEW_EXT_swap_control)
+    {
+        wglSwapIntervalEXT(i);
+    }
 }
 
-#endif
+#endif