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

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


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.


----------------------------------------
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 Rowley, Marlin R (US)
Sent: Tuesday, April 10, 2018 7:43 AM
To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
Subject: EXTERNAL: [osg-users] Getting a callback to update shaders?

Hi,

I have a camera in the scene that I made. It has geometry attached to it to represent it.  I also have a shader attached to some geometry in a scene where it uses the camera's view/projection matrix.  I've set up a callback (event driven) that when I move the camera with keyboard keys, it redraws the object correctly, but the shader on the geometry doesn't update from the view/projection matrix change.  What am I missing? I've been at this for 9hrs and can't find any example that implements that I'm trying to do.

Thanks,

-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>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180410/e32167d8/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/e32167d8/attachment.jpg>


More information about the osg-users mailing list