I want to apply state set to rendered geometry from .iv file. For example..
// this will render the geometry;
osg::ref_ptr<osg::Group> root = dynamic_cast <osg::Group*>(osgDB::ReadNodeFile("cow.osg"));
// want to apply stateset for above rendered file from .iv file
`osg::ref_ptr<osg::Stateset> state = dynamic_cast <osg::Stateset*>(osgDB::ReadNodeFile("gold.osg"));`
.IV file contains only material properties (ambient,specular,shininess.......
)
It doesn't have any geometry to render.
gold.osg contains code as follows:-
stateset{
name c:/Documents And Settings/Gthm/Desktop/gold.osg
DataVariance 1
rendering_hint DEFAULT_BIN
renderingBinMode INHERIT
binNumber 0
binName
Material{
ambientColor 0.5 0.6 0.8
diffuseColor 0.5 0.6 0.8
specularColor 0.5 0.6 0.8
emissiveColor 0 0 0
shininess 128
transparency 0
}
}