From dd7351be3d8f6f160c50466e6ae628346c4979a0 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 18 Mar 2019 07:54:27 -0700 Subject: Moved NumDeferredContexts parameter from factory functions to EngineCreateInfo (fixed https://github.com/DiligentGraphics/DiligentCore/issues/76) --- Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp index 18f08312..c44021d6 100644 --- a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp @@ -112,6 +112,11 @@ void EngineFactoryOpenGLImpl::CreateDeviceAndSwapChainGL(const EngineGLCreateInf if( !ppDevice || !ppImmediateContext || !ppSwapChain ) return; + if (EngineCI.NumDeferredContexts > 0) + { + LOG_WARNING_MESSAGE("OpenGL back-end does not support deferred contexts"); + } + *ppDevice = nullptr; *ppImmediateContext = nullptr; *ppSwapChain = nullptr; @@ -181,6 +186,11 @@ void EngineFactoryOpenGLImpl::AttachToActiveGLContext(const EngineGLCreateInfo& if( !ppDevice || !ppImmediateContext ) return; + if (EngineCI.NumDeferredContexts > 0) + { + LOG_WARNING_MESSAGE("OpenGL back-end does not support deferred contexts"); + } + *ppDevice = nullptr; *ppImmediateContext = nullptr; -- cgit v1.2.3