diff --git a/CMakeLists.txt b/CMakeLists.txt index 594c908c6..008c492b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Demos/DX11ClothDemo/CMakeLists.txt b/Demos/DX11ClothDemo/CMakeLists.txt index eb110ff03..4feba9e7b 100644 --- a/Demos/DX11ClothDemo/CMakeLists.txt +++ b/Demos/DX11ClothDemo/CMakeLists.txt @@ -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) diff --git a/src/BulletMultiThreaded/PlatformDefinitions.h b/src/BulletMultiThreaded/PlatformDefinitions.h index 142103a09..9bf8c96f5 100644 --- a/src/BulletMultiThreaded/PlatformDefinitions.h +++ b/src/BulletMultiThreaded/PlatformDefinitions.h @@ -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; diff --git a/src/BulletMultiThreaded/btParallelConstraintSolver.cpp b/src/BulletMultiThreaded/btParallelConstraintSolver.cpp index 65c4fdfa8..a645218dd 100644 --- a/src/BulletMultiThreaded/btParallelConstraintSolver.cpp +++ b/src/BulletMultiThreaded/btParallelConstraintSolver.cpp @@ -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);