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

fix(arcgis): remove dependency on @luma.gl/webgl #8747

Merged
merged 1 commit into from Apr 4, 2024
Merged

Conversation

Pessimistress
Copy link
Collaborator

For #8710

Change List

  • Remove dependency on @luma.gl/webgl, use Deck's onDeviceInitiated
  • Handle async resource creation
  • Remove withParametersWebGL, use v9 string parameters

this: Renderer,
gl: WebGL2RenderingContext
): Promise<RenderResources> {
const {deckInstance, device} = await createDeckInstance(gl);
Copy link
Collaborator Author

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

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

@coveralls
Copy link

Coverage Status

coverage: 89.982% (-0.06%) from 90.042%
when pulling 1a05a3a on x/arcgis-fix
into e0cefb0 on master.

this.resources = initializeResources.call(this, device);
let cancelled = false;
this.cancelInitialization = () => (cancelled = true);
const resources = await initializeResources.call(this, gl);
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@Pessimistress Pessimistress merged commit 4b2c496 into master Apr 4, 2024
4 checks passed
@Pessimistress Pessimistress deleted the x/arcgis-fix branch April 4, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants