From 8bb40b632b12a74be09c73c198f00554ed91570e Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Tue, 20 Feb 2018 16:21:22 -0800 Subject: [PATCH] allow to build GLFW version of Bullet examples on Linux (use premake4_linux --enable_glfw gmake) --- build3/premake4.lua | 4 ++++ data/multibody.bullet | Bin 16836 -> 16836 bytes examples/OpenGLWindow/SimpleOpenGL2App.cpp | 2 ++ examples/OpenGLWindow/SimpleOpenGL3App.cpp | 2 ++ examples/OpenGLWindow/X11OpenGLWindow.cpp | 4 ++++ 5 files changed, 12 insertions(+) diff --git a/build3/premake4.lua b/build3/premake4.lua index 6109f6729..e0aa42acd 100644 --- a/build3/premake4.lua +++ b/build3/premake4.lua @@ -339,6 +339,10 @@ end end function initGlew() end + function initX11() + links {"X11", "dl","pthread"} + + end else dofile ("findOpenGLGlewGlut.lua") diff --git a/data/multibody.bullet b/data/multibody.bullet index d621a77ca9620a49ce57bb971d25f9081f75dc1a..17947eed1d6e972af950d26e5a20834b943b22c3 100644 GIT binary patch delta 622 zcmX@o%y^`kaRUz{s}KVN1Mg%(#+ds3;Y~m`gNx5JRuKKq{Lf?%9S!C0X#bZ9;uk>q z$0LiILHsr-f9pvN8xVgsln-Kqz>{C=0QroQ4VkogK*~Y*d8E|G$q8%{lO>pC>aRkTb5Hg%WngHq ze*xuhp3D*nRBImqr?CkabsRV$Ag29r4z5756B8}A~Qr-XmlVzAv zJaMVUWg{+e#>s|E+5*f#X%L2)I@y3#Y_b%yR6R^!fM{Qe?adczwt?ZvA341y+p)4u l4q##Nq1a?31At+uGx-b)2M0`S^BoooHpVxbMY-3T0RW2c4l@7% diff --git a/examples/OpenGLWindow/SimpleOpenGL2App.cpp b/examples/OpenGLWindow/SimpleOpenGL2App.cpp index cdaa960d0..b8eadfb43 100644 --- a/examples/OpenGLWindow/SimpleOpenGL2App.cpp +++ b/examples/OpenGLWindow/SimpleOpenGL2App.cpp @@ -139,8 +139,10 @@ SimpleOpenGL2App::SimpleOpenGL2App(const char* title, int width, int height) #ifndef NO_GLEW #ifndef __APPLE__ #ifndef _WIN32 +#ifndef B3_USE_GLFW //some Linux implementations need the 'glewExperimental' to be true glewExperimental = GL_TRUE; +#endif//B3_USE_GLFW #endif //_WIN32 #ifndef B3_USE_GLFW diff --git a/examples/OpenGLWindow/SimpleOpenGL3App.cpp b/examples/OpenGLWindow/SimpleOpenGL3App.cpp index d5814b92b..bda47d46e 100644 --- a/examples/OpenGLWindow/SimpleOpenGL3App.cpp +++ b/examples/OpenGLWindow/SimpleOpenGL3App.cpp @@ -324,8 +324,10 @@ SimpleOpenGL3App::SimpleOpenGL3App( const char* title, int width,int height, boo #ifndef NO_GLEW #ifndef __APPLE__ #ifndef _WIN32 +#ifndef B3_USE_GLFW //some Linux implementations need the 'glewExperimental' to be true glewExperimental = GL_TRUE; +#endif //B3_USE_GLFW #endif //_WIN32 #ifndef B3_USE_GLFW diff --git a/examples/OpenGLWindow/X11OpenGLWindow.cpp b/examples/OpenGLWindow/X11OpenGLWindow.cpp index e85d50d65..51480094f 100644 --- a/examples/OpenGLWindow/X11OpenGLWindow.cpp +++ b/examples/OpenGLWindow/X11OpenGLWindow.cpp @@ -1,3 +1,6 @@ + +#ifndef B3_USE_GLFW + #include "X11OpenGLWindow.h" #include "OpenGLInclude.h" @@ -1121,3 +1124,4 @@ int X11OpenGLWindow::fileOpenDialog(char* filename, int maxNameLength) return len; } +#endif