[osg-users] Migration from OSG 3.1.5 to 3.4.0 / Qt 4 to Qt 5

Andrew Cunningham andrewC at mac.com
Mon Jan 11 08:57:44 PST 2016


Ok, now I am having a new problem.
I am now transitioning to QT 5.5 and Visual Studio 2015 Update 1 from QT 5.4 and VS 2010 ( using OSG 3.4.0)

I rebuilt OSG for Visual Studio 2015 Update 1
I built QT5.5  for Visual Studio 2015 Update 1

The OSG examples all work fine, except OSGViewerQT

When osgViewerQT starts up

>	osg130-osgd.dll!osg::State::initializeExtensionProcs() Line 959	C++
 	osg130-osgd.dll!osg::GraphicsContext::makeCurrent() Line 620	C++
 	osg130-osgQtd.dll!osgQt::GraphicsWindowQt::realizeImplementation() Line 777	C++
 	osg130-osgd.dll!osg::GraphicsContext::realize() Line 511	C++
 	osg130-osgViewerd.dll!osgViewer::CompositeViewer::realize() Line 612	C++
 	osg130-osgViewerd.dll!osgViewer::ViewerBase::frame(double simulationTime) Line 681	C++
 	osgviewerQtd.exe!ViewerWidget::paintEvent(QPaintEvent * event) Line 85	C++



   const char* vendor = (const char*) glGetString( GL_VENDOR );

 returns NULL, so of course nothing will work from now on.

Digging through the code, I found that  in QGLContext::makeCurrent
>	Qt5OpenGLd.dll!QGLContext::makeCurrent() Line 3578	C++
 	Qt5OpenGLd.dll!QGLWidget::makeCurrent() Line 4071	C++
 	osg130-osgQtd.dll!osgQt::GraphicsWindowQt::makeCurrentImplementation() Line 840	C++
 	osg130-osgd.dll!osg::GraphicsContext::makeCurrent() Line 611	C++
 	osg130-osgQtd.dll!osgQt::GraphicsWindowQt::realizeImplementation() Line 777	C++
 	osg130-osgd.dll!osg::GraphicsContext::realize() Line 511	C++


const char *renderer = reinterpret_cast<const char *>(d->guiGlContext->functions()->glGetString(GL_RENDERER));

returns a valid string...

Any ideas on this one? It looks like we do not have a valid GL context when OSG needs it.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65981#65981







More information about the osg-users mailing list