Martin Suter (suter++at++geo.unizh.ch)
Mon, 17 Jun 1996 16:50:08 +0200 (MET DST)
I'm trying to control the number bits per texel using 'pfTexture::setFormat'.
Using the code appended below my application doesn't crash, but it seems
to loop to infinity while loading the database. What's wrong with my code?
Do 'PFTEX_INTERNAL_FORMAT' and 'PFTEX_EXTERNAL_FORMAT' have to use the same
number of bits and/or components per texel?
// read raster file using Image Vision Library
...
ilConfig ilC(ilUChar,ilInterleaved,size.c,channelList,0,ilUpperLeftOrigin);
int lineLen=((xSizeTexTile*size.c+3)/4)*4;
unsigned char *imgBuffer=(unsigned char *)pfMalloc(lineLen*ySizeTexTile,pfGetSharedArena());
image->getTile(xOrigTex,yOrigTex,xSizeTexTile,ySizeTexTile,imgBuffer,&ilC);
delete image;
// Format the Texture
texture->setImage((uint *)imgBuffer,size.c,xSizeTexTile,ySizeTexTile,size.z);
texture->setFilter(PFTEX_MINFILTER, PFTEX_BILINEAR);
texture->setFormat(PFTEX_INTERNAL_FORMAT, PFTEX_RGB_4);
texture->format();
//^^^^^^^^^^ that's where the program doesn't advance anymore
...
Ciao
--
Martin Suter suter++at++geo.unizh.ch
Phone: +41 - 1 / 257 51 63 Remote Sensing Laboratories
FAX: +41 - 1 / 362 52 27 University of Zurich
Winterthurerstrasse 190
CH-8057 Zurich; Switzerland
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer.html
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:53:01 PDT