flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
595 stars 40 forks source link

Allow using 8bit alpha textures in CGImage #275

Open ephemer opened 5 years ago

ephemer commented 5 years ago

Motivation

We want to be able to support 8bit textures in order to reduce the occurrence of OutOfMemoryErrors in certain situations. SDL_gpu uses 32bit textures by default, so this change would reduce memory usage by at least 75% in many situations.

Proposed solution

We'd need to use bgfx or another renderer, because SDL_gpu doesn't seem to support anything but its default setting.