From 27616b265146dc936518ab4a7c1116da05e03230 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 18 Oct 2019 08:16:28 -0700 Subject: Added convenience constructor to LayoutElement struct --- Graphics/GraphicsEngine/interface/InputLayout.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/interface/InputLayout.h b/Graphics/GraphicsEngine/interface/InputLayout.h index cc5f14af..125ef985 100644 --- a/Graphics/GraphicsEngine/interface/InputLayout.h +++ b/Graphics/GraphicsEngine/interface/InputLayout.h @@ -113,6 +113,25 @@ struct LayoutElement Frequency (_Frequency), InstanceDataStepRate(_InstanceDataStepRate) {} + + /// Initializes the structure + LayoutElement(Uint32 _InputIndex, + Uint32 _BufferSlot, + Uint32 _NumComponents, + VALUE_TYPE _ValueType, + Bool _IsNormalized, + FREQUENCY _Frequency, + Uint32 _InstanceDataStepRate = LayoutElement{}.InstanceDataStepRate)noexcept : + InputIndex (_InputIndex), + BufferSlot (_BufferSlot), + NumComponents (_NumComponents), + ValueType (_ValueType), + IsNormalized (_IsNormalized), + RelativeOffset (LayoutElement{}.RelativeOffset), + Stride (LayoutElement{}.Stride), + Frequency (_Frequency), + InstanceDataStepRate(_InstanceDataStepRate) + {} }; /// Layout description -- cgit v1.2.3