From 78f01243c1f9def0697bae8070ff98f117023d93 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Sun, 3 May 2015 11:10:12 -0700 Subject: [PATCH] fix double-precision compile bug --- examples/Benchmarks/BenchmarkDemo.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/Benchmarks/BenchmarkDemo.cpp b/examples/Benchmarks/BenchmarkDemo.cpp index 7e2ed7f5a..f5e6b88b8 100644 --- a/examples/Benchmarks/BenchmarkDemo.cpp +++ b/examples/Benchmarks/BenchmarkDemo.cpp @@ -268,20 +268,27 @@ public: if (m_guiHelper) { btAlignedObjectArray indices; - btAlignedObjectArray points; + btAlignedObjectArray points; float lineColor[4]={1,0.4,.4,1}; for (int i = 0; i < NUMRAYS; i++) { - points.push_back(source[i]); - points.push_back(hit[i]); + btVector3FloatData s,h; + for (int w=0;w<4;w++) + { + s.m_floats[w] = source[i][w]; + h.m_floats[w] = hit[i][w]; + } + + points.push_back(s); + points.push_back(h); indices.push_back(indices.size()); indices.push_back(indices.size()); } - m_guiHelper->getRenderInterface()->drawLines(&points[0].x(),lineColor,points.size(),sizeof(btVector3),&indices[0],indices.size(),1); + m_guiHelper->getRenderInterface()->drawLines(&points[0].m_floats[0],lineColor,points.size(),sizeof(btVector3),&indices[0],indices.size(),1); } #if 0