Hi,

I have an osg::Uniform::Callback which is working fine with osg::Programm, but 
I don't get it working with osg::ShaderAttribute.
The Uniform Value used in Constructor is correctly passed to my Shader, but the 
Values don't get update, as if the UpdateVisitor would not reach the Uniform.

osgPPU::ShaderAttribute * shaderAttribute = new osgPPU::ShaderAttribute() ;
osg::Uniform * uniform = new osg::Uniform( "Color" , osg::Vec4f( 1.0f , 0.0f , 
0.0f , 1.0f ) ) ;
uniform -> setUpdateCallback( new UniformCallback ) ;
shaderAttribute -> add( uniform ) ;

UniformCallback is derived from osg::Uniform::Callback

While this code is working ( at another place )
osg::Uniform * uniform = new osg::Uniform( "Vector" , osg::Vec4f( 0.0f , 0.0f , 
0.0f , 0.0f ) ) ;
uniform -> setUpdateCallback( new UniformCallback ) ;
stateSet -> addUniform( uniform ) ;

What do I miss ?


Thank you!

Cheers,
ParticlePeter

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34008#34008





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to