add RtMini test/library (works under Windows)
minor cleanups
This commit is contained in:
@@ -32,20 +32,22 @@ public:
|
||||
float gapZ;
|
||||
GLInstancingRenderer* m_instancingRenderer;
|
||||
class btgWindowInterface* m_window;
|
||||
class GwenUserInterface* m_gui;
|
||||
|
||||
ConstructionInfo()
|
||||
:useOpenCL(true),
|
||||
preferredOpenCLPlatformIndex(-1),
|
||||
preferredOpenCLDeviceIndex(-1),
|
||||
arraySizeX(10),
|
||||
arraySizeY(20),
|
||||
arraySizeY(10),
|
||||
arraySizeZ(10),
|
||||
m_useConcaveMesh(false),
|
||||
gapX(14.3),
|
||||
gapY(14.0),
|
||||
gapZ(14.3),
|
||||
m_instancingRenderer(0),
|
||||
m_window(0)
|
||||
m_window(0),
|
||||
m_gui(0)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -64,22 +64,22 @@ btAlignedObjectArray<const char*> demoNames;
|
||||
int selectedDemo = 0;
|
||||
GpuDemo::CreateFunc* allDemos[]=
|
||||
{
|
||||
|
||||
GpuConvexScene::MyCreateFunc,
|
||||
ConcaveScene::MyCreateFunc,
|
||||
|
||||
GpuConvexScene::MyCreateFunc,
|
||||
GpuCompoundScene::MyCreateFunc,
|
||||
PairBench::MyCreateFunc,
|
||||
|
||||
|
||||
GpuRigidBodyDemo::MyCreateFunc,
|
||||
//GpuRigidBodyDemo::MyCreateFunc,
|
||||
|
||||
//BroadphaseBenchmark::CreateFunc,
|
||||
//GpuBoxDemo::CreateFunc,
|
||||
|
||||
PairBench::MyCreateFunc,
|
||||
|
||||
|
||||
ParticleDemo::MyCreateFunc,
|
||||
//ParticleDemo::MyCreateFunc,
|
||||
|
||||
|
||||
//SpheresDemo::CreateFunc,
|
||||
@@ -381,7 +381,11 @@ int main(int argc, char* argv[])
|
||||
|
||||
args.GetCmdLineArgument("selected_demo",selectedDemo);
|
||||
|
||||
useNewBatchingKernel = args.CheckCmdLineFlag("new_batching");
|
||||
|
||||
if (args.CheckCmdLineFlag("new_batching"))
|
||||
{
|
||||
useNewBatchingKernel = true;
|
||||
}
|
||||
bool benchmark=args.CheckCmdLineFlag("benchmark");
|
||||
dump_timings=args.CheckCmdLineFlag("dump_timings");
|
||||
ci.useOpenCL = !args.CheckCmdLineFlag("disable_opencl");
|
||||
@@ -563,6 +567,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
ci.m_instancingRenderer = new GLInstancingRenderer(maxObjectCapacity);//render.getInstancingRenderer();
|
||||
ci.m_window = window;
|
||||
ci.m_gui = gui;
|
||||
ci.m_instancingRenderer->init();
|
||||
ci.m_instancingRenderer->InitShaders();
|
||||
|
||||
@@ -615,11 +620,6 @@ int main(int argc, char* argv[])
|
||||
|
||||
window->startRendering();
|
||||
|
||||
char msg[1024];
|
||||
int numInstances = 0;//ci.m_instancingRenderer->getNumInstances();
|
||||
sprintf(msg,"Num objects = %d",numInstances);
|
||||
gui->setStatusBarMessage(msg,true);
|
||||
|
||||
glClearColor(0.6,0.6,0.6,1);
|
||||
glClear(GL_COLOR_BUFFER_BIT| GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "gpu_rigidbody/host/btGpuNarrowPhase.h"
|
||||
#include "gpu_rigidbody/host/btConfig.h"
|
||||
#include "GpuRigidBodyDemoInternalData.h"
|
||||
#include "../gwenUserInterface.h"
|
||||
|
||||
|
||||
void GpuConvexScene::setupScene(const ConstructionInfo& ci)
|
||||
{
|
||||
@@ -85,5 +87,10 @@ void GpuConvexScene::setupScene(const ConstructionInfo& ci)
|
||||
//float camPos[4]={1,12.5,1.5,0};
|
||||
m_instancingRenderer->setCameraTargetPosition(camPos);
|
||||
m_instancingRenderer->setCameraDistance(120);
|
||||
|
||||
|
||||
|
||||
char msg[1024];
|
||||
int numInstances = index;
|
||||
sprintf(msg,"Num objects = %d",numInstances);
|
||||
ci.m_gui->setStatusBarMessage(msg,true);
|
||||
}
|
||||
Reference in New Issue
Block a user