Re: Texture: internal and external format

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.asd.sgi.com)
Mon, 17 Jun 1996 11:58:47 -0700


+>---- On Jun 17, 4:50pm, Martin Suter wrote:
> Subject: Texture: internal and external format
->From guest++at++holodeck.csd.sgi.com Mon Jun 17 08:24:35 1996
->
->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?

Not the same number of bits per txel, but note that
the formats you use do have to match the number of components that you have.
Note that there are separate formats for RGB_4 and RGBA_4, for use
with 3 and 4 component textures, respectively.

However, that doesn't explain an infinite loop.
What kind of graphics hardware are you using?
Can you run the program single process under dbx and ctrl-c it when
it hangs and then do a 'where' to get the stack trace and send it to us?

Thanx!!
src.
  

->
-> // 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
->
+>---- End of excerpt from Martin Suter

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (415) 933 - 1002  FAX: (415) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++

======================================================================= 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


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:01 PDT

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