Robert,

I'm working on the osgEarth ShaderGenerator and I have a question for you :)

One of the things I need to do is collect the current osg::State at a given
point in the scene graph. So, my visitor pushes statesets into a State as
usual, and then I'm able to examine that state as necessary. So far so good.

The trouble comes with Texture2DArray attributes. Normally, I can check to
see if an attribute is "active" by checking its associated mode; e.g. if
getMode(GL_TEXTURE_2D) is ON, I know the osg::Texture2D on the same unit is
active.

But for a Texture Array, there are no associated modes (since it's a
shader-only attribute). And the StateSet's attribute map doesn't keep track
of the ON or OFF OverrideValues; it only keeps track of OVERRIDE and
PROTECTED.

How would you suggest I determine whether a Texture2DArray is ON or OFF in
a given osg::State?


Glenn Waldron / @glennwaldron / osgEarth
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to