Max2d performance?

BlitzMax Forums/BlitzMax Beginners Area/Max2d performance?

You've run out of memory - almost certainly. You have to remember that your images will be rounded up in size to the nearest power of two.

If you've got a 2600x2600-pixel image and are splitting it up in to 8x8=64 blocks, each pixel block is 325x325 in size. These blocks are rounded up in size to the next power of two - 512x512. In 32-bit graphics modes, each 512x512 texture takes up 1MB of VRAM but only 412k of that is tile data. If you run out of VRAM the texture data has to be shunted from system RAM to VRAM each cycle, which is very slow!

I reckon that if you split your image into blocks of a fixed size (say 64 or 128 pixels wide) you'll see a big increase in performance.