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/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp index 6ffb2731..161ab79c 100644 --- a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp @@ -99,12 +99,12 @@ void EngineFactoryD3D11Impl::CreateDeviceAndContextsD3D11(const EngineD3D11Creat IRenderDevice** ppDevice, IDeviceContext** ppContexts) { - 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 && ppContexts, "Null pointer provided"); if (!ppDevice || !ppContexts) return; @@ -205,12 +205,12 @@ void EngineFactoryD3D11Impl::AttachToD3D11Device(void* pd IRenderDevice** ppDevice, IDeviceContext** ppContexts) { - 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 && ppContexts, "Null pointer provided"); if (!ppDevice || !ppContexts) return; -- cgit v1.2.3