summaryrefslogtreecommitdiff
path: root/platform/windows/gl_manager_windows.h
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2022-11-15 14:14:21 -0800
committerclayjohn <claynjohn@gmail.com>2022-11-15 14:14:21 -0800
commit58a9cfee80a6889dd72d0c937eab895df50dba61 (patch)
treecb5223598a1f12fa2ca13ae456345d7fcdb7adbb /platform/windows/gl_manager_windows.h
parent4935493f720b0c4e925b0643960b5949bedae0c7 (diff)
Set vsync on window creation when using GLES3.
Add vsync to Windows platform
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);