diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-04-14 18:29:09 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-04-14 18:29:09 +0000 |
| commit | c09883fbe3951cd77543003ae1c6fdf6e5a11517 (patch) | |
| tree | 4bbcf4b08d6825f904bb613f3463dcfda7964a61 /RenderScript/src/InputLayoutDescParser.cpp | |
| parent | Minor update to comply with updated graphics types (diff) | |
| download | DiligentTools-c09883fbe3951cd77543003ae1c6fdf6e5a11517.tar.gz DiligentTools-c09883fbe3951cd77543003ae1c6fdf6e5a11517.zip | |
Moved primitive topology from draw attribs to pipeline desc; fixed multiple issue with mismatching types used by Lua parsers
Diffstat (limited to 'RenderScript/src/InputLayoutDescParser.cpp')
| -rw-r--r-- | RenderScript/src/InputLayoutDescParser.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/RenderScript/src/InputLayoutDescParser.cpp b/RenderScript/src/InputLayoutDescParser.cpp index 3045cb2..0bf237d 100644 --- a/RenderScript/src/InputLayoutDescParser.cpp +++ b/RenderScript/src/InputLayoutDescParser.cpp @@ -30,14 +30,17 @@ namespace Diligent MemberBinderBase( InputLayoutOffset ), m_LayoutElementsBufferOffset(ElementsBufferOffset) { - DEFINE_BINDER( m_Bindings, LayoutElement, InputIndex, Uint32, Validator<Uint32>( "Input Index", 0, 32 ) ) - DEFINE_BINDER( m_Bindings, LayoutElement, BufferSlot, Uint32, Validator<Uint32>( "Buffer Slot", 0, MaxBufferSlots ) ) - DEFINE_BINDER( m_Bindings, LayoutElement, NumComponents, Uint32, Validator<Uint32>( "Num Components", 1, 4 ) ) + using InputIndexType = decltype(LayoutElement::InputIndex); + DEFINE_BINDER_EX( m_Bindings, LayoutElement, InputIndex, InputIndexType, Validator<InputIndexType>( "Input Index", 0, 32 ) ); + using BufferSlotType = decltype(LayoutElement::BufferSlot); + DEFINE_BINDER_EX( m_Bindings, LayoutElement, BufferSlot, BufferSlotType, Validator<BufferSlotType>( "Buffer Slot", 0, MaxBufferSlots ) ); + using NumComponentsType = decltype(LayoutElement::NumComponents); + DEFINE_BINDER_EX( m_Bindings, LayoutElement, NumComponents, NumComponentsType, Validator<NumComponentsType>( "Num Components", 1, 4 ) ); - DEFINE_ENUM_BINDER( m_Bindings, LayoutElement, ValueType, VALUE_TYPE, m_ValueTypeEnumMapping ) + DEFINE_ENUM_BINDER( m_Bindings, LayoutElement, ValueType, m_ValueTypeEnumMapping ); - DEFINE_BINDER( m_Bindings, LayoutElement, IsNormalized, Bool, Validator<Bool>() ) - DEFINE_BINDER( m_Bindings, LayoutElement, RelativeOffset, Uint32, Validator<Uint32>() ) + DEFINE_BINDER( m_Bindings, LayoutElement, IsNormalized ); + DEFINE_BINDER( m_Bindings, LayoutElement, RelativeOffset ); m_FrequencyEnumMapping.AddMapping( "FREQUENCY_PER_VERTEX", LayoutElement::FREQUENCY_PER_VERTEX ); @@ -46,9 +49,9 @@ namespace Diligent "Unexpected map size. Did you update LayoutElement::FREQUENCY_PER_VERTEX enum?" ); VERIFY( m_FrequencyEnumMapping.m_Val2StrMap.size() == LayoutElement::FREQUENCY_NUM_FREQUENCIES - 1, "Unexpected map size. Did you update LayoutElement::FREQUENCY_PER_VERTEX enum?" ); - DEFINE_ENUM_BINDER( m_Bindings, LayoutElement, Frequency, LayoutElement::FREQUENCY, m_FrequencyEnumMapping ) + DEFINE_ENUM_BINDER( m_Bindings, LayoutElement, Frequency, m_FrequencyEnumMapping ); - DEFINE_BINDER( m_Bindings, LayoutElement, InstanceDataStepRate, Uint32, Validator<Uint32>() ) + DEFINE_BINDER( m_Bindings, LayoutElement, InstanceDataStepRate ); } void MemberBinder<InputLayoutDesc> :: GetValue( lua_State *L, const void* pBasePointer ) |
