diff options
author | Jamil Halabi <jay3dlinux@gmail.com> | 2016-06-29 15:04:24 -0400 |
---|---|---|
committer | Jamil Halabi <jay3dlinux@gmail.com> | 2016-06-29 15:40:25 -0400 |
commit | fbdb717cae6f7598fb9459d2f05afb2745bfede2 (patch) | |
tree | ea14d50604f8abc767488bd625da62e952976a8d /platform/haiku/context_gl_haiku.cpp | |
parent | 72c2cccbe28d37890e3367c1488830693a225e69 (diff) | |
download | redot-engine-fbdb717cae6f7598fb9459d2f05afb2745bfede2.tar.gz |
Fixed building for latest Haiku nightlies.
Diffstat (limited to 'platform/haiku/context_gl_haiku.cpp')
-rw-r--r-- | platform/haiku/context_gl_haiku.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/platform/haiku/context_gl_haiku.cpp b/platform/haiku/context_gl_haiku.cpp index 2fedd1532a..bf890d14bf 100644 --- a/platform/haiku/context_gl_haiku.cpp +++ b/platform/haiku/context_gl_haiku.cpp @@ -35,6 +35,8 @@ ContextGL_Haiku::ContextGL_Haiku(HaikuDirectWindow* p_window) { uint32 type = BGL_RGB | BGL_DOUBLE | BGL_DEPTH; view = new HaikuGLView(window->Bounds(), type); + + use_vsync = false; } ContextGL_Haiku::~ContextGL_Haiku() { @@ -57,7 +59,7 @@ void ContextGL_Haiku::make_current() { } void ContextGL_Haiku::swap_buffers() { - view->SwapBuffers(); + view->SwapBuffers(use_vsync); } int ContextGL_Haiku::get_window_width() { @@ -68,4 +70,12 @@ int ContextGL_Haiku::get_window_height() { return window->Bounds().IntegerHeight(); } +void ContextGL_Haiku::set_use_vsync(bool p_use) { + use_vsync = p_use; +} + +bool ContextGL_Haiku::is_using_vsync() const { + return use_vsync; +} + #endif |