Re: [info-performer] Set and get attributes

Date view Thread view Subject view Author view

From: Stace Peterson (stacep++at++sgi.com)
Date: 07/06/2005 17:20:23


Jimi,

I think what you would like to do is use the pfVertexAttr interface to
query the attribute data. When you call pfGeoArray::setMultiAttr, it
will return a pfVertexAttr*, which can be used to query the related
data. If you don't grab the return of the setMultiAttr function, then
the list of pfVertexAttr's can be searched through getNumAttrs() and
getNthAttr().

Hope this helps.
Stace

Jimi Hong wrote:
>
> I made tangent list per vertex then insert into 3rd TextureCoordinate place like follows code.
>
> ----------------------------------------------------------------------------
> pfVec3 *TANGENT = (pfVec3 *) pfMalloc(pfGetSize(vertexlist), pfGetSharedArena());
>
> ... ...(make tangent list ...)
>
> geoArray->setMultiAttr(PFGA_TEX_ARRAY, 3, 3, GL_FLOAT, 0, TANGENT);
> ----------------------------------------------------------------------------
>
> When I ran my GLSL vertex program, the gl_MultiTexCoord3 didn't work well.
> So, I'd like to test whether the tangent attribute work well.
> I add code :
> geoArray->getMultiAttrLists(PFGS_TEXCOORD3, 3, (void**) &TLIST, &blist);
>
> I thought TLIST's size is same with the size of TANGENT array.
> But TLIST's size is zero.
> I think that's why gl_MultiTexCoord3 is not working.
>
> How to get the tangent list to confirm the attribute.
> Where should I change the code? Or What I have to add in the code?
>
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------

-- 
------------------------------------------------------------------
Stace Peterson                                      stacep++at++sgi.com
Silicon Graphics, Inc.                              (650) 933-2323


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jul 06 2005 - 17:20:26 PDT