From 665829bd81b3e8e6865b4b68134e361d59acfcca Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Mon, 12 Dec 2011 13:33:34 +0000 Subject: [PATCH] only use the getInterpolationWorldTransform for objects that are not isStaticOrKinematic This should solver the issue discussed here: http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=7681 remove some warning --- Demos/SharedOpenCL/btOpenCLUtils.cpp | 17 +++++++++++------ .../CollisionDispatch/btCollisionWorld.cpp | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Demos/SharedOpenCL/btOpenCLUtils.cpp b/Demos/SharedOpenCL/btOpenCLUtils.cpp index 4268cfd2e..b52544883 100644 --- a/Demos/SharedOpenCL/btOpenCLUtils.cpp +++ b/Demos/SharedOpenCL/btOpenCLUtils.cpp @@ -65,9 +65,10 @@ cl_platform_id btOpenCLUtils::getPlatform(int platformIndex, cl_int* pErrNum) { cl_platform_id platform = 0; - cl_uint numPlatforms; - cl_int ciErrNum = clGetPlatformIDs(0, NULL, &numPlatforms); - + cl_uint clNumPlatforms; + cl_int ciErrNum = clGetPlatformIDs(0, NULL, &clNumPlatforms); + int numPlatforms = (int)clNumPlatforms; + if (platformIndex>=0 && platformIndexgetInternalType()==btCollisionObject::CO_RIGID_BODY) + if(getDispatchInfo().m_useContinuous && !colObj->isStaticOrKinematicObject()) { btVector3 minAabb2,maxAabb2; colObj->getCollisionShape()->getAabb(colObj->getInterpolationWorldTransform(),minAabb2,maxAabb2); @@ -1457,7 +1457,7 @@ void btCollisionWorld::debugDrawWorld() btVector3 minAabb2,maxAabb2; - if(colObj->getInternalType()==btCollisionObject::CO_RIGID_BODY) + if(getDispatchInfo().m_useContinuous && !colObj->isStaticOrKinematicObject()) { colObj->getCollisionShape()->getAabb(colObj->getInterpolationWorldTransform(),minAabb2,maxAabb2); minAabb2 -= contactThreshold;