From 098e0158ea55fe4b0290e66ce9d5a334f1df92ad Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 26 May 2016 18:21:57 -0700 Subject: [PATCH] fix compile issue(s) in BT_USE_DOUBLE_PRECISION mode --- examples/StandaloneMain/main_tinyrenderer_single_example.cpp | 4 ++-- src/BulletDynamics/ConstraintSolver/btSliderConstraint.h | 2 ++ src/LinearMath/btScalar.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/StandaloneMain/main_tinyrenderer_single_example.cpp b/examples/StandaloneMain/main_tinyrenderer_single_example.cpp index 5739911df..37e82ac9d 100644 --- a/examples/StandaloneMain/main_tinyrenderer_single_example.cpp +++ b/examples/StandaloneMain/main_tinyrenderer_single_example.cpp @@ -170,7 +170,7 @@ struct TinyRendererGUIHelper : public GUIHelperInterface clearBuffers(clearColor); - ATTRIBUTE_ALIGNED16(float modelMat[16]); + ATTRIBUTE_ALIGNED16(btScalar modelMat[16]); ATTRIBUTE_ALIGNED16(float viewMat[16]); ATTRIBUTE_ALIGNED16(float projMat[16]); @@ -178,7 +178,7 @@ struct TinyRendererGUIHelper : public GUIHelperInterface m_camera.getCameraViewMatrix(viewMat); btVector3 lightDirWorld(-5,200,-40); - switch (1)//app->getUpAxis()) + switch (m_upAxis) { case 1: lightDirWorld = btVector3(-50.f,100,30); diff --git a/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h b/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h index 628ada4cf..1957f08a9 100755 --- a/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h +++ b/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h @@ -25,6 +25,8 @@ TODO: #ifndef BT_SLIDER_CONSTRAINT_H #define BT_SLIDER_CONSTRAINT_H +#include "LinearMath/btScalar.h"//for BT_USE_DOUBLE_PRECISION + #ifdef BT_USE_DOUBLE_PRECISION #define btSliderConstraintData2 btSliderConstraintDoubleData #define btSliderConstraintDataName "btSliderConstraintDoubleData" diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h index 825ea0fdc..bbd6aee6b 100644 --- a/src/LinearMath/btScalar.h +++ b/src/LinearMath/btScalar.h @@ -17,6 +17,7 @@ subject to the following restrictions: #ifndef BT_SCALAR_H #define BT_SCALAR_H + #ifdef BT_MANAGED_CODE //Aligned data types not supported in managed code #pragma unmanaged