[osg-users] Getting LigtModel from viewer
Robert Osfield
robert.osfield at gmail.com
Mon Apr 8 03:27:36 PDT 2019
Hi Claudio,
On Mon, 8 Apr 2019 at 10:57, Claudio Benghi <claudio.benghi at gmail.com> wrote:
> Your solution works very well, the code I'm using to get the LightModel is
>
>
> Code:
>
> osg::LightModel *lightModel = dynamic_cast<osg::LightModel*> (viewer->getCamera()->getStateSet()->getAttribute(osg::StateAttribute::LIGHTMODEL));
>
>
>
>
> I've already tested that changing its state does affect the render as expected.
>
> It's a good sign that even after years of evolution you have access to nested instances so easily. Keep up the great work.
Good to hear it's working :-)
Cheers,
Robert.
More information about the osg-users
mailing list