I'd like to create a second IrrlichtDevice after closing and droping a first one. Something like this :
Code: Select all
IrrlichtDevice * poDevice = createDevice(EDT_OPENGL, dimension2d<u32>(800, 600), 32, false, true, false);
while(poDevice->run())
{
// ...
}
poDevice->closeDevice();
poDevice->drop();
// Creating a new device
poDevice = createDevice(EDT_OPENGL, dimension2d<u32>(800, 600), 32, false, true, false);
while(poDevice->run())
{
// ...
}
poDevice->closeDevice();
poDevice->drop();
Yet, when I do, the device is created, but the run method directly returns false :
Code: Select all
// Load my Irrlicht-based library
// Instanciate my Irrlicht class which creates a device
mpoDevice = createDevice(EDT_OPENGL, dimension2d<u32>(800, 600), 32, false, true, false, this);
// ...
// Delete my instance which closes and drops the device
mpoDevice->closeDevice();
mpoDevice->drop();
// Unload my Irrlicht-based library
// ...
// Reload my Irrlicht-based library
// Re-instanciate my Irrlicht class which re-creates a device
mpoDevice = createDevice(EDT_OPENGL, dimension2d<u32>(800, 600), 32, false, true, false, this);
// Run the device
while(mpoDevice->run()) // This returns immediatly false, thus my device never renders anything
// ...
// etc...
Thank you.