diff --git a/Demos/Box2dDemo/Box2dDemo.cpp b/Demos/Box2dDemo/Box2dDemo.cpp index 59b64e762..9e3ee53b3 100644 --- a/Demos/Box2dDemo/Box2dDemo.cpp +++ b/Demos/Box2dDemo/Box2dDemo.cpp @@ -26,8 +26,8 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" ///create 125 (5x5x5) dynamic object -#define ARRAY_SIZE_X 15 -#define ARRAY_SIZE_Y 15 +#define ARRAY_SIZE_X 5 +#define ARRAY_SIZE_Y 5 #define ARRAY_SIZE_Z 1 //maximum number of objects (and allow user to shoot additional boxes) diff --git a/Demos/OpenGL/CMakeLists.txt b/Demos/OpenGL/CMakeLists.txt index 21f0316f9..89ac619e2 100644 --- a/Demos/OpenGL/CMakeLists.txt +++ b/Demos/OpenGL/CMakeLists.txt @@ -19,6 +19,8 @@ ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Extras/ConvexHull ADD_LIBRARY(OpenGLSupport GLDebugFont.cpp + GL_DialogDynamicsWorld.cpp + GL_DialogWindow.cpp GL_ShapeDrawer.cpp GL_Simplex1to4.cpp GLDebugDrawer.cpp diff --git a/Demos/OpenGL/GL_DialogDynamicsWorld.cpp b/Demos/OpenGL/GL_DialogDynamicsWorld.cpp index 486e799b0..a0a5ae529 100644 --- a/Demos/OpenGL/GL_DialogDynamicsWorld.cpp +++ b/Demos/OpenGL/GL_DialogDynamicsWorld.cpp @@ -13,6 +13,7 @@ subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ + #include "GL_DialogDynamicsWorld.h" #include "GL_DialogWindow.h" #include "btBulletDynamicsCommon.h" diff --git a/Demos/OpenGL/GL_DialogWindow.cpp b/Demos/OpenGL/GL_DialogWindow.cpp index 194163715..b268bb7b7 100644 --- a/Demos/OpenGL/GL_DialogWindow.cpp +++ b/Demos/OpenGL/GL_DialogWindow.cpp @@ -20,6 +20,7 @@ subject to the following restrictions: // --------------------------------------------------------------------------- // Extensions +#ifndef __APPLE__ typedef void (APIENTRY * PFNGLBindBufferARB)(GLenum target, GLuint buffer); typedef void (APIENTRY * PFNGLBindProgramARB)(GLenum target, GLuint program); typedef GLuint (APIENTRY * PFNGLGetHandleARB)(GLenum pname); @@ -100,7 +101,7 @@ PFNGLBlendFuncSeparate glBlendFuncSeparate = NULL; #ifndef GL_BLEND_DST_ALPHA # define GL_BLEND_DST_ALPHA 0x80CA #endif - +#endif GL_DialogWindow::GL_DialogWindow(int horPos,int vertPos,int dialogWidth,int dialogHeight, btCollisionObject* collisionObject,const char* dialogTitle) :m_dialogHorPos(horPos), @@ -221,6 +222,7 @@ void GL_DialogWindow::draw(btScalar deltaTime) int curVertPos = m_dialogVertPos; curVertPos += yInc; + glColor4f(1,1,1,1); GLDebugDrawString(m_dialogHorPos+m_dialogWidth/2-((strlen(m_dialogTitle)/2)*charWidth),m_dialogVertPos+yInc ,m_dialogTitle); curVertPos += 20; @@ -245,7 +247,7 @@ void GL_DialogWindow::saveOpenGLState() glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &m_PrevActiveTextureARB); int maxTexUnits = 1; glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &maxTexUnits); - maxTexUnits = max(1, min(32, maxTexUnits)); + maxTexUnits = btMax(1, btMin(32, maxTexUnits)); for( int i=0; i