Hi Jason, Clip planes are an example of positional state, other examples are lights and eye linear texgen. All positional state requires a specific modelview matrix to be bound to them to position them correctly in space, so unlike other OpenGL/OSG state you can't just push/pop and state sort their state and expect to get the correct results.
This difference is handled by the OSG by binding the positional state together with a modelview matrix found when encountering the ClipNode/TexGenNode/LightSource nodes, and these positional state are then applied once at the start of each RenderStage. Applying the state just once for whole RenderStage does enable us to position the state uniquely but unfortauntely also means that the positional state can only be in one place for the whole stage - you can't nest it. You can emulate having multiple sets of Clip planes/texgen/lights by having multiple stages, or do what is currently done in FlightGear, to use a custom StateAttribute that does the binding to the required modelview matrix in the CustomAttribute::apply() method taking care to push back the current modelview matrix to prevent the rest of the scene being affected. Robert. On Thu, May 13, 2010 at 2:14 AM, Jason Jerald <ja...@digitalartforms.com> wrote: > > > Evidently most graphics hardware only supports 6-8 clipping planes and our > application requires more than that so I need to somehow reuse clipping > planes. I searched the archives and saw there was some discussion of this > back in 2007 (something about possibly using the render bin instead of the > render stage but it is not clear how to do so). Has reuse of clipping > planes since been implemented? If so how do I do so (I have not been able > to figure out how to do so by looking through clipnode)? Or if not, does > anyone have any ideas/example of how to implement reuse of clipping planes? > > > > Thanks so much! > > > > Jason > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org