New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL attributes (e.g. alpha) are not processed #7227

Closed
Beuc opened this Issue Oct 5, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Beuc
Contributor

Beuc commented Oct 5, 2018

Hi,

Currently library_egl.js/eglCreateContext creates the WebGL context using a fixed set of attributes:
_glutInitDisplayMode(0xB2 /* GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE | GLUT_STENCIL */);

I ran into an issue when porting software that needed GL_ALPHA_SIZE, which I quick-patched with:
_glutInitDisplayMode(0xBA /* GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE | GLUT_STENCIL */);

(incidentally it's funny to see egl implemented on top of glut rather than the other way around ;))

library_glut.js itself only seem to know about antialias(=multisample)/depth/stencil/alpha though.
I'm not sure it makes sense to try and supprot the other webgl attributes (premultipliedAlpha/preserveDrawingBuffer/failIfMajorPerformanceCaveat).

Was there any reason for the hard-coding, or do we need to implement a bit of attributes parsing there?

@kripken

This comment has been minimized.

Owner

kripken commented Oct 6, 2018

I think it's just not implemented yet, yeah - each graphics system (SDL, glut, etc.) needs to do it's own parsing for those, and people just didn't get around to it. PRs very welcome :)

Beuc added a commit to Beuc/emscripten that referenced this issue Oct 8, 2018

kripken added a commit that referenced this issue Oct 10, 2018

@Beuc

This comment has been minimized.

Contributor

Beuc commented Oct 11, 2018

(fix merged)

@Beuc Beuc closed this Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment