Hi Felix,

I'm a bit perplexed by what exactly you are proposing.  StateAttribute
are designed to just pass data to OpenGL, they typically aren't active
objects that on the fly decide what state they are in.  Also
osg::State object just tracks and applies what state is required,
hardwiring to specific state only happens for very special
StateAttribute like osg::Program and this has to be done to properly
mange osg::Uniform.  Also RenderStage is loosely coupled with State
that is applied.  This loose coupling is deliberately designed into
the OSG to allow it to be extensible and easily to extend.  What you
suggests sounds like it breaks quite a few of these design aspects.

I'm also not clear on why you really need to go to such lengths.
There may well be far easier ways to handle what you are doing.

Robert.

On 2 April 2012 00:01, Felix Nawothnig <[email protected]> wrote:
> Hey.
>
> A while ago we added a few new FrontFace modes to deal with
> multi-instanced mirrored geometry showing up in our data:
>
>  - AUTO, which sets the front face to GL_CW when the MVM has negative
> determinant (mirror transformation)., GL_CCW otherwise.
>  - AUTO_FLIPPED, doing the inverse
>  - FLIP, which inverts the previous setting in apply()
>
> (The latter we don't actually use, I just added it for completeness -
> could be useful if the mirroring is done by a uniform instead of the
> MVM)
>
> This obviously required some changes to RenderLeaf, State and FrontFace.
>
> If this feature is considered useful I'll clean up the code and send a patch.
>
> Felix
> _______________________________________________
> 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