1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Set vsync on window creation when using GLES3.

Add vsync to Windows platform
This commit is contained in:
clayjohn
2022-11-15 14:14:21 -08:00
parent 4935493f72
commit 58a9cfee80
5 changed files with 43 additions and 44 deletions

View File

@@ -4414,7 +4414,7 @@ void DisplayServerX11::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mo
#if defined(GLES3_ENABLED)
if (gl_manager) {
gl_manager->set_use_vsync(p_vsync_mode == DisplayServer::VSYNC_ENABLED);
gl_manager->set_use_vsync(p_vsync_mode != DisplayServer::VSYNC_DISABLED);
}
#endif
}
@@ -4675,6 +4675,7 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V
if (gl_manager) {
Error err = gl_manager->window_create(id, wd.x11_window, x11_display, p_rect.size.width, p_rect.size.height);
ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Can't create an OpenGL window");
window_set_vsync_mode(p_vsync_mode, id);
}
#endif