summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-03-27 15:58:06 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-03-27 15:58:06 +0000
commit87382bcca0ea984274477af3af1ff8d8c9495ced (patch)
treea9cdbd5490b767bd353dc39efdb46766d58f0154 /Graphics/GraphicsEngineOpenGL
parentReworked debug message handling to allow user-specified callbacks (diff)
downloadDiligentCore-87382bcca0ea984274477af3af1ff8d8c9495ced.tar.gz
DiligentCore-87382bcca0ea984274477af3af1ff8d8c9495ced.zip
Added DebugMessageCallback to EngineCreation attribs
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp
index bb455da1..a3e4d276 100644
--- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp
@@ -98,6 +98,9 @@ void EngineFactoryOpenGLImpl::CreateDeviceAndSwapChainGL(const EngineGLAttribs&
const SwapChainDesc& SCDesc,
ISwapChain **ppSwapChain )
{
+ if (CreationAttribs.DebugMessageCallback != nullptr)
+ SetDebugMessageCallback(CreationAttribs.DebugMessageCallback);
+
VERIFY( ppDevice && ppImmediateContext && ppSwapChain, "Null pointer provided" );
if( !ppDevice || !ppImmediateContext || !ppSwapChain )
return;
@@ -164,6 +167,9 @@ void EngineFactoryOpenGLImpl::AttachToActiveGLContext( const EngineGLAttribs& Cr
IRenderDevice **ppDevice,
IDeviceContext **ppImmediateContext )
{
+ if (CreationAttribs.DebugMessageCallback != nullptr)
+ SetDebugMessageCallback(CreationAttribs.DebugMessageCallback);
+
VERIFY( ppDevice && ppImmediateContext, "Null pointer provided" );
if( !ppDevice || !ppImmediateContext )
return;