Re:pfb-loader

New Message Reply Date view Thread view Subject view Author view

From: Per Fahlberg (Per.Fahlberg++at++saab.se)
Date: 10/10/2000 00:03:36


Thanks Yair!

I've solved the problem and for future references I solved it by reading
the source code in pfpfb.c where there are a function pfdCleanShare_pfb
which cleans the pfb's internal texture list and then calls
pfdCleanShare.
I haven't been able to find any documentation about this matter in any
man pages, except for the information about pfdConvererMode.

So, if you don't want to use sharing with pfb files use:

pfdConverterMode ("pfb", PFPFB_SHARE_GS_OBJECTS, PF_OFF);

and if you want to use sharing with pfb files be sure to call
pfdCleanShare_pfb instead of pfdCleanShare.

/Per

Yair Kurzion wrote:
>
> 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
> \__ \__ \__
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/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 2b29 : Tue Oct 10 2000 - 00:03:54 PDT

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