Explicitly enable WebGL extensions (#2302)

Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com>
This commit is contained in:
Christophe Dehais
2020-10-30 19:57:09 +01:00
committed by GitHub
parent ad062bde3c
commit 3af46fd7dc

View File

@@ -2088,8 +2088,13 @@ namespace bgfx { namespace gl
{
if (0 == bx::strCmp(ext, extension.m_name) )
{
extension.m_supported = true;
#if BX_PLATFORM_EMSCRIPTEN
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_get_current_context();
supported = emscripten_webgl_enable_extension(ctx, extension.m_name);
#else
supported = true;
#endif
extension.m_supported = supported;
break;
}
}