summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
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/GraphicsEngineOpenGL
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/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp
index eebcb682..04a19d7e 100644
--- a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp
@@ -117,7 +117,10 @@ void EngineFactoryOpenGLImpl::CreateDeviceAndSwapChainGL(const EngineGLCreateInf
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 && ppImmediateContext && ppSwapChain, "Null pointer provided");
if (!ppDevice || !ppImmediateContext || !ppSwapChain)
@@ -194,7 +197,10 @@ void EngineFactoryOpenGLImpl::AttachToActiveGLContext(const EngineGLCreateInfo&
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 && ppImmediateContext, "Null pointer provided");
if (!ppDevice || !ppImmediateContext)