In my OpenSceneGraph program, I have the following code:
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi) {
osg::notify(osg::NOTICE) << "Error, no WindowingSystemInterface available, cannot create windows." << std::endl;
return 0;
}
Unfortunately the method getWindowingSystemInterface() returns a null value, so the program cannot continue. What can be the reason that it returns null and how can I change my program (or build settings?) to let it return a non-null value? I'm using Visual Studio 2012.