summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-09-28 10:17:38 +0200
committerGitHub <noreply@github.com>2020-09-28 10:17:38 +0200
commite66013a6f1704c299591ceb279f2d03fa974996b (patch)
tree0700d0cf515f81a698ddd953293b30d7efcff719 /editor
parent1a8dfcd97b6d95d67aa00221196cdcc26b585e97 (diff)
parent313006adb81a859662cf25e86c6e1b3b98c5f6f0 (diff)
Merge pull request #42262 from akien-mga/ios-pvrtc-fixes
iOS: Fix multiple issues with PVRTC import, disable ETC1
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp14
-rw-r--r--editor/editor_export.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 1d7429eb64..d3a4dbb6e7 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1406,6 +1406,20 @@ String EditorExportPlatform::test_etc2() const {
return String();
}
+String EditorExportPlatform::test_etc2_or_pvrtc() const {
+ String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
+ bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2");
+ bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc");
+
+ if (driver == "GLES2" && !pvrtc_supported) {
+ return TTR("Target platform requires 'PVRTC' texture compression for GLES2. Enable 'Import Pvrtc' in Project Settings.");
+ } else if (driver == "Vulkan" && !etc2_supported && !pvrtc_supported) {
+ // FIXME: Review if this is true for Vulkan.
+ return TTR("Target platform requires 'ETC2' or 'PVRTC' texture compression for Vulkan. Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings.");
+ }
+ return String();
+}
+
int EditorExport::get_export_preset_count() const {
return export_presets.size();
}
diff --git a/editor/editor_export.h b/editor/editor_export.h
index ac1051571c..fa6be88302 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -277,6 +277,7 @@ public:
virtual Ref<Texture2D> get_run_icon() const { return get_logo(); }
String test_etc2() const; //generic test for etc2 since most platforms use it
+ String test_etc2_or_pvrtc() const; // test for etc2 or pvrtc support for iOS
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0;
virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const = 0;