Warn when GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR and no mips
Open
enhancement
GLES
P2
triaged
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 329
- PR merge metrics
- No merged PRs in 30d
Description
Non-mipmapped textures will appear black unless the `GL_TEXTURE_MIN_FILTER` texture parameter is set to `GL_LINEAR` like so:
`glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)`
The default for this is `GL_NEAREST_MIPMAP_LINEAR`, which will attempt to use mipmaps, often resulting in a black sample read.
This is a stupidly easy thing to encounter when writing new GL code, and we should warn about it.
Contributor guide
Assessment
This issue has not been assessed yet.