Unload and reload CEGUI

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

eXt
Just popping in
Just popping in
Posts: 6
Joined: Wed May 10, 2006 11:28

Unload and reload CEGUI

Postby eXt » Wed May 17, 2006 13:20

I need to unload CEGUI completley and reload it at a later stage in my application. But when I load it the second time it crashes at this:

Code: Select all

CEGUI::SchemeManager::getSingletonPtr()->loadScheme((CEGUI::utf8*)"TaharezLook.scheme");


I think I unload everything correctly by destrying windows, the OGRE scenemanager and unloading the schemes.

How should I unload and reload CEGUI?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Wed May 17, 2006 16:47

The easiest way to completely unload CEGUI would be to:

Code: Select all

delete CEGUI::System::getSingletonPtr();

You may want to destroy the Ogre CEGUI renderer as well.

eXt
Just popping in
Just popping in
Posts: 6
Joined: Wed May 10, 2006 11:28

Postby eXt » Wed May 17, 2006 17:21

I get an exception when deleting CEGUI like that:

"WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'TaharezLook/StaticImage' Window objects is not registered with the system."

Should I free the windows myself before I delete them or not?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Wed May 17, 2006 17:31

deleting System will clear all loaded gui resources, including scheme, windows, imageset and so on...

That error should not occur.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 3 guests