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

2018-04-10 Thread Robert Osfield
On 10 April 2018 at 20:52, Rowley, Marlin R 
wrote:

> No, I have still need the built-in matrices.  I know those get updated.
>
>
You can;t wave your arms around without telling anybody what specifically
have a problem with and I expect us to know what the problems you are and
how to answer them.

We can only guess at what you mean and point you in roughly the right
direction of what we think might be appropriate.

So please be specific about what you are looking for - tell us what data
you want to input into your shaders.

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


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

2018-04-10 Thread Rowley, Marlin R
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