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

Yuen

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] 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
bryan.thr...@flightsafety.com
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to