From 996bfb53528aeaaba532413bf1848a0ebc3b03f0 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 13 Dec 2019 10:03:15 -0800 Subject: Unit tests: capturing debug output; fixed minor issue with viewport in Vk backend. --- Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp index c5544ce3..14fbd670 100644 --- a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp @@ -109,12 +109,12 @@ void EngineFactoryOpenGLImpl::CreateDeviceAndSwapChainGL(const EngineGLCreateInf const SwapChainDesc& SCDesc, ISwapChain** ppSwapChain) { - if (EngineCI.APIVersion != DILIGENT_API_VERSION) - LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); - if (EngineCI.DebugMessageCallback != nullptr) SetDebugMessageCallback(EngineCI.DebugMessageCallback); + if (EngineCI.APIVersion != DILIGENT_API_VERSION) + LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); + VERIFY(ppDevice && ppImmediateContext && ppSwapChain, "Null pointer provided"); if (!ppDevice || !ppImmediateContext || !ppSwapChain) return; @@ -189,12 +189,12 @@ void EngineFactoryOpenGLImpl::AttachToActiveGLContext(const EngineGLCreateInfo& IRenderDevice** ppDevice, IDeviceContext** ppImmediateContext) { - if (EngineCI.APIVersion != DILIGENT_API_VERSION) - LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); - if (EngineCI.DebugMessageCallback != nullptr) SetDebugMessageCallback(EngineCI.DebugMessageCallback); + if (EngineCI.APIVersion != DILIGENT_API_VERSION) + LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); + VERIFY(ppDevice && ppImmediateContext, "Null pointer provided"); if (!ppDevice || !ppImmediateContext) return; -- cgit v1.2.3