You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add Metal support for macOS (arm64) and iOS
This commit is contained in:
committed by
Rémi Verschelde
parent
826de7976a
commit
2d0165574d
@@ -282,6 +282,7 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/short_version", PROPERTY_HINT_PLACEHOLDER_TEXT, "Leave empty to use project version"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version", PROPERTY_HINT_PLACEHOLDER_TEXT, "Leave empty to use project version"), ""));
|
||||
|
||||
// TODO(sgc): set to iOS 14.0 for Metal
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/min_ios_version"), "12.0"));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/additional_plist_content", PROPERTY_HINT_MULTILINE_TEXT), ""));
|
||||
@@ -2656,6 +2657,13 @@ bool EditorExportPlatformIOS::has_valid_export_configuration(const Ref<EditorExp
|
||||
}
|
||||
}
|
||||
|
||||
if (GLOBAL_GET("rendering/rendering_device/driver.ios") == "metal") {
|
||||
float version = p_preset->get("application/min_ios_version").operator String().to_float();
|
||||
if (version < 14.0) {
|
||||
err += TTR("Metal renderer require iOS 14+.") + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!err.is_empty()) {
|
||||
r_error = err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user