Question to ZoomSprite3D()

Everything else that doesn't fall into one of the other PB categories.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Question to ZoomSprite3D()

Post 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:
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Post 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.

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
Post Reply