Fixed issue#226.

This commit is contained in:
Branimir Karadžić 2015-01-08 20:43:36 -08:00
parent 7db31fc7fa
commit dbca2689ca

View file

@ -1155,6 +1155,13 @@ namespace bgfx
}
}
if (!isTextureFormatValid(TextureFormat::R8) )
{
// GL core has to use GL_R8 Issue#208, GLES2 has to use GL_LUMINANCE issue#226
s_textureFormat[TextureFormat::R8].m_internalFmt = GL_LUMINANCE;
s_textureFormat[TextureFormat::R8].m_fmt = GL_LUMINANCE;
}
if (!BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) )
{
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
@ -1318,13 +1325,6 @@ namespace bgfx
}
}
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL >= 31)
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) )
{
s_textureFormat[TextureFormat::R8].m_internalFmt = GL_R8;
s_textureFormat[TextureFormat::R8].m_fmt = GL_RED;
}
#if BGFX_CONFIG_RENDERER_OPENGL
if (s_extension[Extension::ARB_debug_output].m_supported
|| s_extension[Extension::KHR_debug].m_supported)