Jelajahi Sumber

check extension before use it

Anis 11 tahun lalu
induk
melakukan
7455f12343
1 mengubah file dengan 5 tambahan dan 2 penghapusan
  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