-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Emscripten webgl context #2583
Emscripten webgl context #2583
Conversation
One of the things I really hate with WebGL is that it only allows setting context creation parameters as true or false, i.e. I was thinking whether to make the creation API possibly future-proof by not having these fields represent booleans but just integers in terms of number of bits to allocate, and currently treat anything nonzero as true.. That way in the future one could say the preferred bit depth with Another way would be to just have the depth/stencil/alpha as true/false, and in the future, if such feature is abailable, add new fields |
"EmscriptenWebGLContextAttributes": [ | ||
"alpha", | ||
"depth", | ||
"stencil", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes require bumping the version number
This looks good. Can you please check though that it does not affect perf? In particular I worry about storing properties on the context object like that (temp buffers, etc.). It shouldn't affect perf, but let's be sure. |
…ext(), emscripten_webgl_make_context_current(), emscripten_webgl_get_current_context(), emscripten_webgl_destroy_context() and emscripten_webgl_enable_extension() and a type structure EmscriptenWebGLContextAttributes. Yet unimplemented.
….js to manage multiple simultaneous GL contexts.
Rebased to latest. Tested performance on both the Firefox packaged app we've been working on earlier this year, and on my 3D engine, and I cannot observe a difference in performance. |
Implements a HTML5 API for creating WebGL contexts. Adds support for creating multiple GL contexts on different canvases. So far tested that
browser
test suite passes.