Check if GLES2 Devices Support Mipmapping - #1408
Merged
Merged
Conversation
bohning
approved these changes
Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #1296, rounding up texture dimensions to power-of-two values was eliminated to save memory and also simplify the code. In #1213, support for mipmap textures was added.
OpenGL ES 2.0 drivers don't support mipmapping for non-power-of-two dimension textures. Only for power-of-two textures. So you have to pick one or the other. The exception is if the driver supports the extension
GL_OES_texture_npot.If the driver doesn't support mipmapping for NPOT textures and you attempt to generate mipmaps, you get a
GL_INVALID_OPERATIONerror. This PR disables mipmapping for GLES2 devices that don't support the extension.