[osg-users] Getting a callback to update shaders?

Robert Osfield robert.osfield at gmail.com
Tue Apr 10 09:52:40 PDT 2018

On 10 April 2018 at 16:55, Rowley, Marlin R <marlin.r.rowley at lmco.com>

> Nevermind.  I figured out that I need to update the shader state variables
> on every refresh. I thought that an initial binding was all that was
> needed, but they have to be “Set” every frame.

It all depends what data you are needing to pass to the shader via
uniforms.  The OSG provides standard replacements for the likes of
gl_ModelViewMatrix automatically as osg_ModelViewMatrix etc. if you enable
it via osg::State.  See the osgsimplegl3 example.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180410/b087609a/attachment.html>

More information about the osg-users mailing list