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;