Re: How can change a texture's image correctly?

New Message Reply Date view Thread view Subject view Author view

From: Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Date: 03/06/2000 11:29:06


Hi,

I've looked through the pfTexture code a bit, and it doesn't look like we
allocate any memory in pfTexture unless you're loading a file. Are you
sure that it's the performer code which is allocating this memory?

In your explanation, its not clear whether you run out of memory when you
call pfTexImage of sometime later. Which function triggers the printing of
this error?

-- Marcin

On Mon, 6 Mar 2000, zhou tian wrote:

> Hi!
> I want to change a texture's image frequently. So I do like follows:
> pfGetTexImage(Shared->Tex,&Shared->image,&comp,&ns,&nt,&nr);
> change the Share->image's content
> pfTexImage(Shared->Tex,&Shared->image,&comp,&ns,&nt,&nr);
> It works well. But when it runs many many times, it will cause:
> "PF Fatal/Resource:pfMemory::new() Unable to allocate
> 3145744 bytes from arena 0x18040000.
> Try using pfSharedArenaSize() or env PFSHAREDSIZE
> to increase the arena size
> (currently 262144.00 KBytes) and check for adequate
> setrlimit() values and available space on swap
> (or pfTmpDir()). "
> So I add pfDelete(Shared->image) after pfTexImage. But it can't
> work well all the time(how can i use pfDelete() correctly?).When
> i use pfFree(Shaerd->image), it will work more time, but will
> make bus error at last. How can i change a texture's image
> freely with no problem?
> Thank you very much!
>
> ZhouTian(zhout++at++appmail.zju.edu.cn)
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Mar 06 2000 - 11:29:10 PST

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