You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like it expects AsArrayBufferView which works with immutable slices. This doesn't make sense for read_pixels, because we expect the slice to be filled up. Erasing the mutability from it looks like a giant UB to me:
--> src/stdweb.rs:2695:69
|
2695 | gl.read_pixels(x, y, width, height, format, gltype, Some(data))
| ^^^^^^^^^^ the trait `webgl_stdweb::AsArrayBufferView<'_>` is not implemented for `&mut [u8]`
|
= help: the following implementations were found:
<&'a [f32] as webgl_stdweb::AsArrayBufferView<'a>>
<&'a [f64] as webgl_stdweb::AsArrayBufferView<'a>>
<&'a [i16] as webgl_stdweb::AsArrayBufferView<'a>>
<&'a [i32] as webgl_stdweb::AsArrayBufferView<'a>>
and 4 others
= note: `webgl_stdweb::AsArrayBufferView<'_>` is implemented for `&[u8]`, but not for `&mut [u8]`
The text was updated successfully, but these errors were encountered:
Looks like it expects
AsArrayBufferView
which works with immutable slices. This doesn't make sense forread_pixels
, because we expect the slice to be filled up. Erasing the mutability from it looks like a giant UB to me:The text was updated successfully, but these errors were encountered: