Good evening, I ran into an OSG/GL problem while trying to work with CEGUI. To draw a CEGUI layer, I derived a new Drawable class, CEGUIDrawable. I backup OSG's state, make the call to CEGUI, and then pop OSG's state back. On that side, everything is working fine.
The problem is where to do the CEGUI initialization, namely where to call the function CEGUI::OpenGLRenderer::bootstrapSystem() (a one time call). If I call it during the first draw pass, i.e. the first call to my CEGUIDrawable's drawImplementation(), it works fine. This is the idea used by Rui Wang in his OSG Cookbook, and is implemented here: https://github.com/xarray/osgRecipes/blob/master/cookbook/chapter9/ch09_04/CEGUIDrawable.cpp. Since this is not super clean, I wanted to take that boostrapSystem() call out of the Drawable's drawImplemention(). Unfortunately, calling boostrapSystem() from anywhere else causes an error, and that no matter if the viewer was realized or not, or that a thousand frames have been called beforehand. This is weird, because the error seems to occur in cases where OpenGL hasn't been initialized yet (no OpenGL context). Here's the error : > OpenGLRenderer failed to initialise the GLEW library. Missing GL version > The first sentence is CEGUI realizing that the GLEW library it is using wasn't loaded correctly, and the second part (Missing GL version) is GLEW itself not being able to get the OpenGL context. Any idea what causes the problem and how it can be solved without having to call the CEGUI initialization (bootstrapSystem()) from within drawImplemention()? Thanks, Nicolas ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60968#60968 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

