-Remove harcoded opengl extension testing from OS, ask rasterizer instead.

-Fixed a bug where etc textures were imported broken
This commit is contained in:
Juan Linietsky 2019-02-26 11:58:47 -03:00
parent 3299045988
commit 5eeb06ffd1
14 changed files with 41 additions and 18 deletions

View file

@ -1071,16 +1071,6 @@ bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
return true;
#endif
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_get_current_context();
// All extensions are already automatically enabled, this function allows
// checking WebGL extension support without inline JavaScript
if (p_feature == "s3tc")
return emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_s3tc_srgb");
if (p_feature == "etc")
return emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_etc1");
if (p_feature == "etc2")
return emscripten_webgl_enable_extension(ctx, "WEBGL_compressed_texture_etc");
return false;
}