e488cc9f7a
wgpu requires buffer copy sizes and offsets to be 4-byte aligned. Unfortunately, ActionScript can perform 2-byte aligned uploads into an IndexBuffer3D. To support this, we now keep a copy of the IndexBuffer3D on the CPU. When performing an upload to the buffer, we round the offset down and the size up to the nearest 4-byte aligned value. The cpu buffer is used to fill out the write with existing data, so that we don't corrupt the contents of the GPU buffer. To avoid introducing a new RefCell, I've changed IndexBuffer3D to use a `Box` instead of an `Rc` to store the trait object. This allows us to pass a mutable reference down to the backend. |
||
---|---|---|
.. | ||
shaders | ||
src | ||
Cargo.toml | ||
uniforms.md |