implicit conversion from Texture to TextureSlice

pull/17/head
cosmonaut 2022-03-23 18:01:52 -07:00
parent 1e3b5bfa77
commit b3677d06da
1 changed files with 2 additions and 0 deletions

View File

@ -199,6 +199,8 @@ namespace MoonWorks.Graphics
UsageFlags = textureCreateInfo.UsageFlags; UsageFlags = textureCreateInfo.UsageFlags;
} }
public static implicit operator TextureSlice(Texture t) => new TextureSlice(t);
// Used by AcquireSwapchainTexture. // Used by AcquireSwapchainTexture.
// Should not be tracked, because swapchain textures are managed by Vulkan. // Should not be tracked, because swapchain textures are managed by Vulkan.
internal Texture( internal Texture(