diff --git a/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp b/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp index e967014cc..d0bc6a70a 100644 --- a/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp +++ b/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp @@ -200,8 +200,13 @@ public: btScalar m[16]; T.getOpenGLMatrix (&m[0]); glPushMatrix (); +#ifdef BT_USE_DOUBLE_PRECISION + glMultMatrixd (&m[0]); + glScaled (2.0 * boxShapeHalfExtents[0], 2.0 * boxShapeHalfExtents[1], 2.0 * boxShapeHalfExtents[2]); +#else glMultMatrixf (&m[0]); glScalef (2.0 * boxShapeHalfExtents[0], 2.0 * boxShapeHalfExtents[1], 2.0 * boxShapeHalfExtents[2]); +#endif //BT_USE_DOUBLE_PRECISION glutSolidCube (1.0); glPopMatrix (); } diff --git a/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.cpp b/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.cpp index 964348f59..8d324d1bc 100644 --- a/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.cpp +++ b/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.cpp @@ -99,7 +99,7 @@ void SpuRaycastTaskProcess::issueTask2() } } -void SpuRaycastTaskProcess::addWorkToTask(SpuRaycastTaskWorkUnit workunit) +void SpuRaycastTaskProcess::addWorkToTask(SpuRaycastTaskWorkUnit& workunit) { m_spuRaycastTaskDesc[m_currentTask].workUnits[m_currentWorkUnitInTask] = workunit; m_currentWorkUnitInTask++; diff --git a/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.h b/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.h index 42d7f1222..31b03515e 100644 --- a/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.h +++ b/Extras/BulletMultiThreaded/SpuRaycastTaskProcess.h @@ -61,7 +61,7 @@ public: void initialize2(void* spuCollisionObjectsWrappers, int numSpuCollisionObjectWrappers); /// batch up additional work to a current task for SPU processing. When batch is full, it issues the task. - void addWorkToTask(struct SpuRaycastTaskWorkUnit); + void addWorkToTask(struct SpuRaycastTaskWorkUnit&); /// call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished void flush2(); diff --git a/src/BulletCollision/CollisionShapes/btShapeHull.cpp b/src/BulletCollision/CollisionShapes/btShapeHull.cpp index a04baf0af..a2be1eb73 100644 --- a/src/BulletCollision/CollisionShapes/btShapeHull.cpp +++ b/src/BulletCollision/CollisionShapes/btShapeHull.cpp @@ -100,7 +100,8 @@ btShapeHull::buildHull (btScalar margin) } btVector3 supportPoints[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; - for (int i = 0; i < numSampleDirections; i++) + int i; + for (i = 0; i < numSampleDirections; i++) { supportPoints[i] = m_shape->localGetSupportingVertex(btUnitSpherePoints[i]); } @@ -108,9 +109,23 @@ btShapeHull::buildHull (btScalar margin) HullDesc hd; hd.mFlags = QF_TRIANGLES; hd.mVcount = numSampleDirections; - hd.mVertices = &supportPoints[0][0]; - hd.mVertexStride = sizeof (btVector3); +#ifdef BT_USE_DOUBLE_PRECISION + float* tmpVerts = new float[numSampleDirections*3]; + + for (i=0;i