use __int64 for 64bit uint64_t for 64bit Visual Studio

See https://code.google.com/p/bullet/issues/detail?id=717
allow parallel constraint solver in double precision
See https://code.google.com/p/bullet/issues/detail?id=728
This commit is contained in:
erwin.coumans
2013-09-10 21:26:19 +00:00
parent c160bfe74c
commit 7633dc8b13
4 changed files with 18 additions and 6 deletions

View File

@@ -214,9 +214,13 @@ IF(MSVC)
ENDFOREACH(flag_var)
ENDIF (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
IF (USE_MSVC_SSE)
IF (CMAKE_CL_64)
ADD_DEFINITIONS(-D_WIN64)
ELSE()
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
IF (USE_MSVC_SSE)
ADD_DEFINITIONS(/arch:SSE)
ENDIF()
ENDIF()
OPTION(USE_MSVC_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
IF (USE_MSVC_FAST_FLOATINGPOINT)

View File

@@ -44,9 +44,13 @@ IF(MSVC)
ENDFOREACH(flag_var)
ENDIF (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
IF (USE_MSVC_SSE)
IF (CMAKE_CL_64)
ADD_DEFINITIONS(-D_WIN64)
ELSE()
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
IF (USE_MSVC_SSE)
ADD_DEFINITIONS(/arch:SSE)
ENDIF()
ENDIF()
OPTION(USE_MSVC_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
IF (USE_MSVC_FAST_FLOATINGPOINT)

View File

@@ -38,7 +38,11 @@ typedef union
#ifndef __PHYSICS_COMMON_H__
#ifndef PFX_USE_FREE_VECTORMATH
#ifndef __BT_SKIP_UINT64_H
#if defined(_WIN64) && defined(_MSC_VER)
typedef unsigned __int64 uint64_t;
#else
typedef unsigned long int uint64_t;
#endif
#endif //__BT_SKIP_UINT64_H
#endif //PFX_USE_FREE_VECTORMATH
typedef unsigned int uint32_t;

View File

@@ -1217,8 +1217,8 @@ btScalar btParallelConstraintSolver::solveGroup(btCollisionObject** bodies1,int
btVector3 angVelPlusForces = rb->getAngularVelocity()+rb->getTotalTorque()*rb->getInvInertiaTensorWorld()*infoGlobal.m_timeStep;
btVector3 linVelPlusForces = rb->getLinearVelocity()+rb->getTotalForce()*rb->getInvMass()*infoGlobal.m_timeStep;
state.setAngularVelocity((const vmVector3&)angVelPlusForces);
state.setLinearVelocity((const vmVector3&) linVelPlusForces);
state.setAngularVelocity(btReadVector3(angVelPlusForces));
state.setLinearVelocity(btReadVector3(linVelPlusForces));
state.setMotionType(PfxMotionTypeActive);
vmMatrix3 ori(solverBody.mOrientation);