From 9d002442b288132348fd1360a2cb7652a3f77aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 3 Mar 2019 11:52:53 +0100 Subject: Improve VRAM texture compression checks for mobile/web For HTML5, we need to support S3TC if running on desktop, and ETC or ETC2 for mobile, so make this explicit. Add logic to check for ETC2 support on GLES3, and remove incorrect ETC feature for GLES3 on Android. Fix ETC check invalidating templates on HTML5. Fixes #26476. --- platform/android/export/export.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'platform/android/export/export.cpp') diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 8d9d9c697e..8ffd355219 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1114,16 +1114,10 @@ public: public: virtual void get_preset_features(const Ref &p_preset, List *r_features) { - // Re-enable when a GLES 2.0 backend is read - /*int api = p_preset->get("graphics/api"); - if (api == 0) - r_features->push_back("etc"); - else*/ String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name"); - if (driver == "GLES2" || driver == "GLES3") { + if (driver == "GLES2") { r_features->push_back("etc"); - } - if (driver == "GLES3") { + } else if (driver == "GLES3") { r_features->push_back("etc2"); } -- cgit v1.2.3