mirror of
https://github.com/nicklockwood/RetroRampage.git
synced 2026-04-03 00:28:30 -06:00
Core Animation renderer #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nicklockwood on 7/17/2019
This PR demonstrates how to implement GPU-accelerated rendering using Core Animation. This allows the game to be rendered at full display resolution, and with much better performance.
The renderer uses a CALayer pool as a simple optimization to avoid churning the view hierarchy each frame. There are opportunities for further optimizations however, for example:
I haven't bothered to implement fizzlefade currently. It's not clear what the most efficient way to draw a fizzle effect would be in Core Animation, but if all else fails you could just use Core Graphics.
I also haven't implemented font color tinting, since there's no simple way to implement this with UIImages either (at least, not in real-time).