From 4657c47c66b5556dd95388a7b13d1abb593e1314 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 9 Nov 2019 12:48:49 -0800 Subject: Allowed swap chains without the depth buffer --- Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp index af4305c7..a1b9a79a 100644 --- a/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/GLContextWindows.cpp @@ -124,6 +124,11 @@ namespace Diligent auto DepthFmt = pSCDesc->DepthBufferFormat; switch(DepthFmt) { + case TEX_FORMAT_UNKNOWN: + pfd.cDepthBits = 0; + pfd.cStencilBits = 0; + break; + case TEX_FORMAT_D32_FLOAT_S8X24_UINT: pfd.cDepthBits = 32; pfd.cStencilBits = 8; -- cgit v1.2.3