[osg-users] Having problems running the osgViewerWX example (GLExtensions returning as null)

Sam Hudson onsinch at gmail.com
Thu Nov 24 04:43:43 PST 2016


I'm trying to get the osgViewerWX example to work. I am using wxWidgets 3.1.0 and OSG 3.4.0. Everything has been compiled under VS2015  for x86.

When I first attempted to compile the example there were two errors, the signatures for two functions had changed. One was easy to fix (parameters had moved around) whilst the other is not so clear cut.

osgViewerWX.cpp bool GraphicsWindowWX::makeCurrentImplementation():


This isn't valid anymore as SetCurrent() requires a wxGLContext to be passed to it. I just passed _canvas to the function since it seemed like that was intended originally. It doesn't seem to make a difference if I comment it out.

So once I got it compile, on running, I found that an exception would be thrown in Renderer::initialize(osg::State* state). 

Upon inspection it seems that NULL is being returned when trying to retrieve the extension from the current state:

osg::GLExtensions* ext = state->get-osg::-GLExtensions-();

replaced gt and lt symbols with dashes, html filter removes them :(

I'm still learning on using OSG so I don't really know what needs to be changed to fix this or if this is actually a problem with my hardware. I would appreciate any help.


Read this topic online here:

More information about the osg-users mailing list