From: Alexander Lechner (alexander.lechner++at++vertigo-systems.de)
Date: 08/17/2004 10:59:21
Hi Duvan!
Seems nobody answered your question ;-)
I ran into a similar problem with simple texture coords.
pfVertexAttr* attr = pfGeoArray::addTextureAttrType("tex coord1", 1);
geoa->addAttr(attr, 2, GL_FLOAT, 0, texCoordPtr);
A GL trace shows that performer does not respect the texture stage index
given. It does a simple
glTexCoordPointer instead of
glClientActiveTextureARB(GL_TEXTURE1_ARB).
glTexCoordPointer
At first, I guessed, this was the same problem with generic attributes, but
that is not the case. Generic attributes are not passed at all. Don't know
why.
Unfortunately it is NOT possible to write a callback function to circumvent
this (I initially thought so).
Of course one could enable the correct texture unit and then set the tex coord
pointer. But, after the glDrawElements you have to disable the client state
again, in right tex unit
(e.g.
glClientActiveTextureARB(GL_TEXTURE1_ARB)
glDisableClientState(GL_TEXTURE_COORD_ARRAY)
).
But there seems no point in getting called after the glDrawElements by
Performer.
So, please performer team, fix this in the next release.
Thanks in advance,
Alex
On Friday 23 July 2004 17:19, Duvan Cope wrote:
> Hello,
>
> I am having trouble using pfGeoArray's generic attributes. I have looked
> at all the documentation I can find and yet cannot get it to work. I am
> trying to pass in some additional data per vertex for a vertex program to
> use. I would like to see some functional sample code or anything else
> that may help me. What I have that does not work...
>
> boneAttr = pfGeoArray::addGenericAttrType("bones", 7);
>
> // Allocate and initialize the boneList....
>
> performerGeoarray->addAttr(boneAttr, 4, GL_FLOAT, 0, boneList);
>
> In the shader program all I appear to get is 0 vectors for all of
> vertex.attrib[7]'s entries. Am I specifying the attribute
> location properly (the 7)? Is there some additional calls I need to make
> to pass the data to the shader? Do the generic attributes even work?
>
> Please any help appreciated!
>
> Thanks in advance
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
> SIGGRAPH 2004 Friends of Performer BOF:
> Tuesday, August 10, 6pm - 8pm Wilshire Grand Hotel, Sierra Ballroom
> -----------------------------------------------------------------------
-- Alexander.Lechner ++at++ vertigo-systems.de Engelbertstraße 30 | phone: +49-221-2405472 D-50674 Köln | fax: +49-221-34892616
This archive was generated by hypermail 2b29 : Tue Aug 17 2004 - 11:01:44 PDT