Multiple irrlichtdevices

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Tihtinen
Posts: 76
Joined: Fri Jan 08, 2010 3:12 pm
Location: Finland

Multiple irrlichtdevices

Post 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
Tihtinen
Posts: 76
Joined: Fri Jan 08, 2010 3:12 pm
Location: Finland

Post 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 : )
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

You need to run() at least once more before you drop. That might be why.
Post Reply