diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-02-09 23:06:00 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-02-09 23:06:00 +0000 |
| commit | 3c8fa483a325ff3f82ba23c5fc24c7a731761d17 (patch) | |
| tree | 17c541d746e474831bc923ddcb9aca7afa42e5ad /Tests/TestApp/src/TestDrawCommands.cpp | |
| parent | Updated core (fixed dynamic heap master block counting issue). (diff) | |
| download | DiligentEngine-3c8fa483a325ff3f82ba23c5fc24c7a731761d17.tar.gz DiligentEngine-3c8fa483a325ff3f82ba23c5fc24c7a731761d17.zip | |
Replaced reference to initial data parameter with pointer in CreateTexture and CreateBuffer methods; updated light scattering implementation to not use lua
Diffstat (limited to 'Tests/TestApp/src/TestDrawCommands.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestDrawCommands.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Tests/TestApp/src/TestDrawCommands.cpp b/Tests/TestApp/src/TestDrawCommands.cpp index d45b3b9..a0a4c24 100644 --- a/Tests/TestApp/src/TestDrawCommands.cpp +++ b/Tests/TestApp/src/TestDrawCommands.cpp @@ -76,7 +76,7 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont BufferData BuffData; BuffData.pData = VertexData.data(); BuffData.DataSize = (Uint32)VertexData.size()*sizeof( float ); - m_pRenderDevice->CreateBuffer( BuffDesc, BuffData, &m_pVertexBuff ); + m_pRenderDevice->CreateBuffer( BuffDesc, &BuffData, &m_pVertexBuff ); } { @@ -88,7 +88,7 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont BufferData BuffData; BuffData.pData = VertexData2.data(); BuffData.DataSize = (Uint32)VertexData2.size()*sizeof( float ); - m_pRenderDevice->CreateBuffer( BuffDesc, BuffData, &m_pVertexBuff2 ); + m_pRenderDevice->CreateBuffer( BuffDesc, &BuffData, &m_pVertexBuff2 ); } { @@ -100,7 +100,7 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont BufferData BuffData; BuffData.pData = IndexData.data(); BuffData.DataSize = BuffDesc.uiSizeInBytes; - m_pRenderDevice->CreateBuffer( BuffDesc, BuffData, &m_pIndexBuff ); + m_pRenderDevice->CreateBuffer( BuffDesc, &BuffData, &m_pIndexBuff ); } { @@ -112,7 +112,7 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont BufferData BuffData; BuffData.pData = InstanceData.data(); BuffData.DataSize = BuffDesc.uiSizeInBytes; - m_pRenderDevice->CreateBuffer( BuffDesc, BuffData, &m_pInstanceData ); + m_pRenderDevice->CreateBuffer( BuffDesc, &BuffData, &m_pInstanceData ); } if( m_pRenderDevice->GetDeviceCaps().bIndirectRenderingSupported ) @@ -132,7 +132,7 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont BuffDesc.BindFlags = BIND_INDIRECT_DRAW_ARGS | BIND_VERTEX_BUFFER; BuffDesc.Usage = USAGE_DYNAMIC; BuffDesc.CPUAccessFlags = CPU_ACCESS_WRITE; - m_pRenderDevice->CreateBuffer( BuffDesc, BufferData(), &m_pIndirectDrawArgs ); + m_pRenderDevice->CreateBuffer( BuffDesc, nullptr, &m_pIndirectDrawArgs ); } { @@ -152,7 +152,7 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont BuffDesc.BindFlags = BIND_INDIRECT_DRAW_ARGS | BIND_VERTEX_BUFFER; BuffDesc.Usage = USAGE_DYNAMIC; BuffDesc.CPUAccessFlags = CPU_ACCESS_WRITE; - m_pRenderDevice->CreateBuffer( BuffDesc, BufferData(), &m_pIndexedIndirectDrawArgs ); + m_pRenderDevice->CreateBuffer( BuffDesc, nullptr, &m_pIndexedIndirectDrawArgs ); } @@ -208,8 +208,8 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont InputLayoutDesc LayoutDesc; LayoutElement Elems[] = { - LayoutElement( 0, 0, 3, VT_FLOAT32, false, 0 ), - LayoutElement( 1, 0, 3, VT_FLOAT32, false, sizeof( float ) * 3 ) + LayoutElement{ 0, 0, 3, VT_FLOAT32, false, 0 }, + LayoutElement{ 1, 0, 3, VT_FLOAT32, false, sizeof( float ) * 3 } }; PSODesc.GraphicsPipeline.InputLayout.LayoutElements = Elems; PSODesc.GraphicsPipeline.InputLayout.NumElements = _countof( Elems ); @@ -225,9 +225,9 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont InputLayoutDesc LayoutDesc; LayoutElement Elems[] = { - LayoutElement( 0, 0, 3, VT_FLOAT32, false, 0 ), - LayoutElement( 1, 0, 3, VT_FLOAT32, false, sizeof( float ) * 3 ), - LayoutElement( 2, 1, 2, VT_FLOAT32, false, 0, 0, LayoutElement::FREQUENCY_PER_INSTANCE ) + LayoutElement{ 0, 0, 3, VT_FLOAT32, false, 0 }, + LayoutElement{ 1, 0, 3, VT_FLOAT32, false, sizeof( float ) * 3 }, + LayoutElement{ 2, 1, 2, VT_FLOAT32, false, 0, 0, LayoutElement::FREQUENCY_PER_INSTANCE } }; PSODesc.GraphicsPipeline.InputLayout.LayoutElements = Elems; PSODesc.GraphicsPipeline.InputLayout.NumElements = _countof( Elems ); @@ -246,9 +246,9 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont BuffData.DataSize = sizeof( UniformData ); RefCntAutoPtr<IBuffer> pUniformBuff3, pUniformBuff4; BuffDesc.Name = "Test Constant Buffer 3"; - m_pRenderDevice->CreateBuffer( BuffDesc, BuffData, &pUniformBuff3 ); + m_pRenderDevice->CreateBuffer( BuffDesc, &BuffData, &pUniformBuff3 ); BuffDesc.Name = "Test Constant Buffer 4"; - m_pRenderDevice->CreateBuffer( BuffDesc, BuffData, &pUniformBuff4 ); + m_pRenderDevice->CreateBuffer( BuffDesc, &BuffData, &pUniformBuff4 ); ResourceMappingDesc ResMappingDesc; ResourceMappingEntry pEtries[] = { { "cbTestBlock3", pUniformBuff3 }, { "cbTestBlock4", pUniformBuff4 }, { nullptr, nullptr } }; |
