-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(arcgis): remove dependency on @luma.gl/webgl #8747
Conversation
this: Renderer, | ||
gl: WebGL2RenderingContext | ||
): Promise<RenderResources> { | ||
const {deckInstance, device} = await createDeckInstance(gl); |
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.
@ibgreen Can't use luma.attachDevice
here because webgl is registered inside Deck's constructor
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.
Since the arcgis module only works on WebGL it wouldn't seem unreasonable to import webgl module here and register it.
Alternatively, I am not sure if props.devices
on luma.attachDevice({..., devices: [WebGLDevice])
works well yet, but that would avoid registration/global mechanisms.
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.
The bug here is caused by the webgl module depending on some luma.gl/core exports that deck.gl/core is not exposing.
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.
OK that should hopefully be solved in 9.1.
this.resources = initializeResources.call(this, device); | ||
let cancelled = false; | ||
this.cancelInitialization = () => (cancelled = true); | ||
const resources = await initializeResources.call(this, gl); |
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.
Why .call()
? Why do we need to set this
rather than pass it as a param? Maybe a comment?
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.
Not introduced by this PR
For #8710
Change List
@luma.gl/webgl
, use Deck'sonDeviceInitiated
withParametersWebGL
, use v9 string parameters