mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
Fixed issue#226.
This commit is contained in:
parent
7db31fc7fa
commit
dbca2689ca
1 changed files with 20 additions and 20 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue