int main(int argc, char* argv[])
{
	SimpleOpenGL3App* app = new SimpleOpenGL3App("Standalone Example (Software Renderer, TinyRenderer)", 1024, 768, true);
	int textureWidth = 640;
	int textureHeight = 480;

	SW_And_OpenGLGuiHelper gui(app, false, textureWidth, textureHeight, app->m_primRenderer);

	CommonExampleOptions options(&gui);
	CommonExampleInterface* example = StandaloneExampleCreateFunc(options);

	example->initPhysics();
	example->resetCamera();
	do
	{
		app->m_instancingRenderer->init();
		app->m_instancingRenderer->updateCamera(app->getUpAxis());

		example->stepSimulation(1. / 60.);

		example->renderScene();

		DrawGridData dg;
		dg.upAxis = app->getUpAxis();
		app->drawGrid(dg);
		app->swapBuffer();
	} while (!app->m_window->requestedExit());

	example->exitPhysics();
	delete example;
	delete app;
	return 0;
}
int main(int argc, char* argv[])
{

	SimpleOpenGL3App* app = new SimpleOpenGL3App("Bullet Standalone Example",1024,768,true);
	
	OpenGLGuiHelper gui(app,false);
    
	CommonExampleOptions options(&gui);
	CommonExampleInterface*    example = StandaloneExampleCreateFunc(options);
        
	example->initPhysics();

	do
	{
		app->m_instancingRenderer->init();
        app->m_instancingRenderer->updateCamera();

		example->stepSimulation(1./60.);
	  	
		example->renderScene();
 	
		app->drawGrid();
		app->swapBuffer();
	} while (!app->m_window->requestedExit());

	example->exitPhysics();
	delete example;
	delete app;
	return 0;
}
int main(int argc, char* argv[])
{
	
	DummyGUIHelper noGfx;

	CommonExampleOptions options(&noGfx);
	CommonExampleInterface*    example = StandaloneExampleCreateFunc(options);
	
	example->initPhysics();
	example->stepSimulation(1.f/60.f);
	example->exitPhysics();

	delete example;

	return 0;
}
int main(int argc, char* argv[])
{
	{
		DummyGUIHelper noGfx;

		CommonExampleOptions options(&noGfx);
		CommonExampleInterface*    example = StandaloneExampleCreateFunc(options);

		example->initPhysics();
		for (int i = 0; i < 1000; i++)
		{
			printf("Simulating step %d\n", i);
			example->stepSimulation(1.f / 60.f);
		}
		example->exitPhysics();

		delete example;
	}
	return 0;
}
int main(int argc, char* argv[])
{

	SimpleOpenGL3App* app = new SimpleOpenGL3App("Bullet Standalone Example",1024,768,true);
	
	prevMouseButtonCallback = app->m_window->getMouseButtonCallback();
	prevMouseMoveCallback = app->m_window->getMouseMoveCallback();

	app->m_window->setMouseButtonCallback((b3MouseButtonCallback)OnMouseDown);
	app->m_window->setMouseMoveCallback((b3MouseMoveCallback)OnMouseMove);
	
	OpenGLGuiHelper gui(app,false);
    
	CommonExampleOptions options(&gui);

	example = StandaloneExampleCreateFunc(options);
  example->initPhysics();
	example->resetCamera();
	
	do
	{
		app->m_instancingRenderer->init();
        app->m_instancingRenderer->updateCamera(app->getUpAxis());

		example->stepSimulation(1./60.);
	  	
		example->renderScene();
 	
		DrawGridData dg;
        dg.upAxis = app->getUpAxis();
		app->drawGrid(dg);
		
		app->swapBuffer();
	} while (!app->m_window->requestedExit());

	example->exitPhysics();
	delete example;
	delete app;
	return 0;
}
int main(int argc, char* argv[])
{
	
	TinyRendererGUIHelper noGfx(640,480);

	CommonExampleOptions options(&noGfx);
	CommonExampleInterface*    example = StandaloneExampleCreateFunc(options);
	
	example->initPhysics();
	example->resetCamera();

	for (int i=0;i<1000;i++)
	{
		printf("Simulating step %d\n",i);
		example->stepSimulation(1.f/60.f);
		example->renderScene();
	}
	example->exitPhysics();

	delete example;

	return 0;
}