diff --git a/Graphics/GraphicsEngine/interface/TextureView.h b/Graphics/GraphicsEngine/interface/TextureView.h index b8d49953e..f02876b60 100644 --- a/Graphics/GraphicsEngine/interface/TextureView.h +++ b/Graphics/GraphicsEngine/interface/TextureView.h @@ -156,6 +156,16 @@ struct TextureComponentMapping return !(*this == RHS); } + constexpr TEXTURE_COMPONENT_SWIZZLE operator[](Uint32 Component) const + { + return (&R)[Component]; + } + + constexpr TEXTURE_COMPONENT_SWIZZLE& operator[](Uint32 Component) + { + return (&R)[Component]; + } + static constexpr TextureComponentMapping Identity() { return {