Marcus Barnes (marcus++at++multigen.com)
Tue, 21 Jan 1997 11:15:59 -0800
> > Impact (even with 4M TRAM) default value is 4 bits/component (RGBA). If we
> > want to run the same application on both machines with the same quality, is
> > it possible under Performer to override the default parameters in order not
> > to have to modify the attribute of the textures under MultiGen?
>
> You'd have to traverse the scene graph and change the pftextures.
... or you can fetch the loader's shared palette and walk its list of
pfTextures. Do this after loading, but before downloading the textures or
calling pfFrame():
#include <Performer/pfdb/pfflt.h>
static void
TexFormat ( void )
{
fltSharedPalette* palette = fltGetCurSharedPalette();
pfList* texList = palette->texList;
int howMany = pfGetNum ( texList );
int which;
for ( which = 0; which < howMany; ++ which )
{
fltSharedObj* obj = pfGet ( texList, which );
pfTexture* tex = ( pfTexture* ) obj->object;
int comp;
unsigned* image;
int ns;
int nt;
int nr;
pfGetTexImage( tex, & image, & comp, & ns, & nt, & nr );
switch ( comp )
{
case 4:
pfTexFormat( tex, PFTEX_INTERNAL_FORMAT, PFTEX_RGBA_8 );
break;
case 3:
pfTexFormat( tex, PFTEX_INTERNAL_FORMAT, PFTEX_RGB_8 );
break;
case 2:
pfTexFormat( tex, PFTEX_INTERNAL_FORMAT, PFTEX_IA_8 );
break;
case 1:
pfTexFormat( tex, PFTEX_INTERNAL_FORMAT, PFTEX_I_8 );
break;
}
}
}
Regards.
--
+ Marcus Barnes, Technical Staff mailto:marcus++at++multigen.com +
+ Multigen Inc. http://www.multigen.com +
+ 550 S. Winchester Blvd. phoneto:1-408-556-2654 +
+ Suite 500 San Jose CA 95128 faxto:1-408-261-4102 +
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:25 PDT