Hi John,

If you need this to setup uniforms for shadow fragment shaders then maybe 
standard GL gl_FrontFacing variable could do the trick ? Its available at least 
in GLSL 1.50 and above. I have not checked when it was introduced maybe its 
available in earlier GLSL profiles.

Wojtek




From: PCJohn 
Sent: Thursday, August 05, 2010 12:41 AM
To: OpenSceneGraph Users 
Subject: Re: [osg-users] threading and captureCurrentState




    Yes. There is. Oh. I see. Sorry for confusion, you call it attribute 
stack.... and that is a correct name for it.
    Anyway, there is State::_attributeMap that is composed of AttributeStack 
structs and they have a member attributeVec that is serving as a stack of 
attributes. The top of the stack is "current" attribute or the last pushed 
attribute. That is the one I need to get. Until now, I see a threading issue 
like two threads manipulating the "attribute stack".


  I'll say it again: you can't access those attribute stacks from the cull 
traversal. They don't contain anything sensible.
I that case a different question: How to get "current" osg::FrontFace 
attribute? I mean the one that would be active for any drawable traversed at 
the present moment during cull traversal that is just in progress and I am 
handling it in my custom Shadow class that is already working perfectly except 
some attribute values that user may pass from the scene graph above and that 
need to be properly handled to cast shadows correctly. The answer: "you do not 
need it" would be wrong at the moment.

Thx,
John



--------------------------------------------------------------------------------


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to