Skip to content
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
Closed

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

Beuc opened this issue Oct 5, 2018 · 2 comments

Comments

@Beuc
Copy link
Contributor

@Beuc 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
Copy link
Member

@kripken 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
Copy link
Contributor Author

@Beuc 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.