From: Alexander Lechner (alexander.lechner++at++vertigo-systems.de)
Date: 08/19/2004 04:04:14
Hi everybody!
Sorry, I have to admit I was wrong (or better the GLtracer I used).
The GLtracer didn't know about some GL calls (glVertexAttribPointerARB etc.)
and so didn't report them.
I now confirmed that Performer does indeed set generic attributes, for example
I bound the binormals to generic attribute #3 (which is Color in the fixed
function pipeline) and they correcly showed up.
So, I guess this is the same for the tex coords, though I haven't check these.
In any case, when using generic attributes, make sure you don't bind them to
fixed-function attributes you require. But concerning the 'bones' at attrib
#7 I think they don't override anything from the ffp.
Maybe check MAX_VERTEX_ATTRIBS_ARB for your GPU/OpenGL implementation.
Alex
On Tuesday 17 August 2004 19:59, Alexander Lechner wrote:
> 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 : Thu Aug 19 2004 - 04:05:52 PDT