Fixes for Legacy GL/GLES - #1380
Merged
Merged
Conversation
dgruss
reviewed
Aug 4, 2026
dgruss
reviewed
Aug 4, 2026
Contributor
|
We could support GLES2-compatible indices (see #1381) without the extension, but it makes the code much more complicated. I'm not convinced it is worth it. Maybe we should just centrally adjust what the exact compatibility claims are? |
Contributor
|
Could we simplify the GLES2 path to always use Also, we could define only the needed local constant ( |
Contributor
|
Looks good to me |
barbeque-squared
approved these changes
Aug 10, 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.
#1296 was originally targeting Modern OpenGL, but when the decision was made later to lower support to GL/GLES 2.0, a couple of things were missed. These won't be an issue for the 99% of us that aren't playing the game on 20 year old hardware, but since we did make the promise in #1296 to keep support for those devices, these issues should be addressed.
The first commit requires the extension
GL_OES_element_index_uintfor OpenGL ES 2.0 devices, because the spec otherwise doesn't support element buffers with 32 bit unsigned int. The only reason I wanted to support GLES 2 in #1296 was to maintain compatibility for Raspberry Pi 3 and older devices, and they support this extension, so this won't be an issue. Otherwise, modern embedded GPUs such as those on Raspberry Pi 4-5 support GLES 3 which doesn't require any extensions for this feature.The second commit switches the glyph loading to use
GL_LUMINANCEtexture format for GL 2, and GLES 2.0 (unless theGL_EXT_texture_rgextension is available), instead ofGL_REDwhich is unavailable on those versions.