2015-04-16 16:55:32 +00:00
|
|
|
|
|
|
|
//#define EXAMPLE_CONSOLE_ONLY
|
|
|
|
#ifdef EXAMPLE_CONSOLE_ONLY
|
|
|
|
#include "EmptyBrowser.h"
|
|
|
|
typedef EmptyBrowser DefaultBrowser;
|
|
|
|
#else
|
|
|
|
#include "OpenGLExampleBrowser.h"
|
|
|
|
typedef OpenGLExampleBrowser DefaultBrowser;
|
|
|
|
#endif //EXAMPLE_CONSOLE_ONLY
|
|
|
|
|
|
|
|
#include "Bullet3Common/b3CommandLineArgs.h"
|
|
|
|
#include "../Utils/b3Clock.h"
|
|
|
|
|
|
|
|
#include "ExampleEntries.h"
|
2015-05-05 00:03:37 +00:00
|
|
|
#include "Bullet3Common/b3Logging.h"
|
2015-04-16 16:55:32 +00:00
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
b3CommandLineArgs args(argc,argv);
|
|
|
|
b3Clock clock;
|
2015-05-04 23:52:43 +00:00
|
|
|
|
|
|
|
|
2015-04-16 16:55:32 +00:00
|
|
|
ExampleEntries examples;
|
|
|
|
examples.initExampleEntries();
|
|
|
|
|
|
|
|
ExampleBrowserInterface* exampleBrowser = new DefaultBrowser(&examples);
|
|
|
|
bool init = exampleBrowser->init(argc,argv);
|
2015-05-05 00:03:37 +00:00
|
|
|
clock.reset();
|
2015-04-16 16:55:32 +00:00
|
|
|
if (init)
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
2015-05-04 23:52:43 +00:00
|
|
|
float deltaTimeInSeconds = clock.getTimeMicroseconds()/1000000.f;
|
2015-05-05 00:03:37 +00:00
|
|
|
clock.reset();
|
2015-04-16 16:55:32 +00:00
|
|
|
exampleBrowser->update(deltaTimeInSeconds);
|
|
|
|
|
|
|
|
} while (!exampleBrowser->requestedExit());
|
|
|
|
}
|
|
|
|
delete exampleBrowser;
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|