summaryrefslogtreecommitdiff
path: root/platform/windows/gl_manager_windows.h
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/windows/gl_manager_windows.h
parent29e2aa416240f6ff782852b10a794471c0b92c2d (diff)
parent58a9cfee80a6889dd72d0c937eab895df50dba61 (diff)
Merge pull request #68700 from clayjohn/GLES3-vsync
Set vsync on window creation when using GLES3
Diffstat (limited to 'platform/windows/gl_manager_windows.h')
-rw-r--r--platform/windows/gl_manager_windows.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/windows/gl_manager_windows.h b/platform/windows/gl_manager_windows.h
index c6d5f9f855..94f3ce9860 100644
--- a/platform/windows/gl_manager_windows.h
+++ b/platform/windows/gl_manager_windows.h
@@ -54,6 +54,7 @@ private:
struct GLWindow {
int width = 0;
int height = 0;
+ bool use_vsync = false;
// windows specific
HDC hDC;
@@ -72,8 +73,8 @@ private:
GLWindow *_current_window = nullptr;
- PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
- PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT;
+ PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = nullptr;
+ PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = nullptr;
// funcs
void _internal_set_current_window(GLWindow *p_win);
@@ -86,7 +87,6 @@ private:
bool direct_render;
int glx_minor, glx_major;
- bool use_vsync;
ContextType context_type;
private:
@@ -110,8 +110,8 @@ public:
Error initialize();
- void set_use_vsync(bool p_use);
- bool is_using_vsync() const;
+ void set_use_vsync(DisplayServer::WindowID p_window_id, bool p_use);
+ bool is_using_vsync(DisplayServer::WindowID p_window_id) const;
HDC get_hdc(DisplayServer::WindowID p_window_id);
HGLRC get_hglrc(DisplayServer::WindowID p_window_id);