google / google/gapid

Warn when GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR and no mips

Open
#1,398 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.