GLResolver: fall back to app-managed EGL/GLES when a user resolver is set#1010
Open
keeper-of-memes wants to merge 1 commit into
Open
Conversation
… set On platforms where the current GL context cannot be probed via the platform's native APIs (e.g. ANGLE on tvOS/iOS, where the app owns an EGL context backed by Metal and there is no system EGL/GLX/WGL to query), GLResolver::Initialize() failed hard even though the embedding application had explicitly supplied a resolver via projectm_create_with_opengl_load_proc(). When a user resolver is present, the app has taken responsibility for providing GL entry points, so an unprobeable context is expected rather than an error: assume an app-managed EGL/GLES context and continue, logging at info level. Behaviour without a user resolver is unchanged (hard error as before).
Author
|
Additional field evidence: this fallback is now validated in production on two hardware generations — Apple TV 4K 3rd gen (A15) and Apple TV HD (A8), both running libprojectM through ANGLE-Metal with an app-managed EGL context. Same behaviour on both: without the fallback, initialisation fails at the context probe despite a fully functional user resolver; with it, everything downstream works (the A8 additionally needs the ES-version gate relaxed, tracked separately in #1004 discussion). |
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.
Problem
On platforms where the current GL context cannot be probed via the platform's native APIs,
GLResolver::Initialize()fails hard even when the embedding application has explicitly supplied a resolver viaprojectm_create_with_opengl_load_proc(). Concrete case: ANGLE on tvOS/iOS. The app owns an EGL context backed by Metal, and there is no system EGL/GLX/WGL for the probe to query, so projectM refuses to initialise even though every GL entry point is resolvable through the app's proc loader.Change
When the context probe fails AND a user resolver is present, assume an app-managed EGL/GLES context and continue (logged at info level). The app has taken responsibility for providing GL entry points, so an unprobeable context is expected there rather than an error.
Behaviour without a user resolver is unchanged (hard error, as before).
Notes for reviewers
GLResolver.cpp.