Skip to content

Commit

Permalink
Remove some WebGL specific code (#8967)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress authored and felixpalmer committed Jul 3, 2024
1 parent 703b4cb commit d5ac45f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions modules/core/src/lib/deck-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ export default class DeckPicker {
}

// Resize it to current canvas size (this is a noop if size hasn't changed)
// @ts-expect-error
const gl = this.device.gl as WebGL2RenderingContext;
this.pickingFBO?.resize({width: gl.canvas.width, height: gl.canvas.height});
this.depthFBO?.resize({width: gl.canvas.width, height: gl.canvas.height});
const {canvas} = this.device.getCanvasContext();
this.pickingFBO?.resize({width: canvas.width, height: canvas.height});
this.depthFBO?.resize({width: canvas.width, height: canvas.height});
}

/** Preliminary filtering of the layers list. Skid picking pass if no layer is pickable. */
Expand Down
3 changes: 0 additions & 3 deletions modules/core/src/lib/deck-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ type LayerFilter = ((context: FilterContext) => boolean) | null;

export default class DeckRenderer {
device: Device;
gl: WebGL2RenderingContext;
layerFilter: LayerFilter;
drawPickingColors: boolean;
drawLayersPass: DrawLayersPass;
Expand All @@ -29,8 +28,6 @@ export default class DeckRenderer {

constructor(device: Device) {
this.device = device;
// @ts-expect-error
this.gl = device.gl;
this.layerFilter = null;
this.drawPickingColors = false;
this.drawLayersPass = new DrawLayersPass(device);
Expand Down

0 comments on commit d5ac45f

Please sign in to comment.