On Nov 24, 2007 10:32 AM, Davide Vitali <[EMAIL PROTECTED]> wrote:
> Hi all, I have a osg::StateSet* and I want to get the osg::Texture.
> How I can do?

The OSG support multi-texturing so a single StateSet can contain
mulitiple Textures.  For examples of how to retrieve items like
Textures from StateSet have a search through the
src/osgUtil/Optimizer.cpp source code, in pairticular look for
instances of getTextureAttribute, these will be in form:

    osg::Texture* texture =
dynamic_cast<osg::Texture*>(stateset->getTextureAttribute(0,osg::StateSet::TEXTURE));
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to