I seem to be having an issue with something very simple/basic. My main game loop appears to be crashing on IrrlichtDevice::run() after I hit the exit button on the app (when not in fullscreen) or by hitting alt+f4. I have most of my stuff that involves the IrrlichtDevice and IrrlichtDriver in a class, which has a singleton setup. Quite simply:
Code: Select all
// the entry point for any Windows program
int main()
{
// Setup main game class
GameClass::GetSingleton();
// Now instantiate the renderer class
Renderer::GetSingleton();
// enter the main loop:
MainGameLoop();
// Kill game process
GentleKillProcess();
return 0;
}
Code: Select all
void MainGameLoop()
{
while(Renderer::GetSingleton()->RunDevice() && Renderer::GetSingleton()->GetDriver())
{
GameClass::GetSingleton()->RunFrame();
}
}
Code: Select all
void Renderer::DrawAll(void)
{
if(device->isWindowActive())
{
device->getTimer()->tick();
driver->beginScene(true, true, SColor(255, 255, 255, 0));
sceneManager->drawAll();
gui->drawAll();
driver->endScene();
}
}