Hi Jason, The wa that the OSG handles positional state like clip planes is pair the a specific modelview matrix with the positional state, the modelview matrix used in provided when the cull traversal encounters a positional state node like ClipNode, TexGenNode or LightSource, and the pairing is done such that there is only one posible modelview matrix per positional state, on per RenderStage basis. This approach ensures that clip planes, eye linear texgen and light sources all have a single place in space for rendering a whole stage, but it does mean you can't reuse a clip plane, eye linear tex gen, or light within on stage.
The only ways to support multiple clip planes or other positional state is to dispense with the positional state nodes completely and have custom state attribute that binds a specific modelview matrix to that state and applies this before applying the state, but straight away after applying the state will need to restore the original modelview matrix. You will also need to geneate the specific modelview matrix somehow, a custom node like ClipNode might be approrpriate. How this all relates to what you have done I can't say, there is no way for me to comment as the code is infront of you not me. Robert. On Mon, Apr 18, 2011 at 11:48 PM, Jason Jerald <[email protected]> wrote: > > > I created two new classes: ClipNodeReused inherited from ClipNode, and > ClipPlaneReused from ClipPlane (basically just overriding > apply(osg::State&)). These classes enable me to reuse the OpenGL clipping > planes so that I can do more than the graphics hardware limit of 6-8 > clipping planes. This has worked well. However, I recently discovered that > some model files do not get clipped correctly. The only thing that I see is > different about these files is that they contain PagedLODs. I am not sure > of the details of LODs to know if some form of clipping (perhaps as part of > some form of culling?) might be happening that is keeping my custom clipping > from occurring. Have others been able to clip PagedLODs successfully? Any > ideas what might be going wrong here? > > > > Thanks! > > > > Jason > > > > _______________________________________________ > 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

