Re: [osg-submissions] Segfault in osg::LightModel

2016-09-22 Thread Robert Osfield
On 22 September 2016 at 14:59, Christoph Weiss wrote: > As for the reasons, I'm uncertain. Our application only works in > SingleThreaded mode, otherwise it produces "Error: OpenGL version test > failed, requires valid graphics context." > > I'll let you know when I find what causes this. Sounds

Re: [osg-submissions] Segfault in osg::LightModel

2016-09-22 Thread Christoph Weiss
Hi Robert, Thank you for the quick reply and fix! As for the reasons, I'm uncertain. Our application only works in SingleThreaded mode, otherwise it produces "Error: OpenGL version test failed, requires valid graphics context." I'll let you know when I find what causes this. Christoph Mit

Re: [osg-submissions] Segfault in osg::LightModel

2016-09-22 Thread Robert Osfield
Hi Christoph, I reviewed your changes but fee there is a safe way to do this. The use of local static variable isn't safe so I've replaced the static code with state.get usage that is thread-safe and multi-context friendly. Changes are outlined below. These are now checked into the git master a