Expose WebGL2-backed GLES bridge capabilities#844
Draft
brandonpayton wants to merge 1 commit into
Draft
Conversation
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.
Purpose
Native GLES clients should see a coherent ES2-style capability surface when Kandelo forwards GL commands to a browser WebGL2 context. The bridge already used WebGL2 as the backing implementation, but capability reporting and a GLES extension token path were incomplete: native callers could observe raw browser extension names, miss WebGL2-backed GLES2 feature gates, or pass the GLES half-float token where WebGL2 expects its core token.
This change makes the browser-backed GLES contract explicit and shared: report only GLES-facing capability names for features the WebGL2 backend implements, enable optional WebGL capabilities before advertising their GLES equivalents, and translate the known half-float token mismatch at the bridge boundary.
Changes
GL_HALF_FLOAT_OESto WebGL2GL_HALF_FLOATfor texture uploads and readbacks.Contract Notes
Validation
git diff --cached --checkbash scripts/dev-shell.sh bash -lc 'cd host && npm ci'bash scripts/dev-shell.sh bash scripts/build-musl.shbash scripts/dev-shell.sh bash -lc 'cd host && npx vitest run test/webgl-bridge.test.ts test/webgl-shadow.test.ts test/webgl-main-forward.test.ts'Not Run