diff --git a/Demos3/GpuDemos/softbody/GpuSoftBodyDemo.cpp b/Demos3/GpuDemos/softbody/GpuSoftBodyDemo.cpp index cd15924fc..3eb54ceaf 100644 --- a/Demos3/GpuDemos/softbody/GpuSoftBodyDemo.cpp +++ b/Demos3/GpuDemos/softbody/GpuSoftBodyDemo.cpp @@ -1,4 +1,6 @@ + #include "GpuSoftBodyDemo.h" +#define USE_BARREL_VERTICES #include "OpenGLWindow/ShapeData.h" #include "OpenGLWindow/GLInstancingRenderer.h" #include "Bullet3Common/b3Quaternion.h" @@ -414,4 +416,4 @@ void GpuSoftClothDemo::setupScene(const ConstructionInfo& ci) err = glGetError(); assert(err==GL_NO_ERROR); -} \ No newline at end of file +} diff --git a/btgui/OpenGLWindow/GLInstancingRenderer.cpp b/btgui/OpenGLWindow/GLInstancingRenderer.cpp index 8d2e05a4f..270747198 100644 --- a/btgui/OpenGLWindow/GLInstancingRenderer.cpp +++ b/btgui/OpenGLWindow/GLInstancingRenderer.cpp @@ -29,10 +29,17 @@ float MOUSE_MOVE_MULTIPLIER = 0.4f; #include "b3gWindowInterface.h" #include "Bullet3Common/b3MinMax.h" +#ifndef __APPLE__ +#ifndef glVertexAttribDivisor +#define glVertexAttribDivisor glVertexAttribDivisorARB +#endif //glVertexAttribDivisor +#ifndef GL_COMPARE_REF_TO_TEXTURE +#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE +#endif //GL_COMPARE_REF_TO_TEXTURE #ifndef glDrawElementsInstanced #define glDrawElementsInstanced glDrawElementsInstancedARB #endif - +#endif //__APPLE__ #include "GLInstancingRenderer.h" #include @@ -1563,7 +1570,7 @@ void GLInstancingRenderer::renderSceneInternal(int renderMode) // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE); m_data->m_shadowMap=new GLRenderToTexture(); m_data->m_shadowMap->init(shadowMapWidth, shadowMapHeight,m_data->m_shadowTexture,RENDERTEXTURE_DEPTH); @@ -1709,13 +1716,13 @@ b3Assert(glGetError() ==GL_NO_ERROR); glEnableVertexAttribArray(4); glEnableVertexAttribArray(5); glEnableVertexAttribArray(6); - glVertexAttribDivisorARB(0, 0); - glVertexAttribDivisorARB(1, 1); - glVertexAttribDivisorARB(2, 1); - glVertexAttribDivisorARB(3, 0); - glVertexAttribDivisorARB(4, 0); - glVertexAttribDivisorARB(5, 1); - glVertexAttribDivisorARB(6, 1); + glVertexAttribDivisor(0, 0); + glVertexAttribDivisor(1, 1); + glVertexAttribDivisor(2, 1); + glVertexAttribDivisor(3, 0); + glVertexAttribDivisor(4, 0); + glVertexAttribDivisor(5, 1); + glVertexAttribDivisor(6, 1); diff --git a/btgui/OpenGLWindow/OpenGLInclude.h b/btgui/OpenGLWindow/OpenGLInclude.h index e01f20b05..19d4f3725 100644 --- a/btgui/OpenGLWindow/OpenGLInclude.h +++ b/btgui/OpenGLWindow/OpenGLInclude.h @@ -22,7 +22,7 @@ subject to the following restrictions: #if defined(__APPLE__) && !defined (VMDMESA) #include //#include -#include +//#include //#import #include #else diff --git a/btgui/OpenGLWindow/ShapeData.h b/btgui/OpenGLWindow/ShapeData.h index 337345e6b..f538f1e5f 100644 --- a/btgui/OpenGLWindow/ShapeData.h +++ b/btgui/OpenGLWindow/ShapeData.h @@ -1,7 +1,7 @@ #ifndef SHAPE_DATA_H #define SHAPE_DATA_H -#if USE_BARREL_VERTICES +#ifdef USE_BARREL_VERTICES static float barrel_vertices[] = { 0.0f,-0.5f,0.0f, 1.0f, 0.0f,-1.0f,0.0f, 0.5f, 0.5f, 0.282362f,-0.5f,-0.205148f, 1.0f, 0.0f,-1.0f,0.0f, 0.5f, 0.5f, diff --git a/btgui/OpenGLWindow/SimpleOpenGL3App.cpp b/btgui/OpenGLWindow/SimpleOpenGL3App.cpp index ace8275fb..d6a414430 100644 --- a/btgui/OpenGLWindow/SimpleOpenGL3App.cpp +++ b/btgui/OpenGLWindow/SimpleOpenGL3App.cpp @@ -20,8 +20,8 @@ #include "Bullet3Common/b3Vector3.h" #include "Bullet3Common/b3Logging.h" -#include "OpenGLTrueTypeFont/fontstash.h" -#include "OpenGLWindow/TwFonts.h" +#include "../btgui/OpenGLTrueTypeFont/fontstash.h" +#include "../btgui/OpenGLWindow/TwFonts.h" #include "OpenGLTrueTypeFont/opengl_fontstashcallbacks.h" #include diff --git a/src/Bullet3Common/premake4.lua b/src/Bullet3Common/premake4.lua index e5fbb5280..0430cdc2a 100644 --- a/src/Bullet3Common/premake4.lua +++ b/src/Bullet3Common/premake4.lua @@ -4,11 +4,9 @@ kind "StaticLib" - targetdir "../../bin" - includedirs {".."} files { "**.cpp", "**.h" - } \ No newline at end of file + }