Robert Osfield wrote:
On 2/8/07, UnSeal <[EMAIL PROTECTED]> wrote:
Hi all.
If I have vertex shader with attribute "attribute vec3 vTangent;"
How can I set this attribute in OSG?

osg::Geometry has various set array methods, including vertex
attributes, but there isn't yet support for naming attributes.  The
naming of attributes is complicated by the relationship between the
current bound program and the vertex attribute being dynamic,
something that display lists break.

The easy option is to simply hardware the attribute to a particular
number value and make sure the osg::Geometry match this.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
Thank you.
But i don't know how to do this:
"The easy option is to simply hardware the attribute to a particular
number value and make sure the osg::Geometry match this."
Any idea how to do that?

My next idea is to pass the attribute like uniform. Not use "attribute vec3 vTangent", but "uniform vec3 vTangent[]". But there is my next problem. How do I know which one vertex is now procesing - what index of array I must use?
Can anybody help me, please?
UnSeal
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to