Skip to content

EGL attributes improvements#7858

Merged
kripken merged 8 commits intoemscripten-core:incomingfrom
Daft-Freak:egl-context-version
Jan 16, 2019
Merged

EGL attributes improvements#7858
kripken merged 8 commits intoemscripten-core:incomingfrom
Daft-Freak:egl-context-version

Conversation

@Daft-Freak
Copy link
Collaborator

The main change here is fixing emscripten-ports/SDL2#59 but there are also fixes to querying attributes.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems ok to me, but @juj should review it.

Test failures look like they might be real?

return 1;
case 0x303B: // EGL_MIN_SWAP_INTERVAL
{{{ makeSetValue('value', '0', '0', 'i32') }}};
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation looks wrong here

contextAttribs += 8;
}
#if USE_WEBGL2
if (glesContextVersion < 2 || glesContextVersion > 3) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does < 2 || > 3 differ from != 2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It allows 3 now.

@kripken kripken requested a review from juj January 14, 2019 21:59
@Daft-Freak
Copy link
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
@juj
Copy link
Collaborator

juj commented Jan 15, 2019

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.

@Daft-Freak
Copy link
Collaborator Author

Looks like the tests are okay now.

@kripken kripken merged commit 7d78ae7 into emscripten-core:incoming Jan 16, 2019
@Daft-Freak Daft-Freak deleted the egl-context-version branch January 17, 2019 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants