Hi David, When you say the window doesn't display, only a "window with a ?" it's hard to know what you mean. It's certainly now a description I've seen before from users w.r.t OSG app problems.
The best I can suggest is start by getting an OSG example compiling and working that is close to yours and then bit by by modify it. If there is a problem a screenshot would be useful. Also it would be useful to outline the hardware you are working on. Another route would be to just grab OSG-3.2.0 from source and compile it and go from there. Robert. On 28 March 2014 14:54, David Cofer <[email protected]> wrote: > I am trying to get my osg project running on Ubuntu 12.04. I originally > had it working with OSG 2.8.3, but I am trying to upgrade to OSG 3.0.1.2. I > installed the following packages using Synaptics. > > libopenscenegraph-dev > libopenscenegraph80 > openscenegraph > openscenegraph-doc > openscenegraph-examples > libopenthreads-dev > libopenthreads14 > > I can run the osg examples fine. My application attempts to create a > standalone window using the following code. > > Code: > > void OsgSimulationWindow::InitStandalone(Simulator *lpSim, OsgSimulator > *lpVsSim) > { > m_osgViewer = new osgViewer::Viewer; > m_osgManip = new OsgCameraManipulator(lpSim, m_osgViewer.get()); > m_osgViewer->setCameraManipulator(m_osgManip.get()); > > osgGA::GUIEventHandler *lpHandler = new OsgDraggerHandler(lpSim, > m_osgViewer.get()); > m_osgViewer->addEventHandler(lpHandler); > > // Create the window and run the threads. > m_osgViewer->setUpViewInWindow(m_ptPosition.x, m_ptPosition.y, > m_ptSize.x, m_ptSize.y); > > CStdColor *vColor = lpSim->BackgroundColor(); > m_osgViewer->getCamera()->setClearColor(osg::Vec4(vColor->r(), > vColor->g(), vColor->b(), vColor->a())); > m_osgViewer->setSceneData(lpVsSim->OSGRoot()); > > int inheritanceMask = > (osgUtil::SceneView::VariablesMask::ALL_VARIABLES & > ~osgUtil::SceneView::VariablesMask::CULL_MASK); > > // set mask for upper camera > m_osgViewer->getCamera()->setInheritanceMask(inheritanceMask); > m_osgViewer->getCamera()->setCullMask(0x1); > > m_osgViewer->realize(); > } > > > > > > This worked in 2.8.3. However, when I run it with the 3.1 I get a window > that shows up in the task bar with a big question mark and it does not > actually display anything. I set the osg logging level to DEBUG_INFO, but I > am not seeing any errors are warnings in it. I then tried create a full > screen window by commenting out the setupViewInWindow method call, and this > worked. The scene rendered correctly in full screen mode. So my osg is > working, it is just something with starting in a stand-alone screen that is > the problem. > > I then started looking through the examples and I found the > osgkeyboardmouse example that opens a screen like I want. I was able to run > the example that is installed in the deb package. However, when I > downloaded the example .cpp and compiled it myself it produces the same > result as my simulation. A window with a ? that does not display. Here are > the commands I am using to compile the example. > > > Code: > > g++ -MMD > "/home/david/AnimatLabSDK/Test/osgkeyboardmouse/osgkeyboardmouse.cpp" -g > -O0 -DDEBUG -DMONODEVELOP > -I"/home/david/AnimatLabSDK/Test/osgkeyboardmouse/.prec/Debug" -c -o > "/home/david/AnimatLabSDK/Test/osgkeyboardmouse/bin/Debug/osgkeyboardmouse.o" > > Generating binary "osgkeyboardmouse" from object files > g++ -o > "/home/david/AnimatLabSDK/Test/osgkeyboardmouse/bin/Debug/osgkeyboardmouse" > "/home/david/AnimatLabSDK/Test/osgkeyboardmouse/bin/Debug/osgkeyboardmouse.o" > -l"osg" -l"osgDB" -l"osgFX" -l"osgGA" -l"osgManipulator" -l"osgParticle" > -l"osgShadow" -l"osgSim" -l"osgTerrain" -l"osgText" -l"osgUtil" > -l"osgViewer" -l"osgVolume" -l"osgWidget" > > > > > I am kind of stumped. It seems like the example should be working, but it > is not. I was hoping someone might have some suggestions on what I could be > doing wrong? > > Thanks, > David > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=58754#58754 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

