Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Batch rendering for display objects #73
This implements batched rendering for OpenFL display objects. The implementation is a bit dirty, but I tried to make it as less-intrusive as possible for now, but since we're on the verge of forking now anyway, we can refactor it together with everything else later.
It works like this:
There's a limitation: currently, bitmaps from the same texture but with different smoothing modes will be drawn with the smoothing mode set by the first bitmap. Hopefully we won't see this in practice, but technically this behaviour is of course wrong. It can be fixed by breaking the group when smoothing mode changes and/or using WebGL 2 Sampler objects (so no IE/Edge support).
In future it would be interesting to experiment with instanced rendering for this, because we could save some CPU<->GPU bandwidth by supplying data per quad instance instead of per vertex.