Hello,
I'm working on a projet using Irrlicht and I have a problem:
I use the same device object during all the game: start screen, demo, UI, game, options...
The problem is that all objets persists ans I have to remove them before changing scene. But I sometimes "forget" one, sometimes because I can't have a valid pointer of all objets !
I've tried to browse the device class for all my elements and drop them. But the only thing I done is to crash the engine...
Is there a way to "clean up" or "reset" the device, to drop all created childs (gui, scene...), without closing the device and recreating a new one ?
Cleaning up device
there is a clear() function in the scene manager.
this will clear all the scene nodes and everything that is in the buffer more or less.
i used this to clear the scene before changing to another scene. but the GUI environment doesn't have one and im currently working on a way to clear that.. if i find something i'll post it here.
Code: Select all
device->getSceneManager()->clear();
i used this to clear the scene before changing to another scene. but the GUI environment doesn't have one and im currently working on a way to clear that.. if i find something i'll post it here.