Boy, that code looks surprisingly similar to mine, except for this center part:

               // Make sure that OSG's state is prepared based on the last state
               // recorded (if available).  The first frame is different.
               osg::State *state =
getCamera()->getGraphicsContext()->getState();
               state->reset();
               state->apply(m_lastStateSet.get());

               // Run a frame: this is where the action happens.
               frame();

               // Store the OSG state for restoration in the next frame.
               
getCamera()->getGraphicsContext()->getState()->captureCurrentState(*m_lastStateSet);


Maybe the additional getState() + reset() / apply() and
captureCurrentState() will solve my lights problem. I will try.

Thanks a bunch!
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to