1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Fixed building for latest Haiku nightlies.

This commit is contained in:
Jamil Halabi
2016-06-29 15:04:24 -04:00
parent 72c2cccbe2
commit fbdb717cae
3 changed files with 19 additions and 4 deletions

View File

@@ -35,6 +35,8 @@ ContextGL_Haiku::ContextGL_Haiku(HaikuDirectWindow* p_window) {
uint32 type = BGL_RGB | BGL_DOUBLE | BGL_DEPTH; uint32 type = BGL_RGB | BGL_DOUBLE | BGL_DEPTH;
view = new HaikuGLView(window->Bounds(), type); view = new HaikuGLView(window->Bounds(), type);
use_vsync = false;
} }
ContextGL_Haiku::~ContextGL_Haiku() { ContextGL_Haiku::~ContextGL_Haiku() {
@@ -57,7 +59,7 @@ void ContextGL_Haiku::make_current() {
} }
void ContextGL_Haiku::swap_buffers() { void ContextGL_Haiku::swap_buffers() {
view->SwapBuffers(); view->SwapBuffers(use_vsync);
} }
int ContextGL_Haiku::get_window_width() { int ContextGL_Haiku::get_window_width() {
@@ -68,4 +70,12 @@ int ContextGL_Haiku::get_window_height() {
return window->Bounds().IntegerHeight(); 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 #endif

View File

@@ -40,6 +40,8 @@ class ContextGL_Haiku : public ContextGL {
private: private:
HaikuGLView* view; HaikuGLView* view;
HaikuDirectWindow* window; HaikuDirectWindow* window;
bool use_vsync;
public: public:
ContextGL_Haiku(HaikuDirectWindow* p_window); ContextGL_Haiku(HaikuDirectWindow* p_window);
@@ -51,6 +53,9 @@ public:
virtual void swap_buffers(); virtual void swap_buffers();
virtual int get_window_width(); virtual int get_window_width();
virtual int get_window_height(); virtual int get_window_height();
virtual void set_use_vsync(bool p_use);
virtual bool is_using_vsync() const;
}; };
#endif #endif

View File

@@ -24,7 +24,7 @@ def get_opts():
def get_flags(): def get_flags():
return [ return [
('builtin_zlib', 'no'), ('builtin_zlib', 'no'),
#('glew', 'yes'), # TODO: investigate the GLEW situation on Haiku ('glew', 'yes'),
] ]
def configure(env): def configure(env):
@@ -38,8 +38,8 @@ def configure(env):
env.Append(CPPPATH = ['#platform/haiku']) env.Append(CPPPATH = ['#platform/haiku'])
env["CC"] = "gcc" env["CC"] = "gcc-x86"
env["CXX"] = "g++" env["CXX"] = "g++-x86"
if (env["target"]=="release"): if (env["target"]=="release"):
if (env["debug_release"]=="yes"): if (env["debug_release"]=="yes"):