I've found a "bug" in CEGUIOpenGLRenderer, basically d_rendererID is declared as static and initialized once with this constructor:
Code: Select all
String OpenGLRenderer::d_rendererID(
"CEGUI::OpenGLRenderer - Official OpenGL based 2nd generation renderer module.");
and it's ok since It should never change. But it does:
Code: Select all
// prefer FBO
if (((tt_type == TTT_AUTO) || (tt_type == TTT_FBO)) &&
GLEW_EXT_framebuffer_object)
{
d_rendererID += " TextureTarget support enabled via FBO extension.";
d_textureTargetFactory =
new OGLTemplateTargetFactory<OpenGLFBOTextureTarget>;
}
Whenever a CEGUIOpenGLRenderer is destroyed an re-created, a new " TextureTarget support enabled via FBO extension." string is appended to this static variable. After only a few iterations, the result of calling String& OpenGLRenderer::getIdentifierString() is something like this:
"CEGUI::OpenGLRenderer - Official OpenGL based 2nd generation renderer module. TextureTarget support enabled via FBO extension. TextureTarget support enabled via FBO extension. TextureTarget support enabled via FBO extension. TextureTarget support enabled via FBO extension. TextureTarget support enabled via FBO extension. TextureTarget support enabled via FBO extension. TextureTarget support enabled via FBO extension. TextureTarget support enabled via FBO extension."
I've found it because I'm doing a sort of "application launcher" that needs to bootstrap and finally destroy CEGUI whenever it loads a new application to ensure a clean CEGUI environment for each app.
I personally think static should be removed in this particular case...
Thanks!