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

Set GL_TEXTURE_MAX_LEVEL for DDS files with incomplete mip chain #45

Open
AnyOldName3 opened this issue Mar 8, 2021 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@AnyOldName3
Copy link

There are DDS files in the wild that don't specify a complete mip chain with mipmaps all the way down to 1x1. When loading such files with SOIL2, the resulting texture isn't mipmap-complete, and OpenGL implementations don't have to display it as expected (e.g. modern AMD hardware with their proprietary Windows drivers samples everything as opaque black), but there's no indication of this to the programmer.

As I'm not currently hitting this with production code, just a quick test application, I can just add a glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 3) call after loading the offending texture, but it would be better if SOIL2 either gave some way of querying which mip levels the file actually contained, or set the correct max level automatically. I imagine that the flag to enable a glGenerateMipmap call would fix the symptom, too, but it isn't ideal if there's custom mip data as it overwrites all levels other than the base level.

@SpartanJ SpartanJ self-assigned this Jun 26, 2022
@SpartanJ SpartanJ added the enhancement New feature or request label Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants