summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-18 15:16:28 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-18 15:16:28 +0000
commit27616b265146dc936518ab4a7c1116da05e03230 (patch)
tree47a6483a91ddb4d71257942cb4813904621dd38e /Graphics/GraphicsEngine
parentMinor coment (diff)
downloadDiligentCore-27616b265146dc936518ab4a7c1116da05e03230.tar.gz
DiligentCore-27616b265146dc936518ab4a7c1116da05e03230.zip
Added convenience constructor to LayoutElement struct
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/InputLayout.h19
1 files changed, 19 insertions, 0 deletions
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