Code: Select all
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
//Update physics.
m_DynamicsWorld->stepSimulation(1/60.f,10);
Code: Select all
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
//Update physics.
m_DynamicsWorld->stepSimulation(1/60.f,10);
Code: Select all
irr::IrrlichtDevice* const device = game.getDevice();
btDiscreteDynamicsWorld* const dynamicsWorld = game.getPhysics()->getWorld();
while (device->run())
{
if (device->isWindowActive())
{
//update game timer
game.tick();
//update the state machine (aka rendering and event receiving)
game.onUpdate();
//update physics
dynamicsWorld->stepSimulation(game.getElapsed(), 10);
}
else
device->yield();
}