more cmake support for examples
This commit is contained in:
@@ -34,16 +34,16 @@ struct ExampleEntry
|
||||
|
||||
static ExampleEntry gDefaultExamples[]=
|
||||
{
|
||||
ExampleEntry(0,"Rendering",0),
|
||||
ExampleEntry(1,"Instanced Rendering", RenderInstancingCreateFunc),
|
||||
ExampleEntry(1,"CoordinateSystemDemo",CoordinateSystemCreateFunc),
|
||||
ExampleEntry(1,"Raytracer",RayTracerCreateFunc),
|
||||
|
||||
|
||||
ExampleEntry(0,"API",0),
|
||||
ExampleEntry(1,"Basic Example",BasicExampleCreateFunc),
|
||||
|
||||
ExampleEntry(1,"Gyroscopic", GyroscopicCreateFunc),
|
||||
|
||||
ExampleEntry(1,"Planar 2D",Planar2DCreateFunc),
|
||||
|
||||
//#ifndef _DEBUG
|
||||
ExampleEntry(0,"Benchmarks", 0),
|
||||
ExampleEntry(1,"3000 boxes", BenchmarkCreateFunc, 1),
|
||||
ExampleEntry(1,"1000 stack", BenchmarkCreateFunc, 2),
|
||||
@@ -51,21 +51,27 @@ static ExampleEntry gDefaultExamples[]=
|
||||
ExampleEntry(1,"Convex stack", BenchmarkCreateFunc, 4),
|
||||
ExampleEntry(1,"Prim vs Mesh", BenchmarkCreateFunc, 5),
|
||||
ExampleEntry(1,"Convex vs Mesh", BenchmarkCreateFunc, 6),
|
||||
ExampleEntry(1,"7", BenchmarkCreateFunc, 7),
|
||||
ExampleEntry(1,"Raycast", BenchmarkCreateFunc, 7),
|
||||
//#endif
|
||||
|
||||
|
||||
ExampleEntry(0,"Importers", 0),
|
||||
ExampleEntry(1,"Wavefront Obj", ImportObjCreateFunc, 0),
|
||||
|
||||
ExampleEntry(1,"Quake BSP", ImportBspCreateFunc, 0),
|
||||
ExampleEntry(1,"COLLADA dae", ImportColladaCreateFunc, 0),
|
||||
ExampleEntry(1,"STL", ImportSTLCreateFunc, 0),
|
||||
ExampleEntry(1,"URDF (RigidBody)", ImportURDFCreateFunc, 0),
|
||||
ExampleEntry(1,"URDF (MultiBody)", ImportURDFCreateFunc, 1),
|
||||
|
||||
|
||||
|
||||
ExampleEntry(0,"Vehicles",0),
|
||||
|
||||
ExampleEntry(1,"ForkLift",ForkLiftCreateFunc),
|
||||
|
||||
|
||||
ExampleEntry(0,"Rendering",0),
|
||||
ExampleEntry(1,"Instanced Rendering", RenderInstancingCreateFunc),
|
||||
ExampleEntry(1,"CoordinateSystemDemo",CoordinateSystemCreateFunc),
|
||||
ExampleEntry(1,"Raytracer",RayTracerCreateFunc),
|
||||
|
||||
};
|
||||
|
||||
@@ -92,14 +98,8 @@ void ExampleEntries::initExampleEntries()
|
||||
{
|
||||
m_data->m_allExamples.clear();
|
||||
|
||||
{
|
||||
ExampleEntry e(0,"Basic Concepts", 0);
|
||||
m_data->m_allExamples.push_back(e);
|
||||
}
|
||||
{
|
||||
ExampleEntry e(1,"Empty",EmptyExample::CreateFunc);
|
||||
m_data->m_allExamples.push_back(e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int numDefaultEntries = sizeof(gDefaultExamples)/sizeof(ExampleEntry);
|
||||
for (int i=0;i<numDefaultEntries;i++)
|
||||
@@ -107,6 +107,20 @@ void ExampleEntries::initExampleEntries()
|
||||
m_data->m_allExamples.push_back(gDefaultExamples[i]);
|
||||
}
|
||||
|
||||
if (m_data->m_allExamples.size()==0)
|
||||
{
|
||||
|
||||
{
|
||||
ExampleEntry e(0,"Empty", 0);
|
||||
m_data->m_allExamples.push_back(e);
|
||||
}
|
||||
|
||||
{
|
||||
ExampleEntry e(1,"Empty",EmptyExample::CreateFunc);
|
||||
m_data->m_allExamples.push_back(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ExampleEntries::registerExampleEntry(int menuLevel, const char* name,ExampleInterface::CreateFunc* createFunc, int option)
|
||||
|
||||
Reference in New Issue
Block a user