From 1bb60c30f680bb8309589f97a8a9eaad7dc0c6f4 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sun, 24 Feb 2013 17:20:17 -0800 Subject: [PATCH] GL: Change BC4/5 to RGTC when extension 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 9e080a715..96b085384 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2058,6 +2058,14 @@ namespace bgfx } } + if (s_extension[Extension::EXT_texture_compression_rgtc].m_supported) + { + s_textureFormat[TextureFormat::BC4].m_fmt = GL_COMPRESSED_RED_RGTC1_EXT; + s_textureFormat[TextureFormat::BC4].m_internalFmt = GL_COMPRESSED_RED_RGTC1_EXT; + s_textureFormat[TextureFormat::BC5].m_fmt = GL_COMPRESSED_RED_GREEN_RGTC2_EXT; + s_textureFormat[TextureFormat::BC5].m_internalFmt = GL_COMPRESSED_RED_GREEN_RGTC2_EXT; + } + #if !BGFX_CONFIG_RENDERER_OPENGLES3 if (NULL != glVertexAttribDivisor && NULL != glDrawArraysInstanced