summaryrefslogtreecommitdiffstats
path: root/Tests/TestApp/src/TestApp.cpp
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-11-21 18:01:10 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-11-21 18:01:10 +0000
commit41e5a5404dd18c748a8355c0796d5e53f793c3b9 (patch)
tree58af8fabc3132d1edce8248ae5f5eaf53bbd6f42 /Tests/TestApp/src/TestApp.cpp
parentFixed release history (diff)
downloadDiligentEngine-41e5a5404dd18c748a8355c0796d5e53f793c3b9.tar.gz
DiligentEngine-41e5a5404dd18c748a8355c0796d5e53f793c3b9.zip
Implemented explicit resource state transitions
Diffstat (limited to 'Tests/TestApp/src/TestApp.cpp')
-rw-r--r--Tests/TestApp/src/TestApp.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp
index e70483c..06868c8 100644
--- a/Tests/TestApp/src/TestApp.cpp
+++ b/Tests/TestApp/src/TestApp.cpp
@@ -525,8 +525,9 @@ void TestApp::InitializeRenderers()
m_pImmediateContext->SetRenderTargets(0, nullptr, nullptr);
float ClearColor[] = {0.1f, 0.2f, 0.4f, 1.0f};
m_pImmediateContext->ClearRenderTarget(nullptr, ClearColor);
- Diligent::DrawAttribs DrawAttrs;
+ DrawAttribs DrawAttrs;
DrawAttrs.NumVertices = 3;
+ DrawAttrs.Flags = DRAW_FLAG_TRANSITION_VERTEX_BUFFERS;
m_pRenderScript->Run(m_pImmediateContext, "DrawTris", DrawAttrs);
// This adds transition barrier for pTex1
@@ -653,7 +654,7 @@ void TestApp::Render()
UniformData[3] = 0;
}
- Diligent::DrawAttribs DrawAttrs;
+ DrawAttribs DrawAttrs;
DrawAttrs.NumVertices = 3;
m_pRenderScript->Run(m_pImmediateContext, "DrawTris", DrawAttrs);
@@ -661,6 +662,7 @@ void TestApp::Render()
DrawAttrs.NumIndices = 3;
DrawAttrs.IndexType = VT_UINT32;
DrawAttrs.NumInstances = 3;
+ DrawAttrs.Flags = DRAW_FLAG_TRANSITION_INDEX_BUFFER | DRAW_FLAG_TRANSITION_VERTEX_BUFFERS;
m_pRenderScript->Run(m_pImmediateContext, "DrawTris", DrawAttrs);
m_pTestDrawCommands->Draw();
m_pTestBufferAccess->Draw((float)dCurrTime);