wgpu-native
wgpu-native copied to clipboard
wgpu_swap_chain_get_next_texture doesn't return a texture
If I have read the given function correctly
wgpu_swap_chain_get_next_texture
the equivalent of the Javascript code should be the following.
swapChain.getCurrentTexture().createDefaultView();
So the spec says, that you should initially return a texture and not a texture view or a WGPUSwapChainOutput. That way you can use the texture for further processing such as texture to texture copying.
We don't support anything but OUTPUT_ATTACHMENT
for wgpu on native, so returning a texture would be useless. I agree the name should probably be changed.