summaryrefslogtreecommitdiffstats
path: root/RenderScript
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-05-29 04:37:51 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-05-29 04:37:51 +0000
commitefbb8b10812698d177b8b0ae88ec1b20ee489155 (patch)
tree924ec4abfa256e5148030900a82629c44b02e2bb /RenderScript
parentFixed clang build error (diff)
downloadDiligentTools-efbb8b10812698d177b8b0ae88ec1b20ee489155.tar.gz
DiligentTools-efbb8b10812698d177b8b0ae88ec1b20ee489155.zip
Moved buffer stried definition to vertex layout desc
Diffstat (limited to 'RenderScript')
-rw-r--r--RenderScript/src/BufferParser.cpp8
-rw-r--r--RenderScript/src/InputLayoutDescParser.cpp1
2 files changed, 2 insertions, 7 deletions
diff --git a/RenderScript/src/BufferParser.cpp b/RenderScript/src/BufferParser.cpp
index 98e72d0..4b6d489 100644
--- a/RenderScript/src/BufferParser.cpp
+++ b/RenderScript/src/BufferParser.cpp
@@ -192,7 +192,6 @@ namespace Diligent
Uint32 NumBuffers = 0;
IBuffer *pBuffs[MaxBufferSlots] = {};
Uint32 Offsets[MaxBufferSlots] = {};
- Uint32 Strides[MaxBufferSlots] = {};
while( CurrArgInd <= NumArgs )
{
if( StartSlot + (NumBuffers + 1) > MaxBufferSlots )
@@ -214,11 +213,6 @@ namespace Diligent
else
Offsets[NumBuffers] = 0;
- if( lua_type( L, CurrArgInd ) == LUA_TNUMBER )
- Strides[NumBuffers] = ReadValueFromLua<Uint32>( L, CurrArgInd++ );
- else
- Strides[NumBuffers] = 0;
-
// The last argument may be flags
if( CurrArgInd == NumArgs &&
(lua_type( L, CurrArgInd ) == LUA_TSTRING ||
@@ -234,7 +228,7 @@ namespace Diligent
}
auto *pContext = LoadDeviceContextFromRegistry( L );
- pContext->SetVertexBuffers( StartSlot, NumBuffers, pBuffs, Strides, Offsets, Flags );
+ pContext->SetVertexBuffers( StartSlot, NumBuffers, pBuffs, Offsets, Flags );
// Return no values to Lua
return 0;
diff --git a/RenderScript/src/InputLayoutDescParser.cpp b/RenderScript/src/InputLayoutDescParser.cpp
index 0bf237d..1e40c13 100644
--- a/RenderScript/src/InputLayoutDescParser.cpp
+++ b/RenderScript/src/InputLayoutDescParser.cpp
@@ -41,6 +41,7 @@ namespace Diligent
DEFINE_BINDER( m_Bindings, LayoutElement, IsNormalized );
DEFINE_BINDER( m_Bindings, LayoutElement, RelativeOffset );
+ DEFINE_BINDER( m_Bindings, LayoutElement, Stride );
m_FrequencyEnumMapping.AddMapping( "FREQUENCY_PER_VERTEX", LayoutElement::FREQUENCY_PER_VERTEX );