Ver Fonte

Explicitly enable WebGL extensions (#2302)

Co-authored-by: Christophe Dehais <[email protected]>
Christophe Dehais há 5 anos atrás
pai
commit
3af46fd7dc
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      src/renderer_gl.cpp

+ 6 - 1
src/renderer_gl.cpp

@@ -2088,8 +2088,13 @@ namespace bgfx { namespace gl
 			{
 			{
 				if (0 == bx::strCmp(ext, extension.m_name) )
 				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;
 					supported = true;
+#endif
+					extension.m_supported = supported;
 					break;
 					break;
 				}
 				}
 			}
 			}