View Full Version : glsl generic vertex attributes

03-23-2004, 05:11 PM

I have a bit of a problem with generic vertex attributes.
first of all, i do know that the shader works since it performs well when i use the standard GL array commands -- glVertexPointer, etc... --- but once i substitute generics instead of those, the code just crashes ... i tracked down the problem to one thing ... BINDING ... the generic vertex attribues have a binding issue, except for vertexAttrib0 which is hardwired to gl_vertex.
I do get the proper binding locations using GetAttribLocation, I have also tried using the bind function instead ... in both cases i was met with code crashes. So, is this an ATI driver bug ? do generic vertex attributes work using current ATI drivers ? anyone having same problem ?
Thanks in advance. :)

03-23-2004, 09:40 PM
Same problem here (among many others) on GeFX, using Forceware 56.64. The attribute binding doesn't work and I even had problems with the returned attrib locations. For example, I'm getting 0 for a tangent attribute, when obviously that's the vertex position. Later I found out I had to +1 the location I was getting.

03-24-2004, 01:22 AM

Had the same problem (with both, ATI and nVidia). This is surely a bug!
ATI said that this problem will be solved in one of the next releases. But I don't know anything about NV...

03-24-2004, 05:46 AM
Bugs aside, make sure you link (again) after changing generic attribute bindings.

03-24-2004, 06:18 AM
I did perform a re-link operation after doing an explicit bind. but still that doesn't work.
the only way I can think of to get around this, is to use the MultiTexture attributes arrays to pass the extra needed attributes. I haven't tried this yet, but i guess that it should work since no explicit binding is being performed and no generics are used. but this will not produce elegant code though.
I would like to thank eveyone for their responses. :)

03-24-2004, 07:57 AM
Yes, using gl_MultiTexCoordX worked at my application without any problems.