Make Apply() optional
Closed this issue · 4 comments
I would like to reference this to load DDS textures in RSS, but when loading heightmaps or vertex color maps (which get used to construct MapSOs) I do not want to upload the texture to the GPU. Even when I do, sometimes I want to leave it readable (as does @rbray89 in EVE). Can the loader have cfg-file-specified overrides to make unreadable, and can the static loader method itself (which I will call from RSS) have an optional parameter to skip the Apply() step entirely?
It's just a matter of using false as the second argument of Apply.
I'll re-factor the current code a bit to expose that call :
GameDatabase.TextureInfo LoadDDS(string Path, bool keepReadable=false, bool asNormal=false, int mipmapBias=0)
it should make life easier for mods that want to load DDS.
And I'll add config for marking file readable, but I feel like it goes a bit too much in @rbray89 territory and that was not my initial intent.
Thanks! (And for the other one too)
I know it's not your original intent, but without it both EVE and RSS will fail badly using DDS textures, which is a big problem when those are precisely the textures one would most want to convert to DDS (8192s).
I was thinking about this... What if we added a flag (As KSP does for normal maps) in the name of the file?
eg. *_READ or *_MAP?
Closed in error; apply is still not optional :(