From 09b15a9d10377216924614dcc5495383c1b0b47c Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 21 Nov 2020 17:55:20 -0800 Subject: Render device GL: fixed issue with cube array support detection on iOS --- .../GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index 5aae4d90..ad227ef0 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -1099,14 +1099,17 @@ void RenderDeviceGLImpl::TestTextureFormat(TEXTURE_FORMAT TexFormat) { TexFormatInfo.Dimensions |= RESOURCE_DIMENSION_SUPPORT_TEX_CUBE; - if (CreateTestGLTexture( - ContextState, GL_TEXTURE_CUBE_MAP_ARRAY, - [&]() // - { - glTexStorage3D(GL_TEXTURE_CUBE_MAP_ARRAY, 1, GLFmt, TestTextureDim, TestTextureDim, 6); - })) + if (m_DeviceCaps.TexCaps.CubemapArraysSupported) { - TexFormatInfo.Dimensions |= RESOURCE_DIMENSION_SUPPORT_TEX_CUBE_ARRAY; + if (CreateTestGLTexture( + ContextState, GL_TEXTURE_CUBE_MAP_ARRAY, + [&]() // + { + glTexStorage3D(GL_TEXTURE_CUBE_MAP_ARRAY, 1, GLFmt, TestTextureDim, TestTextureDim, 6); + })) + { + TexFormatInfo.Dimensions |= RESOURCE_DIMENSION_SUPPORT_TEX_CUBE_ARRAY; + } } } -- cgit v1.2.3