diff --git a/Engine/source/gfx/gl/gfxGLDevice.cpp b/Engine/source/gfx/gl/gfxGLDevice.cpp index ef581ef73..1e5fd94c4 100644 --- a/Engine/source/gfx/gl/gfxGLDevice.cpp +++ b/Engine/source/gfx/gl/gfxGLDevice.cpp @@ -179,7 +179,7 @@ void GFXGLDevice::initGLState() } #endif - PlatformGL::setVSync(0); + PlatformGL::setVSync(smDisableVSync ? 0 : 1); //OpenGL 3 need a binded VAO for render GLuint vao; diff --git a/Engine/source/gfx/gl/win32/gfxGLDevice.win.cpp b/Engine/source/gfx/gl/win32/gfxGLDevice.win.cpp index f2f81b8fa..6d4d09d0b 100644 --- a/Engine/source/gfx/gl/win32/gfxGLDevice.win.cpp +++ b/Engine/source/gfx/gl/win32/gfxGLDevice.win.cpp @@ -297,8 +297,6 @@ void GFXGLDevice::init( const GFXVideoMode &mode, PlatformWindow *window ) loadGLCore(); loadGLExtensions(hdcGL); - - wglSwapIntervalEXT(0); // It is very important that extensions be loaded // before we call initGLState() diff --git a/Engine/source/platformWin32/WinPlatformGL.cpp b/Engine/source/platformWin32/WinPlatformGL.cpp index 5413d37b7..a85245ef1 100644 --- a/Engine/source/platformWin32/WinPlatformGL.cpp +++ b/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 \ No newline at end of file +#endif