Bitmap or Array?

BlitzPlus Forums/BlitzPlus Programming/Bitmap or Array?

RexRhino(Posted 2003) [#1]
I am creating an LED style display library for something I am working on. Basicly, it will draw graphics with a LED graphic as a pixel.

I am wondering the best approach to do this. I suppose I could load my graphics as bitmaps, and then when I draw the leds I could check each pixel in the bitmap and then draw the LED based on that... Or I could just store the graphics as an array.

Which would blitzers recommend?


fredborg(Posted 2003) [#2]
An array, or a bank if you are feeling exotic :) Reading pixels from an image is fairly slow, so I would first make it as an image (because it's much easier to edit), and then read the pixel values into an array or bank, and use that the rest of the program.


Perturbatio(Posted 2003) [#3]
you could create them as graphics and read them in to the array before the main loop like I did with this explode pixel code here


RexRhino(Posted 2003) [#4]
Actually, I am suprised on how slow the whole LED thing is... slower than any 3D graphics stuff I have done. I think what I am going to have to do is pre-render the LEDS for each graphic, and then draw the graphic. Drawing LEDs individualy is just too slow.