-
Notifications
You must be signed in to change notification settings - Fork 933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add (Js)ArrayBuffer version for create_buffer_init
#4128
Comments
As of #4042 you can map buffers directly into |
create_buffer_init
Hmm not sure if I'm a bit confused about this myself, the PR I linked does after all advertise it for readback as prime motivator. |
brought this up on the wgpu maintainer call and confirmed the above. |
Problem: I want to upload to a Vertex Buffer Object directly from a https://rustwasm.github.io/wasm-bindgen/api/js_sys/struct.ArrayBuffer.html
Current Best Solution: We have to do ArrayBuffer -> &[u8], then internally, wgpu probably does &[u8] -> ArrayBuffer. This is via this function / struct pair:
On the wasm32 platform, I'd like a way to bypass these two extra copies and directly do ArrayBuffer -> VBO.
Thanks!
The text was updated successfully, but these errors were encountered: