浏览代码

check extension before use it

Anis 11 年之前
父节点
当前提交
7455f12343
共有 1 个文件被更改,包括 5 次插入2 次删除
  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