How can I update a texture in place? When I change the data attribute of Image directly it has no affect. I think this is because it doesn't know to call write_texture, but I'm not sure how to get around that. I can't call it manually since Image doesn't have any reference to the underlying WGPU texture. I noticed GpuImage which does have a reference but I'm not sure how I'm supposed to access it.
#Updating a texture in place
4 messages · Page 1 of 1 (latest)
You need to swap the handle
https://github.com/alphastrata/shadplay/blob/main/src%2Fshader_utils%2Ftexture_tooling.rs if I'm understanding you correctly this should show you one way to do it
You can drop jpgs etc onto shadplay and it'll swap them to the image texture when you hit 1, 2 ,3 et.