From 3f1acffc7891d731c3c6625db6640dadb44459aa Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 14 Feb 2018 21:58:16 -0800 Subject: Fixed issue in OpenGL texture depth query --- Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp index ff8f4252..668cbe77 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp @@ -130,8 +130,9 @@ static TextureDesc GetTextureDescFromGLHandle(DeviceContextGLImpl *pDeviceContex VERIFY(TexDesc.Depth != 0, "Texture depth query is not supported; it must be specified by the texture description."); #endif } - else - TexDesc.Depth = 1; + + if (TexDesc.Type == RESOURCE_DIM_TEX_1D || TexDesc.Type == RESOURCE_DIM_TEX_2D) + TexDesc.ArraySize = 1; // TexDesc.Depth also #if GL_TEXTURE_INTERNAL_FORMAT GLint GlFormat = 0; -- cgit v1.2.3