wgpu-native icon indicating copy to clipboard operation
wgpu-native copied to clipboard

wgpu_swap_chain_get_next_texture doesn't return a texture

Open s-macke opened this issue 4 years ago • 1 comments

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.

s-macke avatar May 12 '20 21:05 s-macke

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.

kvark avatar May 13 '20 13:05 kvark