Convert texture pixel format if necessary

This makes the game run on modern macOS.