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
Ensure that externally created contexts are polyfilled, tracked #954
Conversation
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.
Ensure that context polyfills always occur, even if an external context is provided. This was only happening accidentally, if withParameters happened to be called while rendering a scene
To polyfill the context we just need to call trackContext
I don't see that happening?
createGLContext
is a public API if we change its behavior we need to update docs.
I must admit that as a I user I would find it a little unexpected that createGLContext
accepts a context prop and returns it if supplied instead of creating a context, I would not have expected that.
@ibgreen it happens here: https://github.com/uber/luma.gl/blob/2a17e425ed99a64112f3e60cb3f1611d9a4c355d/modules/core/src/webgl/context/context.js#L109-L114 The problem is that if a GL context is provided it won't get the polyfills or tracking unless some incidental call to Semantically, I think you could think of it as a subtle change to the semantics of |
But couldn't we just call At least right now, I don't think people are passing contexts they already created and want to use with luma.gl through We could of course update the docs and tell people that they must do so, but that would seem equivalent to just asking them to call |
@ibgreen How about this approach? Keeps |
OK I see. It both tracks context and adds debug instrumentation... Where does that leave Shouldn't this function be a member of "the
Maybe
|
Ok updated the name. @Pessimistress this should remove the need for that Deck.gl update you made to address this problem. |
Ensure that context polyfills always occur, even if an external context is provided. This was only happening accidentally, if
withParameters
happened to be called while rendering a scene.