Dense question about animstrips + memory

BlitzMax Forums/BlitzMax Programming/Dense question about animstrips + memory

Grey Alien(Posted 2006) [#1]
OK, so we know that when loading in a normal image, it get's turned into a power of 2 square by the graphics card e.g 4x29 = 32x32 yes (or should does it power of 2 each dimension so that becomes 4x32?)

Well, any the main question I wanted to ask was, say I have an anim strip that is say 500x50 (10 frames of 50x50), does it get turned into a 512x512 image by the graphics card even thought each frame is only 50 pixels high, or does blitz load and store the frames intelligently so this huge amount of space isn't waster? I ask this because I have some pretty big anim strips and would have for them to be wasting video RAM on low spec systems.

Thanks, and sorry for being dense.


tonyg(Posted 2006) [#2]
When you load an animstrip it creates seperate pixmaps from each 'cell'. That'll be 10*50*50 memory areas.
When you drawimage, Bmax creates a pow2 surface and attaches the texture. A 50*50 cell will be displayed on a 64*64 surface. As each cell is treated as a seperate 'image' you will have 10*64*64 images in video RAM.
To get around this check for TAnim in the forums.
This will NOT create seperate pixmaps. Instead it takes UV coordinates from your image and attaches them to a single surface which it reuses for the next cell.


Grey Alien(Posted 2006) [#3]
thanks tonyG you've been super helpful today.