Remove code relative to obsoleted ETC texture format
Co-authored-by: BlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>
This commit is contained in:
parent
907db8eebc
commit
e457f41f9b
@ -355,19 +355,16 @@ bool Utilities::has_os_feature(const String &p_feature) const {
|
||||
if (p_feature == "rgtc") {
|
||||
return config->rgtc_supported;
|
||||
}
|
||||
|
||||
if (p_feature == "s3tc") {
|
||||
return config->s3tc_supported;
|
||||
}
|
||||
|
||||
if (p_feature == "bptc") {
|
||||
return config->bptc_supported;
|
||||
}
|
||||
if (p_feature == "astc") {
|
||||
return config->astc_supported;
|
||||
}
|
||||
|
||||
if (p_feature == "etc" || p_feature == "etc2") {
|
||||
if (p_feature == "etc2") {
|
||||
return config->etc2_supported;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,6 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
|
||||
capitalize_string_remaps["dtls"] = "DTLS";
|
||||
capitalize_string_remaps["eol"] = "EOL";
|
||||
capitalize_string_remaps["erp"] = "ERP";
|
||||
capitalize_string_remaps["etc"] = "ETC";
|
||||
capitalize_string_remaps["etc2"] = "ETC2";
|
||||
capitalize_string_remaps["fabrik"] = "FABRIK";
|
||||
capitalize_string_remaps["fbx"] = "FBX";
|
||||
|
@ -40,9 +40,6 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
|
||||
if (p_preset->get("texture_format/s3tc")) {
|
||||
r_features->push_back("s3tc");
|
||||
}
|
||||
if (p_preset->get("texture_format/etc")) {
|
||||
r_features->push_back("etc");
|
||||
}
|
||||
if (p_preset->get("texture_format/etc2")) {
|
||||
r_features->push_back("etc2");
|
||||
}
|
||||
@ -62,7 +59,6 @@ void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) c
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/bptc"), true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), false));
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,6 @@ void ProjectSettingsEditor::_add_feature_overrides() {
|
||||
|
||||
presets.insert("bptc");
|
||||
presets.insert("s3tc");
|
||||
presets.insert("etc");
|
||||
presets.insert("etc2");
|
||||
presets.insert("editor");
|
||||
presets.insert("template_debug");
|
||||
|
@ -190,9 +190,9 @@ static Ref<Image> basis_universal_unpacker_ptr(const uint8_t *p_data, int p_size
|
||||
} else if (RS::get_singleton()->has_os_feature("s3tc")) {
|
||||
format = basist::transcoder_texture_format::cTFBC1; // get this from renderer
|
||||
imgfmt = Image::FORMAT_DXT1;
|
||||
} else if (RS::get_singleton()->has_os_feature("etc")) {
|
||||
} else if (RS::get_singleton()->has_os_feature("etc2")) {
|
||||
format = basist::transcoder_texture_format::cTFETC1; // get this from renderer
|
||||
imgfmt = Image::FORMAT_ETC;
|
||||
imgfmt = Image::FORMAT_ETC2_RGB8;
|
||||
} else {
|
||||
format = basist::transcoder_texture_format::cTFBGR565; // get this from renderer
|
||||
imgfmt = Image::FORMAT_RGB565;
|
||||
|
@ -287,7 +287,7 @@ static Ref<Image> load_from_file_access(Ref<FileAccess> f, Error *r_error) {
|
||||
ktxfmt = KTX_TTF_BC7_RGBA;
|
||||
} else if (RS::get_singleton()->has_os_feature("s3tc")) {
|
||||
ktxfmt = KTX_TTF_BC1_RGB;
|
||||
} else if (RS::get_singleton()->has_os_feature("etc")) {
|
||||
} else if (RS::get_singleton()->has_os_feature("etc2")) {
|
||||
ktxfmt = KTX_TTF_ETC1_RGB;
|
||||
} else {
|
||||
ktxfmt = KTX_TTF_RGBA32;
|
||||
|
@ -60,9 +60,6 @@
|
||||
<member name="texture_format/bptc" type="bool" setter="" getter="">
|
||||
If [code]true[/code], project textures are exported in the BPTC format.
|
||||
</member>
|
||||
<member name="texture_format/etc" type="bool" setter="" getter="">
|
||||
If [code]true[/code], project textures are exported in the ETC format.
|
||||
</member>
|
||||
<member name="texture_format/etc2" type="bool" setter="" getter="">
|
||||
If [code]true[/code], project textures are exported in the ETC2 format.
|
||||
</member>
|
||||
|
@ -126,9 +126,6 @@
|
||||
<member name="texture_format/bptc" type="bool" setter="" getter="">
|
||||
If [code]true[/code], project textures are exported in the BPTC format.
|
||||
</member>
|
||||
<member name="texture_format/etc" type="bool" setter="" getter="">
|
||||
If [code]true[/code], project textures are exported in the ETC format.
|
||||
</member>
|
||||
<member name="texture_format/etc2" type="bool" setter="" getter="">
|
||||
If [code]true[/code], project textures are exported in the ETC2 format.
|
||||
</member>
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
virtual void set_debug_generate_wireframes(bool p_generate) override {}
|
||||
|
||||
virtual bool has_os_feature(const String &p_feature) const override {
|
||||
return p_feature == "rgtc" || p_feature == "bptc" || p_feature == "s3tc" || p_feature == "etc" || p_feature == "etc2";
|
||||
return p_feature == "rgtc" || p_feature == "bptc" || p_feature == "s3tc" || p_feature == "etc2";
|
||||
}
|
||||
|
||||
virtual void update_memory_info() override {}
|
||||
|
@ -278,7 +278,7 @@ bool Utilities::has_os_feature(const String &p_feature) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((p_feature == "etc" || p_feature == "etc2") && RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, RD::TEXTURE_USAGE_SAMPLING_BIT)) {
|
||||
if (p_feature == "etc2" && RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, RD::TEXTURE_USAGE_SAMPLING_BIT)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user