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/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Graphics/GraphicsEngineOpenGL') 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; -- cgit v1.2.3