From eefa3784492831a0af95f5d93e099533c8a4a9de Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sun, 15 Sep 2013 14:44:26 -0700 Subject: [PATCH] GL: Override ETC1 format settings when ETC2 is available. --- src/renderer_gl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index c7bea0b0..1a089efc 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2397,6 +2397,14 @@ namespace bgfx s_textureFormat[TextureFormat::ETC2A ].m_supported = etc2Supported; s_textureFormat[TextureFormat::ETC2A1].m_supported = etc2Supported; + if (etc2Supported) + { + // When ETC2 is supported override ETC1 texture format settings. + s_textureFormat[TextureFormat::ETC1].m_internalFmt = GL_COMPRESSED_RGB8_ETC2; + s_textureFormat[TextureFormat::ETC1].m_fmt = GL_COMPRESSED_RGB8_ETC2; + s_textureFormat[TextureFormat::ETC1].m_supported = true; + } + bool ptc1Supported = s_extension[Extension::IMG_texture_compression_pvrtc ].m_supported; s_textureFormat[TextureFormat::PTC12].m_supported = ptc1Supported; s_textureFormat[TextureFormat::PTC14].m_supported = ptc1Supported;