luminance-rs icon indicating copy to clipboard operation
luminance-rs copied to clipboard

Depth-only framebuffer causes generated binding code to error?

Open wg-romank opened this issue 3 years ago • 0 comments

Hi,

First of all huge thanks to Phaazon and all contributors to the library! I'm having a blast with it.

Onto the issue, creating Framebuffer without color slot on the web

    let shadow_map = ctxt.new_framebuffer::<Dim2, (), Depth32F>(
      [400, 400], 0, Sampler::default()
    );

seems to cause en error calling drawBuffers API in bindgen code

TypeError: WebGL2RenderingContext.drawBuffers: Argument 1 can't be converted to a sequence.

in

function __wbg_drawBuffers_3e850289094e0ed2(arg0, arg1) {
    getObject(arg0).drawBuffers(getObject(arg1));
};

If I add color slot the issue seems to disappear (actually this function is no longer called), so I'm not sure if I'm missing something and error is caused by my own misconfiguration. I'm quite new to graphics so sorry for vague description.

Thanks!

wg-romank avatar Feb 02 '22 11:02 wg-romank