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

-M

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

From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Robert Osfield
Sent: Tuesday, April 10, 2018 11:53 AM
To: OpenSceneGraph Users <osg-users@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.row...@lmco.com<mailto:marlin.r.row...@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.


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to