When I want to change the screen.. how can I clear the screen:?:
Thank you sir..
Can you tell me the clear screen command
Code: Select all
driver->beginScene(true, true, SColor(0,200,200,200));
or, getSceneManager()->clear() or something so all models unload and you can load new models for the new scene,
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
well the scene manager has a clear() function
the GUI doesn't have a clear function like that so you will have to make a linked list of all the GUI elements that you have and then ->remove() them.
Code: Select all
smgr->clear();
You do not have to keep a linked list of the elements. You simply remove the elements from the root gui elements linked list.
Code: Select all
// notice that this is a reference to the list maintained by the root element
const core::list<IGUIElement*>& children = Environment->getRootGUIElement()->getChildren();
while (!children.empty())
(*children.getLast())->remove();