Can you tell me the clear screen command

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
neppyweb
Posts: 22
Joined: Thu Nov 23, 2006 12:44 pm

Can you tell me the clear screen command

Post by neppyweb »

When I want to change the screen.. how can I clear the screen:?:

Thank you sir..
AaronA
Posts: 55
Joined: Tue Sep 12, 2006 1:31 am

Post by AaronA »

Code: Select all

driver->beginScene(true, true, SColor(0,200,200,200));
The last param beeing the clear screen color.
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

or, getSceneManager()->clear() or something so all models unload and you can load new models for the new scene,
Coolkat88
Posts: 30
Joined: Tue Oct 03, 2006 3:14 pm

Post 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.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post 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(); 
neppyweb
Posts: 22
Joined: Thu Nov 23, 2006 12:44 pm

Post by neppyweb »

Thank you very much ^-^
neppyweb
Posts: 22
Joined: Thu Nov 23, 2006 12:44 pm

Thank you

Post by neppyweb »

Thank you very much ^-^
Post Reply