I used OSG 1.2 before and didn't meet problems like this. I've just
tried OSG 2.2 with VS 2005 SP1, a simple code: loading a model.
The code like this:
        osg::ref_ptr<osg::Node> m_Node = new osg::Node();
        osg::ref_ptr<osg::Group> root = NULL;
        osgViewer::Viewer viewer;
        osg::Vec3 nodePosit;
        osg::ref_ptr<osg::PositionAttitudeTransform> nodeXform = NULL;

        m_Node = osgDB::readNodeFile("box.flt");
        root = new osg::Group();
        nodeXform = new osg::PositionAttitudeTransform();

        root->addChild(nodeXform.get());
        nodeXform->addChild(m_Node.get());

        nodePosit.set(5,0,0);
        nodeXform->setPosition( nodePosit );
        viewer.setCameraManipulator(new osgGA::TrackballManipulator());

        viewer.setSceneData( root.get() );
        viewer.realize();
        viewer.run();

I duplicated files in lib Folder and add 'd' before the extension.
When I built it in Debug mode, it had no error but then I received a
message:
http://i58.photobucket.com/albums/g278/TTFTotti/error1.png

Additional to it, when I built in Release mode, it run, the model
loaded, I still could rotate and zoom the object, but I couldn't view
wireframe, switch full-screen, windowed mode like I did with the old
version. And I received a message in console window:
Error: [screen #0] ChooseMatchingPixelFormat() - Unable to choose the
requested pixel format
http://i58.photobucket.com/albums/g278/TTFTotti/error.png

Please show me the way to solve it.
Thank you for reading!
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to