Hi,
I am trying to access the material stored in a stateset. Is this possible?
My approach is below- the first line returns a null pointer.
Code:
osg::StateAttribute* sa =
myGeode.getOrCreateStateSet()-getAttribute(osg::StateAttribute::MATERIAL);
osg::Material* mat =
Hi Ethan,
You code segment looks OK, and if the the getAttribute is returning a
NULL then the most likley reason is that there in no osg::Material
attached to that particular StateSet. It's perfectly normals for
StateSet to not contain an osg::Material, so returning NULL is nothing
out of the
2 matches
Mail list logo