summaryrefslogtreecommitdiff
path: root/editor/export
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-30 20:41:01 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-30 20:41:01 +0100
commite9de988020f3d46c3e7b4fd5a8a80724996035e0 (patch)
treef2506cfffc7af7a7ecb449b2ba59b5b7963dd40c /editor/export
parent1a37aefbf9fbac494294f00e675f665a5f44c347 (diff)
parent28f51ba547722d1283882ec5dee9bcab070bc33e (diff)
Merge pull request #72031 from reduz/change-high-quality-texture-import
Refactor high quality texture import
Diffstat (limited to 'editor/export')
-rw-r--r--editor/export/editor_export.cpp14
-rw-r--r--editor/export/editor_export_platform.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/editor/export/editor_export.cpp b/editor/export/editor_export.cpp
index 4900ced2e4..bc429e1111 100644
--- a/editor/export/editor_export.cpp
+++ b/editor/export/editor_export.cpp
@@ -129,10 +129,20 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
- const bool etc2_supported = GLOBAL_GET("rendering/textures/vram_compression/import_etc2");
+ const bool etc2_supported = GLOBAL_GET("rendering/textures/vram_compression/import_etc2_astc");
if (!etc2_supported) {
- return TTR("Target platform requires 'ETC2' texture compression. Enable 'Import Etc 2' in Project Settings.");
+ return TTR("Target platform requires 'ETC2/ASTC' texture compression. Enable 'Import ETC2 ASTC' in Project Settings.");
+ }
+
+ return String();
+}
+
+String EditorExportPlatform::test_bc() const {
+ const bool bc_supported = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc_bptc");
+
+ if (!bc_supported) {
+ return TTR("Target platform requires 'S3TC/BPTC' texture compression. Enable 'Import S3TC BPTC' in Project Settings.");
}
return String();
diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h
index 3b4e92c9bd..05d985eb6a 100644
--- a/editor/export/editor_export_platform.h
+++ b/editor/export/editor_export_platform.h
@@ -229,6 +229,7 @@ public:
virtual Ref<Texture2D> get_run_icon() const { return get_logo(); }
String test_etc2() const;
+ String test_bc() const;
bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0;
virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const = 0;