summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-08 08:11:05 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-08 08:11:05 +0000
commitc55556104937ef5f16c3b8a8df9d940a8d257781 (patch)
tree24f776d8b5723e00b2351eb8c22f51f3d012add4 /Graphics/GraphicsEngineD3D11
parentFixed some clang warnings (diff)
downloadDiligentCore-c55556104937ef5f16c3b8a8df9d940a8d257781.tar.gz
DiligentCore-c55556104937ef5f16c3b8a8df9d940a8d257781.zip
Updated factory functions to not throw exceptions, but return; fixed API version mismatch error message
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp
index 3fce6018..0ba1e220 100644
--- a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp
@@ -107,14 +107,20 @@ void EngineFactoryD3D11Impl::CreateDeviceAndContextsD3D11(const EngineD3D11Creat
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, ")");
+ {
+ LOG_ERROR_MESSAGE("Diligent Engine runtime (", DILIGENT_API_VERSION, ") is not compatible with the client API version (", EngineCI.APIVersion, ")");
+ return;
+ }
VERIFY(ppDevice && ppContexts, "Null pointer provided");
if (!ppDevice || !ppContexts)
return;
if (EngineCI.MinimumFeatureLevel >= DIRECT3D_FEATURE_LEVEL_12_0)
- LOG_ERROR_AND_THROW("DIRECT3D_FEATURE_LEVEL_12_0 and above is not supported by Direct3D11 backend");
+ {
+ LOG_ERROR_MESSAGE("DIRECT3D_FEATURE_LEVEL_12_0 and above is not supported by Direct3D11 backend");
+ return;
+ }
*ppDevice = nullptr;
memset(ppContexts, 0, sizeof(*ppContexts) * (1 + EngineCI.NumDeferredContexts));
@@ -213,7 +219,10 @@ void EngineFactoryD3D11Impl::AttachToD3D11Device(void* pd
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, ")");
+ {
+ LOG_ERROR_MESSAGE("Diligent Engine runtime (", DILIGENT_API_VERSION, ") is not compatible with the client API version (", EngineCI.APIVersion, ")");
+ return;
+ }
VERIFY(ppDevice && ppContexts, "Null pointer provided");
if (!ppDevice || !ppContexts)