Post by jasonharper on Jan 21, 2014 4:54:31 GMT -8
Keep in mind that there are only 2K drawing commands allowed in the display list - you'll come nowhere near filling the screen, if you try to write each individual pixel with a separate command. Instead, you need to write your pixels into memory (in any of the many supported bitmap formats), set up one of the bitmap handles 0..14 to specify the address/size/format you chose for the bitmap data, then draw that bitmap to the screen with a single Vertex call. This is basically the same setup as the "sketch" demo uses, you'd just be using direct memory writes instead of cmd_sketch() to create pixels in the bitmap.
Post by jamesbowman on Jan 21, 2014 8:13:26 GMT -8
Right.. here is a small sample I just wrote that sets up the whole screen as a framebuffer, in PALETTED mode, which should be good for the fractals. setpal() sets palette entry 'i' to a 32-bit ARGB color, and plot(x, y, i) sets a single pixel to index 'i'.
This approach uses about half of the available graphics memory, and you can still draw anything 'on top' of the framebuffer bitmap using regular drawing commands.