Compare commits

3 Commits

Author SHA1 Message Date
Rémi Verschelde
753debf9e1 GLEW: Define static + enabled and includes via SCons
This allows us not to have to hack our definitions in the upstream files,
making it easier to upgrade to newer versions in the future.

For the include paths to work, the headers are moved to a GL subfolder to
match their upstream location.

(cherry picked from commit 768e9252714b57421b5c893a8258469a14630a30)
2016-06-25 00:24:09 +02:00
Rémi Verschelde
b035447dd1 Haiku: Do not define GLEW_ENABLED to undefine it later
Partial revert of f61eb5fd8e13642c82364f8ee66a0f6c791a4511.

(cherry picked from commit 4c658dc52303ece088a245ede2835a68b78530b2)
2016-06-25 00:24:02 +02:00
Hubert Jarosz
d79bfba7ec remove trailing whitespace
(cherry picked from commit 4a4f2479146aa33e235ed57cde311efda68d3c8f)
2016-04-02 22:03:48 +02:00
6 changed files with 13 additions and 12 deletions

View File

@@ -38,6 +38,6 @@ int ContextGL_Haiku::get_window_width() {
int ContextGL_Haiku::get_window_height() {
return window->Bounds().IntegerHeight();
}
}
#endif

View File

@@ -18,8 +18,8 @@ public:
~ContextGL_Haiku();
virtual Error initialize();
virtual void release_current();
virtual void make_current();
virtual void release_current();
virtual void make_current();
virtual void swap_buffers();
virtual int get_window_width();
virtual int get_window_height();

View File

@@ -23,7 +23,8 @@ def get_opts():
def get_flags():
return [
('builtin_zlib', 'no')
('builtin_zlib', 'no'),
#('glew', 'yes'), # TODO: investigate the GLEW situation on Haiku
]
def configure(env):
@@ -52,9 +53,9 @@ def configure(env):
#env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
env.Append(CPPFLAGS = ['-DPTHREAD_NO_RENAME']) # TODO: enable when we have pthread_setname_np
env.Append(CPPFLAGS = ['-DGLEW_ENABLED', '-DOPENGL_ENABLED', '-DMEDIA_KIT_ENABLED'])
env.Append(CPPFLAGS = ['-DOPENGL_ENABLED', '-DMEDIA_KIT_ENABLED'])
env.Append(CPPFLAGS = ['-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL'])
env.Append(LIBS = ['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL', 'GLEW'])
env.Append(LIBS = ['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL'])
import methods
env.Append(BUILDERS = {'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl')})

View File

@@ -3,17 +3,17 @@
int main(int argc, char* argv[]) {
OS_Haiku os;
Error error = Main::setup(argv[0], argc-1, &argv[1]);
if (error != OK) {
return 255;
}
if (Main::start()) {
os.run();
}
Main::cleanup();
return os.get_exit_code();
}

View File

@@ -70,7 +70,7 @@ static _HaikuTranslatePair _hb_to_keycode[] = {
{ KEY_INSERT, B_INSERT },
{ KEY_DELETE, B_DELETE },
// { KEY_HELP, ??? },
{ KEY_0, (0x30) },
{ KEY_1, (0x31) },
{ KEY_2, (0x32) },

View File

@@ -138,7 +138,7 @@ void OS_Haiku::finalize() {
memdelete(spatial_sound_2d_server);
memdelete(sample_manager);
audio_server->finish();
memdelete(audio_server);