Hi Brian, I'm afriad I can't support custom stuff that Delta3D is doing. If Delta3D manages OpenGL state they way the OSG is designed to handle state then the trick that I and Don suggested, and what you have tried, should work, the fact it doesn't suggest a problem outwith the OSG.
Robert. On 1 Nov 2006 17:40:36 -0000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Robert, I appreciate your helping me with this problem. Perhaps a different view will help here. In the Producer::Camera I have camera->scene->light_drawable->geometry_drawables In my RTT camera node I have cameraNode->scene->light_drawable->geometry_drawables Attached to the cameraNode is a FBO. If I disable the lighting in the cameraNode, and the light_drawable re- enables it, could that be my problem? I'm using a 3rd party tool that is based on OSG (Delta3D) so I have no option but to use the light drawable. My thought was to intercept the rendering by using preframe callbacks: one for the Producer camera and one for the cameraNode. In these callbacks, I could modify the state of the light_drawable. My initial thought was to remove the drawable in the cameraNode preframe callback and add it back in the Producer::Camera preframe callback, but I fear that by doing that, my scene would change to: camera->scene->geometry_drawables->light_drawable and I don't know what effect that would have on the rendering of my scene. Of course, I can't figure out how to get a preframe callback for the cameraNode, so I cannot test this theory. I tried using a node visitor and removing the light drawable in it, but that caused bad things to happen (i.e. program crashed.) I think that removing the drawable in the node visitor's update callback caused the node traversal to break. Thanks again. Brian > Hi Brian, > > From the osgtext example you'll find : > > camera->getOrCreateStateSet()->setMode (GL_LIGHTING,osg::StateAttribute::OFF); > > I have just doubled checked that its functioning by commenting this > line out and indeed the lighting goes on and problems occur with > rendering. > > Robert. > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
