diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-06-30 08:07:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-30 08:07:24 +0200 |
commit | 91655b9a18fdccaff9137af458add3778bf666e9 (patch) | |
tree | 85b1fcab4658ccf1c0483f617e8189cff3f80d5b /platform/haiku/context_gl_haiku.cpp | |
parent | 0233c69bdcc951926421f1d9ac4160e0f3758f8d (diff) | |
parent | fbdb717cae6f7598fb9459d2f05afb2745bfede2 (diff) |
Merge pull request #5494 from jay3d/master
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 |