Skip to content

Wrong parameter for renderPass in @luma.gl model.draw() #854

@SauvageThomas

Description

@SauvageThomas

Describe the bug
The renderPass is not correctly sent to the model.draw function. It's very impacting because it blocks any render with recent luma versions.

deck.ts:259  deck: drawing XRLayer({id: 'image-sub-layer-0,512,512,0-TiffPixelSource-#detail-view#'}) to picking:hover: renderPass.popDebugGroup is not a function TypeError: renderPass.popDebugGroup is not a function
    at _Model.draw (model.ts:405:18)
    at XRLayer.draw (index.mjs:549:13)
    at layer.ts:1084:16
    at withGLParameters (with-parameters.ts:37:13)
    at WebGLDevice.withParametersWebGL (webgl-device.ts:353:12)
    at XRLayer._drawLayer (layer.ts:1076:24)
    at PickLayersPass._drawLayersInViewport (layers-pass.ts:282:17)
    at PickLayersPass._drawLayers (layers-pass.ts:130:28)
    at PickLayersPass.render (layers-pass.ts:95:19)
    at PickLayersPass._drawPickingBuffer (pick-layers-pass.ts:87:32)

To Reproduce
Steps to reproduce the behavior:
The easiest way to reproduce the bug is to update to the latest deck.gl and luma.gl version and run any viv code, for exemple, Avivator will fail.

By looking in debug mode, it seems that the code il already present but is hidden by Luma that is not really doing anything with the renderPass. But, in recent versions the bug makes it imposible to draw anything.

Expected behavior
The bug is really easy to solve, the problem is that opts are passed to model.draw, while it should have been renderPass.

This single line solves the issue:
model.draw(opts['renderPass']);

This should be done in xr-layer.js and xr-3d-layer.js.

I've tested it by cloning locally and it works.

Thanks for this library

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions