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

How do I load only the lowest mipmap for compressed and uncompressed dds files? #116

Open
bryanedds opened this issue Apr 7, 2024 · 3 comments

Comments

@bryanedds
Copy link

bryanedds commented Apr 7, 2024

I'm currently implementing basic texture streaming in my engine and I'm trying to load up only the lowest mipmap for the textures until the full textures and mipmaps can be streamed in later. I find the API a bit confusing, but here's my current code that loads in the full textures and mipmaps via pfim -

https://github.com/bryanedds/Nu/blob/ba6066052046ef783a0c450158d0f137c523320d/Nu/Nu/OpenGL/OpenGL.Texture.fs#L92-L148

and -

https://github.com/bryanedds/Nu/blob/ba6066052046ef783a0c450158d0f137c523320d/Nu/Nu/OpenGL/OpenGL.Texture.fs#L286-L307

However, rather than just loading in the full thing, I want to have additional procedures that load in only the lowest mipmap and nothing else. Reading the full texture from file would take too much time and defeat the purpose of texture streaming a bit.

Thank you for your time and assistance!

@nickbabcock
Copy link
Owner

Thank you for reporting a great, motivating use case.

I agree there's a lack of support for mipmap-only use cases. What API do you envision?

@bryanedds
Copy link
Author

Off top, I actually have no idea how my desired feature's desired API would look, mostly because I'm still struggling a bit with Pfim's API - so I don't know right off how to make a practical suggestion in that case.

Let me think about it a bit. Are you on discord? Maybe we can go back and forth a bit in chat?

@nickbabcock
Copy link
Owner

Yes, Pfim's API is the result of organic growth ... would be the nicest way I'd phrase it 😄 😄

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

2 participants