From: Jasmina Orman (jasmina.orman++at++student.uni-tuebingen.de)
Date: 03/01/2001 10:04:04
Hi,
Last week I send a question how to use texture compression with Prformer.
Well this Problem I already solved, but now I have a new one:
After I done texture compression I'm not able to use my compressed images.
Somehow Performer is always using old textures. I tried with diffrent
techniques to replace these old texture with new ones but it doesn't work.
It seems like Performer has its own internal texture list!
//============================================================
This is what my program is doing:
//-------------------------------------
// first load file
// FILE is of type pfb
// here is all my geometry and textures
root = pfdLoadFile(filename);
scene->addChild(root);
//------------------------------------
// get the texture list
myTexList=pfuMakeSceneTexList(scene);
...
// loop through this texture list and do compression
...
tex_num =myTexList->getNum();
...
pfTexture * tex;
...
for(int s=0;s<tex_num;s++)
{
tex =(pfTexture *) myTexList->get(s);
...
tex->getImage(&image, &comp, &ns, &nt, &nr);
// COMPRESS IMAGE AND PUT THE RESULT IN THE NEW IMAGE BUFFER :img
img =(unsigned int *) malloc(compressedSize * sizeof(unsigned
int));
...
Compress(image, img);
...
//*****************************
// NOW THE PROBLEM
//*****************************
// here I tried to replace tex-image with new one img
// tex->freeImage();
// for example
tex->setImage(img, comp, ns, nt, nr);
// or creat new txture and new tex List : also it doesn't work
}
// now I want to download my new tex list into tex-memory
// but it shows ald textures
pfuDownloadTexList(myTexList,PFUTEX_SHOW);
//======================================================================
Is there any way that I could put the new image buffer into pfTexture or
replace old texList with a new one ?
(I know that compression works because I printed the img buffer into a
file and
it is a compressed one and the size is also smaller.)
All this I do when I'm setting up my channel . Is it a wrong stage for
this ?
How can I query the amount of texture memory that is used by my Programm.
(don't want to pfNotifyLevel(4);)
I hope someone will have at least one answer to one of my question !
Thanks
Jasmina
This archive was generated by hypermail 2b29 : Thu Mar 01 2001 - 10:04:09 PST