EGL attributes improvements#7858
Merged
kripken merged 8 commits intoemscripten-core:incomingfrom Jan 16, 2019
Merged
Conversation
Simplifies the code and allows access to all attributes.
kripken
reviewed
Jan 14, 2019
src/library_egl.js
Outdated
| return 1; | ||
| case 0x303B: // EGL_MIN_SWAP_INTERVAL | ||
| {{{ makeSetValue('value', '0', '0', 'i32') }}}; | ||
| return 1; |
| contextAttribs += 8; | ||
| } | ||
| #if USE_WEBGL2 | ||
| if (glesContextVersion < 2 || glesContextVersion > 3) { |
Member
There was a problem hiding this comment.
how does < 2 || > 3 differ from != 2?
Collaborator
Author
There was a problem hiding this comment.
It allows 3 now.
Collaborator
Author
|
Looks like I broke legacy emulation. |
Browser.createContext would do this, but doesn't return the context object which then makes it harder to implement eglDestroyContext or eglMakeCurrent
Collaborator
|
Nice! This looks good to me. Btw, if you are interested in working on EGL side further, there is a work in progress PR at #5580 to make EGL support multicontext and multithreading aware, the PR could be used as a basis for that. |
Collaborator
Author
|
Looks like the tests are okay now. |
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.
The main change here is fixing emscripten-ports/SDL2#59 but there are also fixes to querying attributes.