vsync support

-works on windows
-may not work on X11, if so please fix
-OSX does not seem to support disabling vsync
This commit is contained in:
Juan Linietsky
2016-06-05 19:14:33 -03:00
parent 684a1207c0
commit 2420e46b44
14 changed files with 107 additions and 2 deletions

View File

@ -1952,6 +1952,20 @@ String OS_X11::get_joy_guid(int p_device) const {
return input->get_joy_guid_remapped(p_device);
}
void OS_X11::set_use_vsync(bool p_enable) {
if (context_gl)
return context_gl->set_use_vsync(p_enable);
}
bool OS_X11::is_vsnc_enabled() const {
if (context_gl)
return context_gl->is_using_vsync();
return true;
}
void OS_X11::set_context(int p_context) {
XClassHint* classHint = NULL;