From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 03/05/2002 13:17:52
Hi Dimi !
Take a look at the sample code:
/usr/share/Performer/src/pguide/libpf/C/deleteGraph.c
/usr/share/Performer/src/pguide/libpf/C/deleteTBox.c
It demonstrates deletion of geometry (loaded or generated). More specific
answers in the text below...
> I have a view questions about the Memory management of performer.
> I would like to incorporate dynamic loading into my App. With this
> I mean, deleting the existing Scene Graph from memory and load in an
> other one.
> How do I do this.
> Is it enough, to remove the top node from all its parents, than call a
> pfDelete?
Yes. You can call pfGetRef on your pointer and verify that it has zero
ref-count before calling pfDelete.
> Through the documentation I unsterstand that because of the reference
> counting
> mechanism it should unreference and delete all underlying objects. Is
> this correct?
>
> By deleting the scene graph, do all the textures in the graphics ram get
> also deleted? If not how do I remove them.
Performer marks the OpenGL ID's of these textures as available. The next
time that your program creates a pfTexture, these ID's are used and the OpenGL
memory is freed.
For tighter control (if you want to remove the textures immediately), you can
call pfDeleteGLHandle on your textures. The sample code I mention above uses
this call.
-yair
--
\_________ \_____ \__ \__ \_____
\_________ \_____ \__ \__ \_____ Yair Kurzion
\__ \__ \____\__ \__ yair++at++sgi.com
\__ \__ \__ (650) 933-6502
\__ \__ \__
\__ \__ \__
This archive was generated by hypermail 2b29 : Tue Mar 05 2002 - 13:18:19 PST