summaryrefslogtreecommitdiffstats
path: root/unityplugin/GhostCubePlugin/PluginSource
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-12-03 17:33:43 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-12-03 17:33:43 +0000
commit54bdcc4e5c3aac56d22da3aaf3cac10dd6807bdf (patch)
treef3911330de9cac5af8f8045270b0879585e3bb2a /unityplugin/GhostCubePlugin/PluginSource
parentFixed linux build (diff)
downloadDiligentEngine-54bdcc4e5c3aac56d22da3aaf3cac10dd6807bdf.tar.gz
DiligentEngine-54bdcc4e5c3aac56d22da3aaf3cac10dd6807bdf.zip
Updated the API (SetVertexBuffers, SetIndexBuffers, DRAW_FLAGS and other)
Diffstat (limited to 'unityplugin/GhostCubePlugin/PluginSource')
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}