Skip to content

Commit

Permalink
fix(core): support view.clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Mar 14, 2024
1 parent 61dd3a8 commit b0118f1
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions modules/core/src/passes/layers-pass.ts
Expand Up @@ -203,20 +203,16 @@ export default class LayersPass extends Pass {
viewport
});

// TODO v9 - since clearing is done in renderPass construction in luma.gl v9
// we have a choice
// TODO v9 - remove WebGL specific logic
if (view && view.props.clear) {
console.warn(`${view.id}: Per view clearing not yet implemented in deck.gl v9`);

// const clearOpts = view.props.clear === true ? {color: true, depth: true} : view.props.clear;
// withGLParameters(
// device,
// {
// scissorTest: true,
// scissor: glViewport
// },
// () => clear(device, clearOpts)
// );
const clearOpts = view.props.clear === true ? {color: true, depth: true} : view.props.clear;
this.device.withParametersWebGL(
{
scissorTest: true,
scissor: glViewport
},
() => this.device.clearWebGL(clearOpts)
);
}

// render layers in normal colors
Expand Down

0 comments on commit b0118f1

Please sign in to comment.