summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/x11/display_server_x11.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-16 00:29:19 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-16 00:29:19 +0100
commit5993209b2649c93b56789bfc243c5a6046ee77ce (patch)
tree585d9485d1cebd635bf2485a6fdda50eb92a9a7a /platform/linuxbsd/x11/display_server_x11.cpp
parent29e2aa416240f6ff782852b10a794471c0b92c2d (diff)
parent58a9cfee80a6889dd72d0c937eab895df50dba61 (diff)
Merge pull request #68700 from clayjohn/GLES3-vsync
Set vsync on window creation when using GLES3
Diffstat (limited to 'platform/linuxbsd/x11/display_server_x11.cpp')
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index b86bc10643..cf50748ac8 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -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