Skip to content

Commit

Permalink
fix(layers): Pass through opts.renderPass
Browse files Browse the repository at this point in the history
Fixes #854, which I believe was introduced in #805.
  • Loading branch information
manzt committed Jan 28, 2025
1 parent 4da486b commit 89ccebf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/layers/src/xr-3d-layer/xr-3d-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ const XR3DLayer = class extends Layer {
*/
draw(opts) {
const { uniforms } = opts;
/** @type {{
* textures: Record<string, import('@luma.gl/core').Binding>,
* model: Model
* scaleMatrix: Matrix4,
* }} */
const { textures, model, scaleMatrix } = this.state;
const {
contrastLimits,
Expand Down Expand Up @@ -324,7 +329,7 @@ const XR3DLayer = class extends Layer {
{ disableWanings: false }
);
model.setBindings(textures);
model.draw(opts);
model.draw(opts.renderPass);
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/layers/src/xr-layer/xr-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ const XRLayer = class extends Layer {
*/
draw(opts) {
const { uniforms } = opts;
/** @type {{ textures: Record<string, import('@luma.gl/core').Binding>, model: Model }} */
const { textures, model } = this.state;
if (textures && model) {
const { contrastLimits, domain, dtype, channelsVisible } = this.props;
Expand All @@ -265,7 +266,7 @@ const XRLayer = class extends Layer {
{ disableWarnings: false }
);
model.setBindings(textures);
model.draw(opts);
model.draw(opts.renderPass);
}
}

Expand Down

0 comments on commit 89ccebf

Please sign in to comment.