Okay, in this case, is someone aware of a solution to access those
attributes in GLSL anyway through their index ? I guess I'm not the first
one trying to use attributes no lol ?


I think there is one solution at least (and that's the one I'm going to use
if I find nothing better...) : I could use to built in attribute variables (
gl_Color, gl_SecondaryColor, gl_MultiTexCoord0 to 7)... which can be
assigned with OSG functions (setColorArray, etc...). But I really think this
is not a good final solution...


regards,

Emmanuel.


2007/4/11, Robert Osfield <[EMAIL PROTECTED]>:

Hi Emmanuel,

The OSG doesn't presently support naming of vertex attributes, only
use of indexes.

Naming of vertex attributes is a bit of awkward issue as the way the
naming is set up in OpenGL prevents one from display listing geometry,
and display listing of geometry is what the OSG does by default for
performance reasons.  This area is a bit of an oddity in OpenGL.

Robert.

On 4/11/07, Emmanuel Roche <[EMAIL PROTECTED]> wrote:
> Hello !!
>
> I'm trying to generate the tangent,binormal,normal base for a GLSL
parallax
> shader. I would need to provide the "tangent" and "binormal" vectors as
> "attribute" (in GLSL grammar)... I checked OSG source : apparently I
need to
> use the TangentSpaceGenerator class to build the arrays, but then, in
> osg::Geometry I can only use setVertexAttribArray(unsigned int
index,Array*
> array) I guess, so the array would be associated to an index number and
not
> a "name", could someone explain me how to do the following step (link
this
> index number to the wanted name I guess...) ?
>
> thanks in advance :-)
>
> regards,
> Emmanuel.
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to