Re: [info-performer] pfGeoArray::addAttrType incorrect documentio n - Doc. Needed

Date view Thread view Subject view Author view

From: Devrim Erdem (devrim.erdem++at++gmail.com)
Date: 01/31/2005 10:08:44


On Mon, 31 Jan 2005 13:31:42 -0000, Andrew Preece <apreece++at++sgi.com> wrote:
> Hi Devrim,
>
> Try the following:
>
> pfGeoArray *garr = new pfGeoArray() ;
>
> float *gvtx = (float *)pfMalloc( sizeof( float ) * 3 * MAX_COORDS,
> pfGetSharedArean() ) ;
>
> garr -> setAttr( PFGA_GENERIC_ARRAY, 3, GL_FLOAT, 0, gvtx ) ;

Thanks Andy, I have tried this with the pguide/libpr/C++/genArray.C
without luck. I modified the example to add a generic array of float4.
The app crashes in pfFrame after this modification. Please find the
slightly modified geoArray.C attached.

Thanks in advance,

>
> Regards,
> Andy.
>
> -----Original Message-----
> From: owner-info-performer++at++performer.engr.sgi.com
> [mailto:owner-info-performer++at++performer.engr.sgi.com] On Behalf Of Devrim
> Erdem
> Sent: 31 January 2005 12:48
> To: info-performer++at++sgi.com
> Subject: [info-performer] pfGeoArray::addAttrType incorrect documention -
> Doc. Needed
>
> Hello,
>
> I am trying to get pfGeoArrays working with generic per vertex
> attributes. The man pages say :
>
> static pfVertexAttr* pfGeoArray::addAttrType(char * name, pfFunc
> func, GLenum ecs, unsigned short mask);
>
> The header pfGeoArray.h says :
>
> pfVertexAttr* addAttrType(int type,char* name,int stage);
>
> The method is not static anymore and the parameter sets looks quite
> different. I need to use the set generic per pixel float data. It is
> not clear what type and stage is supposed to be. I assume name is the
> name to be used for calling queryAttr().
>
> Would it be possible to shed some light on this method, since the man
> pages seem to be completely out of sync ?
>
> Thanks in advance,
>
> P.S. : I also don't see the need for queryAttrType if the addAttrType
> is per pfGeoArray rather than being global. Any thoughts on this ? I
> assume it would be used like :
>
> geoArray->addAttr( geoArray->addAttrType( ... ), .... );
>
> if the pfVertexAttr is per geo array. I must be misunderstanding this I
> guess.
>
> Devrim Erdem
>
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------
>




Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jan 31 2005 - 10:28:32 PST