diff --git a/Demos3/CpuDemos/main_opengl3core.cpp b/Demos3/CpuDemos/main_opengl3core.cpp index cbbd26cd8..8d6af50e0 100644 --- a/Demos3/CpuDemos/main_opengl3core.cpp +++ b/Demos3/CpuDemos/main_opengl3core.cpp @@ -100,12 +100,14 @@ struct EmptyDemo : public CpuDemo }; #include "rendering/RenderDemo.h" #include "rigidbody/RigidBodyDemo.h" +#include "deformable/CpuSoftBodyDemo.h" b3AlignedObjectArray demoNames; int selectedDemo = 0; CpuDemo::CreateFunc* allDemos[]= { + //CpuSoftClothDemo::MyCreateFunc, RigidBodyDemo::MyCreateFunc, RenderDemo::MyCreateFunc, EmptyDemo::MyCreateFunc, @@ -627,7 +629,7 @@ int main(int argc, char* argv[]) int maxObjectCapacity=1024*1024;//128*1024; - int maxShapeCapacityInBytes=128*1024; + int maxShapeCapacityInBytes=10*1024*1024; //maxObjectCapacity = b3Max(maxObjectCapacity,ci.arraySizeX*ci.arraySizeX*ci.arraySizeX+10); diff --git a/Demos3/CpuDemos/rigidbody/RigidBodyDemo.h b/Demos3/CpuDemos/rigidbody/RigidBodyDemo.h index 3bf33ee44..7b138c08d 100644 --- a/Demos3/CpuDemos/rigidbody/RigidBodyDemo.h +++ b/Demos3/CpuDemos/rigidbody/RigidBodyDemo.h @@ -7,7 +7,7 @@ struct RigidBodyDemo : public CpuDemo { struct b3DynamicBvhBroadphase* m_bp; - struct b3CpuNarrowPhase* m_np; + class b3CpuNarrowPhase* m_np; struct b3CpuRigidBodyPipeline* m_rb; diff --git a/Demos3/GpuDemos/rigidbody/GpuConvexScene.h b/Demos3/GpuDemos/rigidbody/GpuConvexScene.h index 7a79e5760..be5b187df 100644 --- a/Demos3/GpuDemos/rigidbody/GpuConvexScene.h +++ b/Demos3/GpuDemos/rigidbody/GpuConvexScene.h @@ -3,7 +3,7 @@ #include "GpuRigidBodyDemo.h" #include "Bullet3Common/b3AlignedObjectArray.h" -#include "Bullet3OpenCL/Raycast/b3RaycastInfo.h" +#include "Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h" class GpuConvexScene : public GpuRigidBodyDemo { diff --git a/btgui/OpenGLWindow/GLInstancingRenderer.cpp b/btgui/OpenGLWindow/GLInstancingRenderer.cpp index 168aeb1d5..e09a6b9fc 100644 --- a/btgui/OpenGLWindow/GLInstancingRenderer.cpp +++ b/btgui/OpenGLWindow/GLInstancingRenderer.cpp @@ -665,6 +665,9 @@ int GLInstancingRenderer::registerShape(const float* vertices, int numvertices, char* dest= (char*)glMapBuffer( GL_ARRAY_BUFFER,GL_WRITE_ONLY);//GL_WRITE_ONLY int vertexStrideInBytes = 9*sizeof(float); int sz = numvertices*vertexStrideInBytes; + int totalUsed = vertexStrideInBytes*gfxObj->m_vertexArrayOffset+sz; + b3Assert(totalUsedm_maxShapeCapacityInBytes); + memcpy(dest+vertexStrideInBytes*gfxObj->m_vertexArrayOffset,vertices,sz); glUnmapBuffer( GL_ARRAY_BUFFER); diff --git a/src/Bullet3OpenCL/Raycast/b3RaycastInfo.h b/src/Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h similarity index 100% rename from src/Bullet3OpenCL/Raycast/b3RaycastInfo.h rename to src/Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h diff --git a/src/Bullet3Dynamics/b3CpuRigidBodyPipeline.h b/src/Bullet3Dynamics/b3CpuRigidBodyPipeline.h index 26a86ba00..2f3c2ae77 100644 --- a/src/Bullet3Dynamics/b3CpuRigidBodyPipeline.h +++ b/src/Bullet3Dynamics/b3CpuRigidBodyPipeline.h @@ -19,7 +19,7 @@ subject to the following restrictions: #include "Bullet3Common/b3AlignedObjectArray.h" -#include "Bullet3OpenCL/Raycast/b3RaycastInfo.h" +#include "Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h" class b3CpuRigidBodyPipeline { diff --git a/src/Bullet3OpenCL/Raycast/b3GpuRaycast.h b/src/Bullet3OpenCL/Raycast/b3GpuRaycast.h index 66f2ce639..781a6414a 100644 --- a/src/Bullet3OpenCL/Raycast/b3GpuRaycast.h +++ b/src/Bullet3OpenCL/Raycast/b3GpuRaycast.h @@ -5,7 +5,7 @@ #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h" #include "Bullet3Common/b3AlignedObjectArray.h" -#include "b3RaycastInfo.h" +#include "Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h" diff --git a/src/Bullet3OpenCL/RigidBody/b3GpuRigidBodyPipeline.h b/src/Bullet3OpenCL/RigidBody/b3GpuRigidBodyPipeline.h index 2cc92294a..ffbd8b3f9 100644 --- a/src/Bullet3OpenCL/RigidBody/b3GpuRigidBodyPipeline.h +++ b/src/Bullet3OpenCL/RigidBody/b3GpuRigidBodyPipeline.h @@ -20,7 +20,7 @@ subject to the following restrictions: #include "Bullet3Collision/NarrowPhaseCollision/b3Config.h" #include "Bullet3Common/b3AlignedObjectArray.h" -#include "Bullet3OpenCL/Raycast/b3RaycastInfo.h" +#include "Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h" class b3GpuRigidBodyPipeline {