From 87382bcca0ea984274477af3af1ff8d8c9495ced Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 27 Mar 2018 08:58:06 -0700 Subject: Added DebugMessageCallback to EngineCreation attribs --- Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Graphics/GraphicsEngineD3D11') 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; -- cgit v1.2.3