Skip to content

Commit

Permalink
TextureComponentMapping: added opeartor []
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Dec 7, 2023
1 parent 0f87367 commit 27837aa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Graphics/GraphicsEngine/interface/TextureView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 27837aa

Please sign in to comment.