Woo woo woo… you know it!

One of the things I’ve been working on recently is an in app editor for the OGRE based 3D GUI that forms the front end of one of our main products. One of the features that I added was the ability to switch between scenes with the click of a button. I was able to get this working on Windows with little difficulty, but on Linux I constantly got the same assert.

ogre/RenderSystems/GL/src/OgreGLSupport.cpp:56: virtual void Ogre::GLSupport::initialiseExtensions(): Assertion `pcVer && "Problems getting GL version string using glGetString"' failed.

I have revisited this problem several times in recent months and each time my investigation faltered at the same point. The first time a scene was loaded, everything was fine, the second time a scene was loaded OGRE failed to initialize the OpenGL Context. Something wasn’t being released correctly when the first scene was shutdown. I tried everything. With OGRE it should really be as simple as calling shutdown() on the root node and then deleting the root node using OGRE_DELETE, but it just wouldn’t work.

This past Friday I finally got it working though. The following code snippet is from the second time that OGRE tried to initialize the OpenGL render system. The dimensions of the target render window are wrong. For whatever reason, Qt was not able to finish initializing the container widget before I was grabbing the X11 info and passing this onto the OGRE initialization code. A simple decouple using a 1ms timer sorted the issue.

******************************
*** Starting GLX Subsystem ***
******************************
GLRenderSystem::_createRenderWindow "SomeWidget", 1059x0 windowed  miscParams: parentWindowHandle=135727904:0:56624998
GLXWindow::create used FBConfigID = 117

I’m not going to lie, I fist bumped like The Long Island Iced Z when I saw that model reload! :D

Leave a Reply

Your email address will not be published. Required fields are marked *