diff --git a/Extras/RigidBodyGpuPipeline/opencl/gpu_rigidbody_pipeline2/CLPhysicsDemo.cpp b/Extras/RigidBodyGpuPipeline/opencl/gpu_rigidbody_pipeline2/CLPhysicsDemo.cpp index 363f57525..8347423a8 100644 --- a/Extras/RigidBodyGpuPipeline/opencl/gpu_rigidbody_pipeline2/CLPhysicsDemo.cpp +++ b/Extras/RigidBodyGpuPipeline/opencl/gpu_rigidbody_pipeline2/CLPhysicsDemo.cpp @@ -98,6 +98,12 @@ struct InternalData m_linVelHost= new btVector3[MAX_CONVEX_BODIES_CL]; m_angVelHost = new btVector3[MAX_CONVEX_BODIES_CL]; m_bodyTimesHost = new float[MAX_CONVEX_BODIES_CL]; + for (int i=0;i0) { g_device= btOpenCLUtils::getDevice(g_cxMainContext,0); - btOpenCLDeviceInfo clInfo; - btOpenCLUtils::getDeviceInfo(g_device,clInfo); btOpenCLUtils::printDeviceInfo(g_device); g_cqCommandQue = clCreateCommandQueue(g_cxMainContext, g_device, 0, &ciErrNum); oclCHECKERROR(ciErrNum, CL_SUCCESS); @@ -282,14 +286,14 @@ void CLPhysicsDemo::init(int preferredDevice, int preferredPlatform, bool useInt m_data->m_linVelBuf = new adl::Buffer(g_deviceCL,MAX_CONVEX_BODIES_CL); m_data->m_angVelBuf = new adl::Buffer(g_deviceCL,MAX_CONVEX_BODIES_CL); m_data->m_bodyTimes = new adl::Buffer(g_deviceCL,MAX_CONVEX_BODIES_CL); - + m_data->m_localShapeAABB = new adl::Buffer(g_deviceCL,MAX_CONVEX_SHAPES_CL); gLinVelMem = (cl_mem)m_data->m_linVelBuf->m_ptr; gAngVelMem = (cl_mem)m_data->m_angVelBuf->m_ptr; gBodyTimes = (cl_mem)m_data->m_bodyTimes->m_ptr; - + writeVelocitiesToGpu(); narrowphaseAndSolver = new btGpuNarrowphaseAndSolver(g_deviceCL); @@ -526,4 +530,4 @@ void CLPhysicsDemo::stepSimulation() } -} +} \ No newline at end of file