From 32f923367d2629bf6a831d243effd2d84d2f67f7 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 23 Feb 2024 20:14:22 -0800 Subject: [PATCH] GraphicsTypesX: updated MultiDrawAttribsX and MultiDrawIndexedAttribsX Added convenience template version of AddDrawItem --- .../GraphicsEngine/interface/GraphicsTypesX.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypesX.hpp b/Graphics/GraphicsEngine/interface/GraphicsTypesX.hpp index 471871503..de3cdfc1b 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypesX.hpp +++ b/Graphics/GraphicsEngine/interface/GraphicsTypesX.hpp @@ -2333,6 +2333,13 @@ class MultiDrawAttribsX return SyncDrawItems(); } + template + MultiDrawAttribsX& AddDrawItem(ArgsType&&... args) + { + const MultiDrawItem Item{std::forward(args)...}; + return AddDrawItem(Item); + } + MultiDrawAttribsX& ClearDrawItems() { m_DrawItems.clear(); @@ -2448,6 +2455,14 @@ class MultiDrawIndexedAttribsX return SyncDrawItems(); } + template + MultiDrawAttribsX& AddDrawItem(ArgsType&&... args) + { + const MultiDrawItem Item{std::forward(args)...}; + return AddDrawItem(Item); + } + + MultiDrawIndexedAttribsX& ClearDrawItems() { m_DrawItems.clear();