From 0f87367d9489183c09af77afe86716089333dc2e Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 6 Dec 2023 18:22:24 -0800 Subject: [PATCH] TextureComponentMapping: added Identity() convenience function --- Graphics/GraphicsEngine/interface/TextureView.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Graphics/GraphicsEngine/interface/TextureView.h b/Graphics/GraphicsEngine/interface/TextureView.h index d5a591c40..b8d49953e 100644 --- a/Graphics/GraphicsEngine/interface/TextureView.h +++ b/Graphics/GraphicsEngine/interface/TextureView.h @@ -155,6 +155,16 @@ struct TextureComponentMapping { return !(*this == RHS); } + + static constexpr TextureComponentMapping Identity() + { + return { + TEXTURE_COMPONENT_SWIZZLE_IDENTITY, + TEXTURE_COMPONENT_SWIZZLE_IDENTITY, + TEXTURE_COMPONENT_SWIZZLE_IDENTITY, + TEXTURE_COMPONENT_SWIZZLE_IDENTITY + }; + } #endif }; typedef struct TextureComponentMapping TextureComponentMapping;