Eric Hirschorn (eric++at++mred.bgm.link.com)
Wed, 26 Mar 1997 11:26:45 -0500 (CDT)
I've put one of the offending pf commands (pfIsTexFormatted) into
perfly (perfly.c) as a simple test case.
The routine I modified in perfly.c is "loadDetailTextures", and I've
put the comment /* Test */ next to the 2 lines I added. The O2
does not produce a core file when I run this perfly and dies on the
pfIsTexFormatted. If I run this modified version of
perfly on the machine it was compiled on (an IR with IRIX6.2) it works
fine. I haven't got a compiler on the O2 yet, so I haven't been able
to run a modified version of perfly compiled on it.
I get similar behavior if "pfFormatTex" is used. On the other hand,
if I use "pfApplyTex" I get a core file, but unfortunately I don't yet
have a dbx to apply to it yet (i.e. a Dev Option for IRIX6.3).
Eric
___
Eric S. Hirschorn eric++at++mred.bgm.link.com
Hughes Training, Inc. (817) 323-1361 (lab)
M/S 402, P.O. Box 6171 (817) 695-8715 (voice mail)
Arlington, Texas 76005-6171 (817) 695-4028 (fax)
------------------------------------------------------------------
void
loadDetailTextures(pfList *list, detailInfo *di, int ndi)
{
pfTexture *dtex;
int num, i, n;
void *arena = pfGetSharedArena();
int comp, sx, sy, sz;
uint *image;
if (!list || !(num = pfGetNum(list)))
return;
for (i=0; i < num; i++)
{
int test ; /* Test */
const char *name;
pfTexture *tex=0;
tex = (pfTexture *)pfGet(list, i);
pfGetTexImage(tex, &image, &comp, &sx, &sy, &sz);
name = pfGetTexName(tex);
if (name == NULL)
continue;
if (pfGetTexDetailTex(tex) ||
(pfGetTexFilter(tex, PFTEX_MAGFILTER) == PFTEX_SHARPEN))
continue;
for (n=0; n < ndi; n++) {
if (strcmp(name, di[n].texname)) continue;
/* load it if it's not already loaded */
if (!di[n].detailtex) {
dtex = di[n].detailtex = pfNewTex(arena);
if (pfLoadTexFile(dtex, di[n].detailname) <= 0) {
pfDelete(dtex);
di[n].detailtex = 0;
break;
} else {
pfGetTexImage(dtex, &image, &comp, &sx, &sy, &sz);
switch (comp) {
case 1:
pfTexFormat(dtex, PFTEX_INTERNAL_FORMAT,
PFTEX_I_8);
break;
case 2:
pfTexFormat(dtex, PFTEX_INTERNAL_FORMAT,
PFTEX_IA_8);
break;
case 3:
pfTexFormat(dtex, PFTEX_INTERNAL_FORMAT,
PFTEX_RGB_5);
break;
}
pfInsert(list, 0, dtex);
}
}
pfTexDetail(tex, di[n].level, di[n].detailtex);
pfTexFilter(tex, PFTEX_MAGFILTER_COLOR, PFTEX_ADD_DETAIL);
pfTexSpline(tex, PFTEX_DETAIL_SPLINE, di[n].spline, 1.0);
break;
}
/* Test */
test = pfIsTexFormatted ( tex ) ;
}
}
=======================================================================
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:57 PDT