Hi: I am trying to add shader to osgcal node. I do it like this: osgCal::CoreModel *core = new osgCal::CoreModel("dummy"); load(core); //< loading some data into it // Creating a concrete model using the core template osgCal::Model *model = new osgCal::Model(); model->create(core); osgCal::Model *model_2 = new osgCal::Model(); model_2->create(core); //osgCal::Model *model = new osgCal::Model(core); // Setting the first animation in loop mode, weight 1, and starting just now model->startLoop(0, 1.0f, 0.0f); model_2->startLoop(1, 1.0f, 0.0f); model_2->setTimeScale(1.5f); osg::ref_ptr<osg::Group> escena = new osg::Group(); escena->addChild(model); escena->addChild(model_2); osg::StateSet* stateSet = escena->getOrCreateStateSet(); osg::Program* program= new osg::Program; osg::Shader* shader = new osg::Shader(osg::Shader::VETEXT); .......
the problem is the shander does not apply to the osg node,is there any other way to add shader to osgcal node?
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org