Hi,
I want to add a model as a fixed image on scene and stay on scene while I
translate the scene. I use the following code but the model does not seen.
ref_ptr<Node> myNode(readNodeFile("model.3ds"));
ref_ptr<StateSet> stateSet = myNode->getOrCreateStateSet();
stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
stateSet->setRenderBinDetails(11, "RenderBin");
ref_ptr<MatrixTransform> modelviewAbs (new MatrixTransform);
modelviewAbs->setMatrix(Matrix::translate(0, 100, 100));
modelviewAbs->addChild(UAVNode.get());
ref_ptr<Projection> projection (new Projection());
projection->setMatrix(Matrix::ortho2D(0, 1280, 0, 1024));
projection->addChild(modelviewAbs.get());
root->addChild(projection.get());
Thank you!
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=24001#24001
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org