pfGSetAttr behavior changed?

New Message Reply Date view Thread view Subject view Author view

Steve Baker (sbaker++at++link.com)
Tue, 12 May 1998 16:18:24 -0500 (CDT)


I have had some bad problems with a pfGeoSet attribute array.

Pre-Perf 2.2MR, this code seemed to work OK:

  pfGSetAttr ( gs, PFGS_COORD3, PFGS_PER_VERTEX, alist, ilist ) ;

  <lots more code>

  pfGSetAttr ( gs, PFGS_COORD3, PFGS_PER_VERTEX, different_alist, ilist ) ;

...the actual intent was to change the vertex attribute list
from a simple pfMalloc'ed array to a pfCycleBuffer'ed array containing
the exact same data.

Well, with Perf2.2 MR, my code is behaving very strangely - as though
the GeoSet hadn't noticed that different_alist is a pfCycleBuffer
and was treating it as a simple pfMalloc'ed array.

I RTFM'ed pfCycleBuffer (and was horrified to find it is now
'OBSOLETE') - rewrote the code using a pfFlux (as recommended on
the pfFlux man page) and discovered that this didn't seem to help -
although it did change the symptoms a tiny bit.

After a *lot* of messing around, printing addresses and prodding
the system in various ways, I discovered that this seemed to work:

  pfGSetAttr ( gs, PFGS_COORD3, PFGS_PER_VERTEX, alist, ilist ) ;

  <lots more code>

  pfGSetAttr ( gs, PFGS_COORD3, PFGS_PER_VERTEX, NULL, NULL ) ;
  pfGSetAttr ( gs, PFGS_COORD3, PFGS_PER_VERTEX, different_alist, ilist ) ;

It looks like presenting the GeoSet with NULL parameters is enough to
reset it's internal ideas about what kind of alist data it has.

Is this a pfBug or expected behavior?

If it's a bug then is this workaround appropriate?

Steve Baker (817)619-8776 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-4028 (Fax)
Work: SBaker++at++link.com http://www.hti.com
Home: SJBaker1++at++airmail.net http://web2.airmail.net/sjbaker1

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:23 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.