On Tue, 2012-09-04 at 19:21 +0100, Robert Osfield wrote:
> Hi Jeremy,
>
> It should be possible to do a
>
> drawImplementation(..)
> {
>
> state.apply(stateSetOne);
> // do stuff
> state.apply(stateSetTwo);
> // do more stuff
>
> }
I've settled on:
drawImplementation() {
state.pushStateSet(ss1);
state.apply();
// do stuff
state.popStateSet();
state.apply()
state.pushStateSet(ss1);
state.apply();
// do more stuff
state.popStateSet();
state.apply()
}
Does this seem like an abomination? :) Just calling state.apply() ALMOST
worked, but there was some state leakage (for example, the shader was
applied to all subsequent fragment processing, regardless of it's
location in the graph).
> I'm not 100% sure what will happen with the progress of draw traversal
> w.r.t how the drawable StateSet if any is applied and then later
> assumed to be applied by other state calls. I think it will probably
> work out OK though so try it, and if something breaks then considering
> adding an extra state.apply(drawwablesStateSet) or a perhaps a state
> dirty.
>
> This is something we can workout if required though, try the simplest
> thing first then if need be investigate more complicated routes...
>
> Robert.
> _______________________________________________
> 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