Page 1 of 1

Question to ZoomSprite3D()

Posted: Sat Aug 13, 2005 11:42 pm
by va!n
Hi!
Just for example... I can create and use a 640x64 pixel sprite/sprite3d and i have the option to creaete a 64x64 pixel sprite/sprite3d and resize it with ZoomSprite3D() to something like 640x64....

Is there any different in memory usage of both ways? when using...

a)
CreateSprite(0,640,64)
CreateSprite3D(0,0)

b)
CreateSprite(0,64,64)
CreateSprite3D(0,0)
ZoomSprite3D(0,640,64)

in example a, the sprite will eat (640*64/8)*32 = 163 KB !!
in example b, the original sprite will eat (64*64/8)*32 = 16 KB !!

but when resizing example b to 640x480, does it eat then 163KB too, or does it still only eat 16 KB as the original and the ZoomSprite3D() command only knows that it must blit it resized (instead storing the resized image in memory) !??

Sorry, having some problems to create an easy question :wink:

Posted: Sun Aug 14, 2005 1:24 am
by Fou-Lu
It will keep the 16bit size. The image is resized just when you're going to blit it, the memory usage would only change if you were changing a normal sprite (2D). It's because of that you can use the same texture for more than one sprite 3D, the texture is never changed, only the way to draw the sprite.