Page 1 of 1

Multiple irrlichtdevices

Posted: Sat Aug 07, 2010 3:59 pm
by Tihtinen
Hi, I want to create a "launcher" for my game which will be run before the actual game.

I want to create a separate irrlichtdevice for the launcher and then abandon it and after that create the actual game device.

But if I use

Code: Select all

device->closeDevice();
device->drop();
in the launcher's destructor the launcher window will close, but afterwards the actual game irrlichtdevice will immediately return false in device->run(), thus terminating the whole game at launch :shock:

EDIT: Yes, I'm aware this is done in the Demo-example of Irrlicht but there it only drops the device pointer, which in my case does nothing :S

Posted: Sat Aug 07, 2010 4:20 pm
by Tihtinen
Okay already got this solved.

I moved the closeDevice() -call from the destructor to the actual event of launcher termination. Don't know why it works, but it does : )

Posted: Sat Aug 07, 2010 10:09 pm
by DtD
You need to run() at least once more before you drop. That might be why.