Re: pfDeleteFunc(3pf)

New Message Reply Date view Thread view Subject view Author view

Steve Baker (sbaker++at++link.com)
Fri, 18 Sep 1998 07:49:05 -0500 (CDT)


On Thu, 17 Sep 1998, Max Waterman wrote:

> I am trying to make my application delete the gl texture handles when it deletes
> a node.
>
> To do this, I want a function of my own to be called when a node is pfDelete()d.
> As I understand it, if you call pfDelete() on a pfNode, then all the nodes under
> the pfNode, will also get pfDelete()d (is this right?). I am hoping that my
> delete function will get called on all the nodes to be deleted. My function will
> do a pfGetGLHandle() on the node, and record all the GL handles that are no
> longer used. I will add code to the draw call back to call glDeleteTextures() on
> the list.
>
> But I can't get my pfDeleteFunc() to be called at all. Looking at the code, it
> looks like the function registered with pfDeleteFunc() only gets called if a
> node has user data. Does this mean I have to make dummy user data for all the
> nodes that I want deleted?
  
I have certainly seen that behaviour and also reported it to the pfTeam.

IIRC, their reaction was that the intended function of pfDeleteFunc was
to allow the application to clean up the userdata - so if there is no
userdata then there is no need to call pfDeleteFunc.

I agree with you in that there may be many other reasons for needing a
pfDeleteFunc that don't entail userdata. (There must be or you and I
would never have tripped over this problem!)

The same problem popped up with some of the other per-node user callbacks
like maybe pfCopyFunc.

I *thought* that these problems had been addressed - but my memory is
kinda fuzzy on this.

> Or is there some better way of achieving the same goal?

I don't think so.

Steve Baker (817)619-2657 (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


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Sep 18 1998 - 05:49:57 PDT

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