diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-02-15 05:58:16 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-02-15 05:58:16 +0000 |
| commit | 3f1acffc7891d731c3c6625db6640dadb44459aa (patch) | |
| tree | b45b678c418f0557b136f489352c3256013454ef /Graphics/GraphicsEngineOpenGL | |
| parent | Minor update (diff) | |
| download | DiligentCore-3f1acffc7891d731c3c6625db6640dadb44459aa.tar.gz DiligentCore-3f1acffc7891d731c3c6625db6640dadb44459aa.zip | |
Fixed issue in OpenGL texture depth query
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |
