Hi all,

I have two ive files, generated by VPN.
Then I wan't to mix the texture of those two files.
For that I use a shader. But I can't give to the shader the two texture.

Here is my code :

osg::ref_ptr <osg::Group> root (new osg::Group());

osg::ref_ptr <osg::Node> Earth = osgDB::readNodeFile("Earth.ive");
osg::ref_ptr <osg::Node> Europe = osgDB::readNodeFile("Europe.ive");

root->addChild(Earth.get());
root->addChild(Europe.get());

osg::StateSet* state=root->getOrCreateStateSet();

osg::StateSet* stateEarth=Earth->getStateSet();
state->addUniform( new osg::Uniform("texEarth", 0));
osg::StateSet* stateEurope=Europe->getStateSet();
state->addUniform( new osg::Uniform("texEurope", 1));


But with this code, I can access in my shader only the first texture.
Do you know how I could give to the shader the texture of each node ?


Thanks.

Christophe
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to