summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
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/GraphicsEngineD3D11
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/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp
index dea8f0ec..9e5a5981 100644
--- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp
@@ -102,6 +102,9 @@ inline bool SdkLayersAvailable()
/// at position 1
void EngineFactoryD3D11Impl::CreateDeviceAndContextsD3D11( const EngineD3D11Attribs& EngineAttribs, IRenderDevice **ppDevice, IDeviceContext **ppContexts, Uint32 NumDeferredContexts )
{
+ if (EngineAttribs.DebugMessageCallback != nullptr)
+ SetDebugMessageCallback(EngineAttribs.DebugMessageCallback);
+
VERIFY( ppDevice && ppContexts, "Null pointer provided" );
if( !ppDevice || !ppContexts )
return;
@@ -204,6 +207,9 @@ void EngineFactoryD3D11Impl::AttachToD3D11Device(void *pd3d11NativeDevice,
IDeviceContext **ppContexts,
Uint32 NumDeferredContexts)
{
+ if (EngineAttribs.DebugMessageCallback != nullptr)
+ SetDebugMessageCallback(EngineAttribs.DebugMessageCallback);
+
VERIFY( ppDevice && ppContexts, "Null pointer provided" );
if( !ppDevice || !ppContexts )
return;