Hello Anne,

Anne Braun wrote:
> I'm trying to pass a vec3f array to my shader programm using the function:
> shader->setUniformParameter(const char* name, const osg:MFVec3f &value)
> 
> On shader side I have the parameter: uniform vec3 vectors[NUMPOINTS]
> Using a single vector
> shader->setUniformParameter("vectors", osg::Vec3f(0.8f, -0.2f, 0.2f)); 
> it works fine. But using a MFVec3f it doesn't work.

uhm, your description suggests you are doing the right thing, passing a 
MField to setUniformParameter is the way to pass arrays.
What exactly is not working? Do you get a compiler error, an error from 
the driver when it compiles the shader, do you get incorrect values in 
the uniform? Also, what version of OpenSG is this with and on which 
platform?

        Cheers,
                Carsten



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to