Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Apply() optional #7

Closed
NathanKell opened this issue Nov 6, 2014 · 4 comments
Closed

Make Apply() optional #7

NathanKell opened this issue Nov 6, 2014 · 4 comments

Comments

@NathanKell
Copy link

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?

@sarbian
Copy link
Owner

sarbian commented Nov 6, 2014

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.

@NathanKell
Copy link
Author

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).

@rbray89
Copy link

rbray89 commented Nov 7, 2014

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?

@sarbian sarbian closed this as completed Nov 17, 2014
@NathanKell
Copy link
Author

Closed in error; apply is still not optional :(

@sarbian sarbian reopened this Nov 18, 2014
sarbian added a commit that referenced this issue Nov 19, 2014
@sarbian sarbian closed this as completed Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants