[osg-users] Problems with loading model in OSG 2.2

Robert Osfield robert.osfield at gmail.com
Wed Jul 2 06:10:50 PDT 2008


Hi Ricky,

I am not a windows developer, I can't help you with windows specific problems.

Robert

On Wed, Jul 2, 2008 at 1:29 PM, Ricky <Tuanros at gmail.com> wrote:
> I still can't solve this problem:
> Error: [screen #0] ChooseMatchingPixelFormat() - Unable to choose the
> requested pixel format
> I just loaded a simple model but the program run really slowly (in
> debug mode), it's better in release mode.
> I used osg1.2 and it run so fast, even in debug mode.
> Please support me with this problem, is it because of that error?
>
> My code is simply like this:
>        #include <osg/PositionAttitudeTransform>
> #include <osg/Group>
> #include <osg/Node>
> #include <osgDB/ReadFile>
> #include <osgViewer/Viewer>
>
> int main()
> {
>        osg::ref_ptr<osg::Node> m_node = new osg::Node();
>        osg::ref_ptr<osg::Group> root = new osg::Group();
>        osgViewer::Viewer viewer;
>        osg::Vec3 m_nodePosit;
>        osg::ref_ptr<osg::PositionAttitudeTransform> nodeXform = new
> osg::PositionAttitudeTransform();
>
>        m_node = osgDB::readNodeFile("baitap.flt");
>
>        root->addChild(nodeXform.get());
>
>        m_nodePosit.set(5,0,0);
>        nodeXform->setPosition( m_nodePosit );
>        nodeXform->addChild(m_node.get());
>
>        viewer.setSceneData( root.get() );
>
>        viewer.setUpViewInWindow(32,32,512,512);
>        return viewer.run();
>
> }
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list