|
|
@@ -760,7 +760,8 @@ bool initializeGL(WindowCreationParams* params)
|
|
|
}
|
|
|
|
|
|
// Vertical sync.
|
|
|
- wglSwapIntervalEXT(__vsync ? 1 : 0);
|
|
|
+ if (wglSwapIntervalEXT) wglSwapIntervalEXT(__vsync ? 1 : 0);
|
|
|
+ else __vsync = false;
|
|
|
|
|
|
// Some old graphics cards support EXT_framebuffer_object instead of ARB_framebuffer_object.
|
|
|
// Patch ARB_framebuffer_object functions to EXT_framebuffer_object ones since semantic is same.
|
|
|
@@ -1073,8 +1074,9 @@ bool Platform::isVsync()
|
|
|
|
|
|
void Platform::setVsync(bool enable)
|
|
|
{
|
|
|
- wglSwapIntervalEXT(enable ? 1 : 0);
|
|
|
- __vsync = enable;
|
|
|
+ __vsync = enable;
|
|
|
+ if (wglSwapIntervalEXT) wglSwapIntervalEXT(enable ? 1 : 0);
|
|
|
+ else __vsync = false;
|
|
|
}
|
|
|
|
|
|
void Platform::swapBuffers()
|