prog8 icon indicating copy to clipboard operation
prog8 copied to clipboard

improve fill() routines

Open irmen opened this issue 1 year ago • 1 comments

The default buffer size for gfx2.fill() is 64 entries which is far too small to reliably fill all polygons, especially in high res screen modes.

Fix this maybe by using the stack/queue code in #145

Don't forget monogfx.fill() as well.

Another optimization that could be made is to remove the separate calls to horizontal_line, and instead immediately pset() the pixels after the pget()'s. Might even optimize that by using both vera data ports 1 for reading 1 for writing, with appropriate auto increment/decrement.

see discord DM from leroy for code

irmen avatar Jun 25 '24 19:06 irmen

Note: the monogfx optimization work is being done in the following branch: monogfx_fill_optimization

gfx2 has been completed (performance wise, not the limited stack issue)

irmen avatar Aug 23 '24 19:08 irmen

optimized monogfx a bit, but there's room for future improvements if someone wants to implement masking and vera auto increment/decrement support when drawing the spans. It wil make the span code quite a bit more involved though. So I'm leaving it for now.

irmen avatar Oct 12 '24 15:10 irmen