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@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 Rowley, Marlin R (US) Sent: Tuesday, April 10, 2018 7:43 AM To: OpenSceneGraph Users <osg-users@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@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>
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org