A problem you'll have is that the osgcal model has it's own shaders applied down at the geometry level. These will override the one's you are applying further up the graph.
Brian [EMAIL PROTECTED] wrote: ----- To: osg-users@lists.openscenegraph.org From: "yang zhiyuan" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] Date: 11/12/2008 08:49AM Subject: [osg-users] how to add shader to osgcal node 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 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org