Page 1 of 1

Can you tell me the clear screen command

Posted: Mon Dec 25, 2006 5:08 am
by neppyweb
When I want to change the screen.. how can I clear the screen:?:

Thank you sir..

Posted: Mon Dec 25, 2006 5:25 am
by AaronA

Code: Select all

driver->beginScene(true, true, SColor(0,200,200,200));
The last param beeing the clear screen color.

Posted: Mon Dec 25, 2006 10:57 am
by Strong99
or, getSceneManager()->clear() or something so all models unload and you can load new models for the new scene,

Posted: Tue Dec 26, 2006 12:39 am
by Coolkat88
well the scene manager has a clear() function

Code: Select all

smgr->clear();
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.

Posted: Tue Dec 26, 2006 2:49 am
by vitek
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(); 

Posted: Thu Dec 28, 2006 2:14 am
by neppyweb
Thank you very much ^-^

Thank you

Posted: Thu Dec 28, 2006 2:15 am
by neppyweb
Thank you very much ^-^