From 54bdcc4e5c3aac56d22da3aaf3cac10dd6807bdf Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 3 Dec 2018 09:33:43 -0800 Subject: Updated the API (SetVertexBuffers, SetIndexBuffers, DRAW_FLAGS and other) --- unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'unityplugin/GhostCubePlugin/PluginSource') diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp index 61b6667..4b69675 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp @@ -160,8 +160,8 @@ void SamplePlugin::Render(Diligent::IDeviceContext *pContext, const float4x4 &Vi Uint32 offset = 0; IBuffer *pBuffs[] = {m_CubeVertexBuffer}; - pContext->SetVertexBuffers(0, 1, pBuffs, &offset, SET_VERTEX_BUFFERS_FLAG_RESET); - pContext->SetIndexBuffer(m_CubeIndexBuffer, 0); + pContext->SetVertexBuffers(0, 1, pBuffs, &offset, RESOURCE_STATE_TRANSITION_MODE_TRANSITION, SET_VERTEX_BUFFERS_FLAG_RESET); + pContext->SetIndexBuffer(m_CubeIndexBuffer, 0, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); pContext->SetPipelineState(m_PSO); pContext->CommitShaderResources(m_SRB, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); @@ -170,6 +170,6 @@ void SamplePlugin::Render(Diligent::IDeviceContext *pContext, const float4x4 &Vi DrawAttrs.IsIndexed = true; DrawAttrs.IndexType = VT_UINT32; DrawAttrs.NumIndices = 36; - DrawAttrs.Flags = DRAW_FLAG_TRANSITION_INDEX_BUFFER | DRAW_FLAG_TRANSITION_VERTEX_BUFFERS; + DrawAttrs.Flags = DRAW_FLAG_VERIFY_STATES; pContext->Draw(DrawAttrs); } -- cgit v1.2.3