summaryrefslogtreecommitdiffstats
path: root/unityplugin/GhostCubeScene/src
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-12-04 05:34:48 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-12-04 05:34:48 +0000
commitb251377cae1247bd6b752fb513a0330f3787835f (patch)
tree8972e0c7814ee53d2b3fd3f32b7cd2136de5a4ce /unityplugin/GhostCubeScene/src
parentUpdated the API (SetVertexBuffers, SetIndexBuffers, DRAW_FLAGS and other) (diff)
downloadDiligentEngine-b251377cae1247bd6b752fb513a0330f3787835f.tar.gz
DiligentEngine-b251377cae1247bd6b752fb513a0330f3787835f.zip
Updated SetRenderTargets() and ClearDepthStencil() methods to take StateTransitionMode parameter
Diffstat (limited to 'unityplugin/GhostCubeScene/src')
-rw-r--r--unityplugin/GhostCubeScene/src/GhostCubeScene.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp
index 7b894b7..327b11a 100644
--- a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp
+++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp
@@ -156,10 +156,10 @@ void GhostCubeScene::Render(UnityRenderingEvent RenderEventFunc)
// In OpenGL, render targets must be bound to the pipeline to be cleared
ITextureView *pRTVs[] = { m_pRenderTarget->GetDefaultView(TEXTURE_VIEW_RENDER_TARGET) };
ITextureView *pDSV = m_pDepthBuffer->GetDefaultView(TEXTURE_VIEW_DEPTH_STENCIL);
- pCtx->SetRenderTargets(1, pRTVs, pDSV, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL);
+ pCtx->SetRenderTargets(1, pRTVs, pDSV, RESOURCE_STATE_TRANSITION_MODE_TRANSITION);
const float ClearColor[] = { 0.f, 0.2f, 0.5f, 1.0f };
pCtx->ClearRenderTarget(pRTVs[0], ClearColor, RESOURCE_STATE_TRANSITION_MODE_TRANSITION);
- pCtx->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG | CLEAR_DEPTH_STENCIL_TRANSITION_STATE_FLAG, ReverseZ ? 0.f : 1.f, 0);
+ pCtx->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG, ReverseZ ? 0.f : 1.f, 0, RESOURCE_STATE_TRANSITION_MODE_TRANSITION);
if (DeviceCaps.DevType == DeviceType::D3D12)
{
@@ -193,7 +193,7 @@ void GhostCubeScene::Render(UnityRenderingEvent RenderEventFunc)
// We need to invalidate the context state since the plugin has used d3d11 context
pCtx->InvalidateState();
- pCtx->SetRenderTargets(0, nullptr, nullptr, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL);
+ pCtx->SetRenderTargets(0, nullptr, nullptr, RESOURCE_STATE_TRANSITION_MODE_TRANSITION);
pCtx->SetPipelineState(m_pMirrorPSO);
pCtx->CommitShaderResources(m_pMirrorSRB, RESOURCE_STATE_TRANSITION_MODE_TRANSITION);