Quantcast

LocalGeometryNode

classic Classic list List threaded Threaded
3 messages Options
qing qing
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LocalGeometryNode

        auto paths = osgDB::Registry::instance()->getDataFilePathList();
        paths.push_back("C:/OSGeo4W/data/models");
        osgDB::Registry::instance()->setDataFilePathList(paths);
        osg::Node *plane = osgDB::readNodeFile("J_10_C.3ds");
        LocalGeometryNode *model = new LocalGeometryNode(global->getMapNode(), plane);
        model->setPosition(GeoPoint(global->getMap3D()->getSRS(), 0, 0, 0));
        model->setScale(osg::Vec3f(10, 10, 10));
        model->setLocalRotation(osg::Quat(osg::inDegrees(135.0), osg::Vec3d(0, 0, 1)));
        global->getRoot()->addChild(model);

load model success, but no texture, in osgviewer is ok. there is any reason?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LocalGeometryNode

You probably need to run the shader generator.

  https://goo.gl/cO8inF

Or, you can invoke the shadergen pseudoloader like so:

  osg::Node *plane = osgDB::readNodeFile("J_10_C.3ds.osgearth_shadergen");

Hope this helps.
Glenn Waldron / Pelican Mapping / @glennwaldron
qing qing
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LocalGeometryNode

thank you for replay
osg::Node *plane = osgDB::readNodeFile("J_10_C.3ds.osgearth_shadergen");
this way work for cow.osgt, not work for mine model
i cant not open that url
Loading...