Re: [osg-users] How to pre-compile shaders before actual usage?

2017-09-29 Thread Robert Osfield
HI Michael, You can't compile GL objects unless you do if from a thread with the appropriate graphics context current, this means you can't just force a compile from any thread. The way the OSG manages this is to mark GL related objects (textures, shader programs, VBO's etc) as needing to be

[osg-users] How to pre-compile shaders before actual usage?

2017-09-28 Thread michael kapelko
Hi. I want to pre-compile shader programs before they are actually used by real nodes. I tried to create empty node (new osg::Node) and assign an osg::StateSet with an osg::Program, but such action did not trigger shader compilation. In the logs I see shader compilation happening only when I