From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 07/29/2002 18:42:03
Hi Alex,
Try calling gsetCB->setCBIndex() right after gsetCB->setDrawCB().
I think you found a bug (Thanks). The call to pfGeoSet::copy overrides some
internal pfGeoSet flags, and it fails to behave like a pfGeoSetCB.
The call to setCBIndex resets these flags.
Please let me know whether the fix works for you. If it does, I'll incorporate
it in the next pf release.
Thanks,
-yair
> I would like to use my own draw callback function for pfGeode geometry of a subpart
> of my scene graph (to use NVidia Cg compiler).
>
> For that I traverse the scene graph and I try to replace all pfGeoSet by pfGeoSetCB
> like that:
>
> pfGeoSet *oldgset = geode->getGSet(i);
> pfGeoSetCB *gsetCB = new pfGeoSetCB();
> gsetCB->copy(oldgset);
> gsetCB->setDrawCB( drawCB, NULL);
> geode->replaceGSet( oldgset, gsetCB);
>
> but it doesn't work, my DrawCB is not used, ?
> If I comment the line with the copy it works, my callback is used.
> There is something that I don't understand in the copy function but what?
>
> I could write a new copy function that copy a pfGeoSet to a pfGeoSetCB but
> I would like to understand what is the problem with the standard copy
> function here, if someone knows ...
>
> Thanks,
> Alex
>
>
> -----------------------------------------------------------------------
> SIGGRAPH 2002 Friends of Performer Meeting July 24 6:00pm-8:00pm
> Salon I, Marriott Rivercenter Hotel, San Antonio, TX USA
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------
>
--
\_________ \_____ \__ \__ \_____
\_________ \_____ \__ \__ \_____ Yair Kurzion
\__ \__ \____\__ \__ yair++at++sgi.com
\__ \__ \__ (650) 933-6502
\__ \__ \__
\__ \__ \__
This archive was generated by hypermail 2b29 : Mon Jul 29 2002 - 18:42:10 PDT