Projectitis
Well-known member
Hi all,
I came across the anti-grain 2D graphics library this morning. It seemed really promising for high quality rendering on T_3.5/T_3.6 (high memory requirement because of the frame buffer). The reading seems good (and looooong) - It's supposed to be fast, though that's not "optimized for chipset" fast (which would be my next job), but capable of awesome stuff such as sub-pixel accuracy, thick lines (with different capping), filled polygons etc.
Anyway, to cut a long story short I made a couple of minor tweaks to get it to compile using Arduino IDE, and then implemented a very basic example that did nothing except create an instance of a couple of low level objects required for using the library (a rendering buffer and a pixel format). It does nothing else (i.e. no drawing, no outputting to a display).
Already my program uses 137544 bytes of global variables. Eek! that's more than half (52%) of dynamic memory for global variables associated with the parts of the library I've loaded (which is very little). Because a 32x240 frame buffer is around 154k it just wouldn't work.
I'm pretty sure this is mostly LUT for things like SQRT and so forth, which T_ could use DSP for instead of LUT, and others could be moved to flash.
Probably going to spend a couple of hours and investigate the global variables and see which I could ditch before I make a decision on going forward with this library - I'm sure many of the global vars would be unused in a minimal T_ implementation and others could be moved out of dynamic mem.
One question - is there a way I can get Arduino IDE/compiler to spit out a list of all global vars and how much memory they use? That would help immensely.
Cheers,
Peter
I came across the anti-grain 2D graphics library this morning. It seemed really promising for high quality rendering on T_3.5/T_3.6 (high memory requirement because of the frame buffer). The reading seems good (and looooong) - It's supposed to be fast, though that's not "optimized for chipset" fast (which would be my next job), but capable of awesome stuff such as sub-pixel accuracy, thick lines (with different capping), filled polygons etc.
Anyway, to cut a long story short I made a couple of minor tweaks to get it to compile using Arduino IDE, and then implemented a very basic example that did nothing except create an instance of a couple of low level objects required for using the library (a rendering buffer and a pixel format). It does nothing else (i.e. no drawing, no outputting to a display).
Already my program uses 137544 bytes of global variables. Eek! that's more than half (52%) of dynamic memory for global variables associated with the parts of the library I've loaded (which is very little). Because a 32x240 frame buffer is around 154k it just wouldn't work.
I'm pretty sure this is mostly LUT for things like SQRT and so forth, which T_ could use DSP for instead of LUT, and others could be moved to flash.
Probably going to spend a couple of hours and investigate the global variables and see which I could ditch before I make a decision on going forward with this library - I'm sure many of the global vars would be unused in a minimal T_ implementation and others could be moved out of dynamic mem.
One question - is there a way I can get Arduino IDE/compiler to spit out a list of all global vars and how much memory they use? That would help immensely.
Cheers,
Peter
Last edited: