From b3677d06da9d5f5d0ea5b3efeb5c6844f4eeeb6f Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 23 Mar 2022 18:01:52 -0700 Subject: [PATCH] implicit conversion from Texture to TextureSlice --- src/Graphics/Resources/Texture.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Graphics/Resources/Texture.cs b/src/Graphics/Resources/Texture.cs index 14b40da..e604a78 100644 --- a/src/Graphics/Resources/Texture.cs +++ b/src/Graphics/Resources/Texture.cs @@ -199,6 +199,8 @@ namespace MoonWorks.Graphics UsageFlags = textureCreateInfo.UsageFlags; } + public static implicit operator TextureSlice(Texture t) => new TextureSlice(t); + // Used by AcquireSwapchainTexture. // Should not be tracked, because swapchain textures are managed by Vulkan. internal Texture(