in0finite / SanAndreasUnity

Open source reimplementation of GTA San Andreas game engine in Unity
https://discord.gg/p6jjud5
MIT License
2.15k stars 353 forks source link

Don't keep texture data in memory unless it's necessary #42

Closed in0finite closed 4 years ago

in0finite commented 4 years ago

When loading textures, specify whether you need them to be kept in memory or not. Usually, they don't need to be in memory, or their data is needed for temporary calculations (flipping the texture).

In case of temporary calculations, when calling Apply(), texture should no longer be kept in memory.

This should greatly reduce amount of memory the application uses.

in0finite commented 4 years ago

Done