Skip to content

Commit

Permalink
GraphicsTypesX: updated MultiDrawAttribsX and MultiDrawIndexedAttribsX
Browse files Browse the repository at this point in the history
Added convenience template version of AddDrawItem
  • Loading branch information
TheMostDiligent committed Feb 24, 2024
1 parent ce90870 commit 32f9233
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Graphics/GraphicsEngine/interface/GraphicsTypesX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,13 @@ class MultiDrawAttribsX
return SyncDrawItems();
}

template <typename... ArgsType>
MultiDrawAttribsX& AddDrawItem(ArgsType&&... args)
{
const MultiDrawItem Item{std::forward<ArgsType>(args)...};
return AddDrawItem(Item);
}

MultiDrawAttribsX& ClearDrawItems()
{
m_DrawItems.clear();
Expand Down Expand Up @@ -2448,6 +2455,14 @@ class MultiDrawIndexedAttribsX
return SyncDrawItems();
}

template <typename... ArgsType>
MultiDrawAttribsX& AddDrawItem(ArgsType&&... args)
{
const MultiDrawItem Item{std::forward<ArgsType>(args)...};
return AddDrawItem(Item);
}


MultiDrawIndexedAttribsX& ClearDrawItems()
{
m_DrawItems.clear();
Expand Down

0 comments on commit 32f9233

Please sign in to comment.