summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-08-07 03:41:08 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-08-07 03:41:08 +0000
commita72d485f4b157d5c8fb488bc2afb3b9278e465b7 (patch)
treec542c04aee507fe12757f7d76dcf4f30df4513bf /Graphics/GraphicsEngineOpenGL
parentAdded few debug checks (diff)
downloadDiligentCore-a72d485f4b157d5c8fb488bc2afb3b9278e465b7.tar.gz
DiligentCore-a72d485f4b157d5c8fb488bc2afb3b9278e465b7.zip
Treating subpass render target and depth stencil attachments as current RT and DS buffers
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
index 6d353e35..c06c7d3e 100644
--- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
@@ -378,6 +378,14 @@ void DeviceContextGLImpl::SetRenderTargets(Uint32 NumRen
ITextureView* pDepthStencil,
RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)
{
+#ifdef DILIGENT_DEVELOPMENT
+ if (m_pActiveRenderPass != nullptr)
+ {
+ LOG_ERROR_MESSAGE("Calling SetRenderTargets inside active render pass is invalid. End the render pass first");
+ return;
+ }
+#endif
+
if (TDeviceContextBase::SetRenderTargets(NumRenderTargets, ppRenderTargets, pDepthStencil))
{
if (m_NumBoundRenderTargets == 1 && m_pBoundRenderTargets[0] && m_pBoundRenderTargets[0]->GetTexture<TextureBaseGL>()->GetGLHandle() == 0)