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

Rowley, Marlin R marlin.r.rowley at lmco.com
Tue Apr 10 11:52:11 PDT 2018


No, I have still need the built-in matrices.  I know those get updated.

-M

----------------------------------------
Marlin Rowley
Software Engineer, Staff
[cid:image002.jpg at 01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
marlin.r.rowley at lmco.com<mailto:marlin.r.rowley at lmco.com>

From: osg-users [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Tuesday, April 10, 2018 11:53 AM
To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
Subject: EXTERNAL: Re: [osg-users] Getting a callback to update shaders?

On 10 April 2018 at 16:55, Rowley, Marlin R <marlin.r.rowley at lmco.com<mailto:marlin.r.rowley at lmco.com>> wrote:
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.

Robert.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180410/54bad941/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3114 bytes
Desc: image001.jpg
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180410/54bad941/attachment.jpg>


More information about the osg-users mailing list