I Also needed to check that stateset->getAttributePair(ssType) != NULL
before accessing stateset->getAttributePair(ssType)->second

Yuen

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Thrall,
Bryan
Sent: Monday, August 24, 2009 4:44 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] checking StateAttribute::OVERRIDE

Helbig, Yuen wrote on Monday, August 24, 2009 5:37 PM:

> Does anyone know how to check if the StateAttribute::OVERRIDE flag is
set on
> a StateSet? 
> 
> Yuen Helbig

Perhaps something like the following:

osg::StateAttribute::Type ssType = osg::StateAttribute::TEXTURE; // or
the type of whatever StateAttribute you want if (0 !=
stateset->getAttributePair(ssType)->second &
StateAttribute::OVERRIDE)
{
   osg::notify(DEBUG_FP) << "StateAttribute type " << ssType << " has
OVERRIDE set" << std::endl; }

--
Bryan Thrall
FlightSafety International
[email protected]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to