Hello Charly,

charly 7 wrote:
> Hi all,
> I've created a small OpenSG application to apply a shader to my OpenSG 
> particles system. But I've a problem. I don't know how I can pass an 
> attribute variable to shader.
> I use a setUniformParameter() to pass uniform variables but I can't 
> found some function that allows me to pass also Attribute Parameters. 
> Can somebody help me?

AFAIK in OpenSG 1.8.0 there is no direct support for this available, as 
it requires changes to how geometry attributes (i.e. properties in 
OpenSG terminology) are handled. I believe the common workaround is to 
use otherwise unused texture coordinate properties to carry this 
information.
I think the test program 
Source/System/NodeCores/Drawable/Particles/testParticlesRenderShader.cpp 
uses this trick.

        Hope it helps,
                Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to