From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 10/09/2000 17:43:12
Hello There !
> I'm developing an database pageing application.
> I've converted my files from flt to pfb, but when I load the pfb files I
> get an extra referencs to the textures that the pfb file uses. I've
> tried with the flt files and then I get the 2 references I was
> expecting (one from the geostate and one from the sharing structure).
>
> I've found the following lines in the source code for the pfbloader
> (pfpfb.c line 13398-):
>
> ...
> /*
> * Add to pfb's internal texture list
> */
> if (tl->tex = make_tex(tl, glb))
> {
> pfRef(tl->tex);
> tl->next = tex_list;
> tex_list = tl;
>
> /*
> * Do a psudo add to the pfdShare's texture list
> */
> list = pfdGetSharedList(glb->share, pfGetTexClassType());
> pfAdd(list, tl->tex);
> pfRef(tl->tex);
> }
> ...
>
> The second pfRef I understand but the first one I don't quite
> understand. What is pfb's internal texture list???
>
> Where does the extra reference come from and how do I get ridd of it in
> a nice way?
The pfb loader tries to share one texture among all references to the same
texture file. It is usually a good idea to use a single pfTexture object for
all scene graph elements that have to be textured by the same texture file
(it saves texture memory and texture download time).
To avoid sharing, use:
pfdConverterMode ("pfb", PFPFB_SHARE_GS_OBJECTS, PF_OFF);
Take a look at ``man pfdConverterMode_pfb'' for more info.
-yair
--
\_________ \_____ \__ \__ \_____ Yair Kurzion
\_________ \_____ \__ \__ \_____ yair++at++sgi.com
\__ \__ \____\__ \__ http://reality.sgi.com/yair
\__ \__ \__ Work: (650) 933-6502
\__ \__ \__ Home: (408) 226-9771
\__ \__ \__
This archive was generated by hypermail 2b29 : Mon Oct 09 2000 - 17:43:18 PDT