add broadphase demo (empty skeleton)

This commit is contained in:
Erwin Coumans
2013-03-13 15:03:08 -07:00
parent 3ad76286e6
commit 9e623f6b0f
9 changed files with 267 additions and 124 deletions

View File

@@ -1,55 +1,21 @@
#ifndef PARTICLE_DEMO_H
#define PARTICLE_DEMO_H
//#include "GpuDemo.h"
#include "GpuDemo.h"
struct GLInstancingRenderer;
class ParticleDemo;
class ParticleDemo //: public GpuDemo
class ParticleDemo : public GpuDemo
{
public:
typedef class ParticleDemo* (CreateFunc)();
struct ConstructionInfo
{
bool useOpenCL;
int preferredOpenCLPlatformIndex;
int preferredOpenCLDeviceIndex;
int arraySizeX;
int arraySizeY;
int arraySizeZ;
bool m_useConcaveMesh;
float gapX;
float gapY;
float gapZ;
GLInstancingRenderer* m_instancingRenderer;
ConstructionInfo()
:useOpenCL(false),//true),
preferredOpenCLPlatformIndex(-1),
preferredOpenCLDeviceIndex(-1),
arraySizeX(10),
arraySizeY(10 ),
arraySizeZ(10),
m_useConcaveMesh(false),
gapX(4.3),
gapY(4.0),
gapZ(4.3),
m_instancingRenderer(0)
{
}
};
protected:
struct ParticleInternalData* m_data;
GLInstancingRenderer* m_instancingRenderer;
void initCL(int preferredDeviceIndex, int preferredPlatformIndex);
void exitCL();
virtual void initCL(int preferredDeviceIndex, int preferredPlatformIndex);
virtual void exitCL();
public:
@@ -67,9 +33,9 @@ public:
{
return "ParticleDemo";
}
static ParticleDemo* MyCreateFunc()
static GpuDemo* MyCreateFunc()
{
ParticleDemo* demo = new ParticleDemo;
GpuDemo* demo = new ParticleDemo;
return demo;
}