3DWorld (10/13)

From:Michal Wozniak
Date:22 Sep 2001 at 18:41:55
Subject:[3DWorld] Re: Textures.

On 21-Wrz-01 Thomas Frieden wrote:

> Hi,

> Michal Wozniak wrote:

>> But, why then I need to keep original texture memory, if it's
>> copied into a bitmap? Why not allocating a bitmap at the begining,
>> and then allow programmer to release memory. I know that when bitmap
>> is allocated then graphics board software allocates a piece of fastram
>> for it (to be stored in case of gfxram shortage), and tries to place it
>> into
>> gfxram. So why do we need this original buffer?
>>

> The original images are needed again as soon as a texture is removed
> from the graphics board.

It required some thinking, but now its obwious to me too;))

I thought it works like this:
I load a texture
pass it to the W3D
W3D allocates a bitmap for it (is it only a struct, ar a whole new
bitmap?)
CGX allocates a piece of mem to store it in case there is not enough
free mem on board. (1)
At first use it tries to place it into GFX mem.
If it needs to be flushed it is copied into this temp mem (1)

In this case there would be no need for original image. But also
every texture would need twice it's memory.

The way it's handled no is a bit better, but IMHO, with better
cooperation with CGX/P96 the amount of needed memory could be
limited a bit more. But it would require some changes in CGX.

> Remember that the memory on the graphics board is rather limited, so
> when new textures are uploaded, other textures are removed from the
> graphics board. But if you need the old ones again, it has to be
> uploaded again. This is done automatically by Warp3D, so the original
> images must still be present.

So if texture is flushed from gfx board memory (by other texture)
it's memory is also dealocated? If not it would be better to do it the
way I thought it's done. At least I think so;)

> If the format is directly supported, there's only one copy in main memory.

Are you keeping converted texture also? On PPC texture conversion should
be as fast as pure copying.

> Regards,

BTW. If someone is interseted, You could download our new demo from:
ftp.klosz.art.pl/incoming/!!!!!! symphony stuff
!!!!!!!/amiga_demo/MWI-CKF.lzx.000
ftp.klosz.art.pl/incoming/!!!!!! symphony stuff
!!!!!!!/amiga_demo/MWI-CKF.lzx.001

Regards

---------------------------------------------------
http://POCZTA.interia.pl/ - sa powody by korzystac!