fix some out-of-bounds error in the OpenCL rigid body pipeline

re-enable an OpenCL/gpu rigid body example (box-box stack)
This commit is contained in:
erwincoumans
2015-05-01 21:34:27 -07:00
parent 7ca20f529a
commit 01d14f538a
20 changed files with 2710 additions and 12 deletions

View File

@@ -0,0 +1,47 @@
#ifndef GPU_RIGID_BODY_DEMO_H
#define GPU_RIGID_BODY_DEMO_H
#include "Bullet3Common/b3Vector3.h"
#include "../CommonOpenCL/CommonOpenCLBase.h"
class GpuRigidBodyDemo : public CommonOpenCLBase
{
protected:
class GLInstancingRenderer* m_instancingRenderer;
class GLPrimitiveRenderer* m_primRenderer;
class CommonWindowInterface* m_window;
struct GpuRigidBodyDemoInternalData* m_data;
public:
GpuRigidBodyDemo(GUIHelperInterface* helper);
virtual ~GpuRigidBodyDemo();
virtual void initPhysics();
virtual void setupScene();
virtual void destroyScene(){};
virtual void exitPhysics();
virtual void renderScene();
virtual void stepSimulation(float deltaTime);
//for picking
b3Vector3 getRayTo(int x,int y);
virtual bool mouseMoveCallback(float x,float y);
virtual bool mouseButtonCallback(int button, int state, float x, float y);
virtual bool keyboardCallback(int key, int state);
unsigned char* loadImage(const char* fileName, int& width, int& height, int& n);
};
#endif //GPU_RIGID_BODY_DEMO_H