Remember about minimizing batches?
Now I want to minimise my batches. My 2D drawing context concatenates draw ops with the same state into a single draw-op, so if I can just draw all the same bitmaps together I can really minimise the state changes. I just have to visit the visible rectangles in the right order!
And so I’ve asked on StackOverflow and now I’ve put a+500 bounty on it!
Of course, it wasn’t enough to ask in the abstract. I ended up creating a little test app to answer the various comments I got.
… and, predictably, the test app does not exhibit the desired behaviour! Whereas in my complex game scenes it does seem to help to do batching, in the test app it actually helps to draw them out of order.
I have the bounty anyway, despite the test app not really being a good benchmark. I hope someone does something worth +500points, e.g. offers up a faster R-tree or something.
↓ click the "share" button below!