Replies: 1 comment 1 reply
-
It looks like that is correct. The purpose of that function is to allow your custom backend to create textures to give to wgpu and works like how from_custom works for the device and adapter. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a library which is using the C/C++ implementation of wgpu (https://github.com/gfx-rs/wgpu-native), but my application is in Rust. To reuse the texture from wgpu-native the idea is to use
Texture::from_customintroduced in https://github.com/gfx-rs/wgpu/pull/8315/changes.So in the overall it will look like this:
wgpu-native Texture pointer -> rust cxx (ffi) -> rust
To be able to use the from_custom I had to implement the
wgpu::custom::TextureInterfacetrait for my type. In this case a few parameters are copied but not the complete texture.Is this the correct way to pass a texture from wgpu native to rust?
Beta Was this translation helpful? Give feedback.
All reactions