CEGUI Cleanup in an MDI app with multiple OpenGL components

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

JohnArgentieri
Just popping in
Just popping in
Posts: 15
Joined: Tue Jan 09, 2007 16:14

CEGUI Cleanup in an MDI app with multiple OpenGL components

Postby JohnArgentieri » Mon Dec 08, 2008 15:45

CEGUI Gurus,

We've implemented CEGUI in a plug-in DLL to an MDI application on Win32. We're using 0.5.0b. There are other plug-ins that use OpenGL. Whenever we delete the CEGUI::System and OpenGLRenderer, on shutting down the one CEGUI plug-in, it destroys the textures in the other OpenGL plug-ins. Can anyone here provide me with some advice as to how to work around this issue?

Many thanks, and happy holidays!
John Argentieri

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Postby Jamarr » Mon Dec 08, 2008 16:29

CEGUI is open source, so you can take a look at or even step through the shutdown code yourself. CEGUI only deletes textures that where created by CEGUI (eg, from calls to createTexture()).

You would either have to be using CEGUI to load unrelated textures (which I doubt, since that doesn't make sense), or somewhere in your code you are deleting those textures without realizing it.

If you think there is a bug within CEGUI causing this, you should provide a minimal code example demonstrating the problem.

JohnArgentieri
Just popping in
Just popping in
Posts: 15
Joined: Tue Jan 09, 2007 16:14

Postby JohnArgentieri » Tue Dec 09, 2008 20:22

Well, I'm assuming that it is happening when deleting the CEGUI::OpenGLRenderer and the CEGUI::System, because if I comment that stuff out it doesn't happen. I can look to the source code, but I wanted to make sure that there wasn't anyone on the CEGUI forums that could provide some insight.

So, is there anyone else that might have seen a similar problem occur?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Dec 09, 2008 21:40

Hi,

I'm not aware of this, or a similar, issue coming up previously.

As Jamarr suggests, our texture use and the later cleanup is pretty basic. The only thing we delete are CEGUI::Texture based objects, and these can only have an internally generated OpenGL texture name, and that is the same one that's later deleted in the destructor.

If it were possible to create a CEGUI::Texture from an existing OpenGL texture, there would be the potential for such an error to arise, but all the present implementations for the OpenGL renderer module do not allow the creation of a CEGUI::Texture from an existing OpenGL texture (this is actually a really annoying limitation in the GL renderer module :lol: ).

So currently I'm not certain what could be causing your issue. Are you getting the OpenGL texture out of the CEGUI::Texture and using this in any other part of the application at all? (this is the only scenario where CEGUI would delete a texture from underneath of something else that was using it. Though it seems like an unlikely scenario from your description).

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests