Hi Fabian, The osgvolume example has code that modifies uniforms via an event handler, so go have a look at this code. The key you are probably missing is passing of a pointer to the uniform to the event handler so that the event handler can set the value directly.
Robert. On Tue, Oct 7, 2008 at 5:26 AM, Fabian Bützow <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I want to change a scalefactor in a vertex program dynamically. > The scalefactor is changed by the user via an InputHandler. > > float scaleFactor= 1.0; > ShaderInputHandler* input= new ShaderInputHandler(scaleFactor); > //add handler to view .. > geometryStateSet->addUniform(new Uniform("scaleFactor", scaleFactor)); > > I tried to add an update callback, but that didnt work..?! > Could you help me? > Cheers, Fabian. > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org