Closed
Description
Summary
The docs show Float32Array::view() as unsafe
while the webgl example does not use this function - rather it uses a combo of Float32Array::new() and Float32Array::subarray
Is there a performance tradeoff happening with this approach, that would be gained by switching to view()
?
Additional Details
If we are always able to get a view into Float32Array, without really allocating, I wonder if we actually gain from bufferSubData()
? (e.g. https://docs.rs/web-sys/0.3.7/web_sys/struct.WebGl2RenderingContext.html#method.buffer_sub_data_with_i32_and_array_buffer)