mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-15 06:00:12 +00:00
6a9c54c4ef
Small refactoring for ExampleBrowser: move examples cpp files in the app/executable Move ExtendedTutorials in its own app/executable as a test.
49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
|
|
#include "OpenGLExampleBrowser.h"
|
|
|
|
#include "Bullet3Common/b3CommandLineArgs.h"
|
|
#include "../Utils/b3Clock.h"
|
|
|
|
#include "ExampleEntries.h"
|
|
#include "Bullet3Common/b3Logging.h"
|
|
|
|
#include "../Importers/ImportObjDemo/ImportObjExample.h"
|
|
#include "../Importers/ImportBsp/ImportBspExample.h"
|
|
#include "../Importers/ImportColladaDemo/ImportColladaSetup.h"
|
|
#include "../Importers/ImportSTLDemo/ImportSTLSetup.h"
|
|
#include "../Importers/ImportURDFDemo/ImportURDFSetup.h"
|
|
#include "../Importers/ImportSDFDemo/ImportSDFSetup.h"
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
b3CommandLineArgs args(argc,argv);
|
|
b3Clock clock;
|
|
|
|
|
|
ExampleEntriesAll examples;
|
|
examples.initExampleEntries();
|
|
|
|
OpenGLExampleBrowser* exampleBrowser = new OpenGLExampleBrowser(&examples);
|
|
bool init = exampleBrowser->init(argc,argv);
|
|
exampleBrowser->registerFileImporter(".urdf",ImportURDFCreateFunc);
|
|
exampleBrowser->registerFileImporter(".sdf",ImportSDFCreateFunc);
|
|
exampleBrowser->registerFileImporter(".obj",ImportObjCreateFunc);
|
|
|
|
clock.reset();
|
|
if (init)
|
|
{
|
|
do
|
|
{
|
|
float deltaTimeInSeconds = clock.getTimeMicroseconds()/1000000.f;
|
|
clock.reset();
|
|
exampleBrowser->update(deltaTimeInSeconds);
|
|
|
|
} while (!exampleBrowser->requestedExit());
|
|
}
|
|
delete exampleBrowser;
|
|
|
|
|
|
return 0;
|
|
}
|