1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.

Co-authored-by: Riteo <riteo@posteo.net>
This commit is contained in:
bruvzg
2021-11-12 14:49:49 +02:00
parent 59139df16e
commit 1887a9df19
84 changed files with 7467 additions and 579 deletions

View File

@@ -384,6 +384,7 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/copyright"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::DICTIONARY, "application/copyright_localized", PROPERTY_HINT_LOCALIZABLE_STRING), Dictionary()));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/min_macos_version"), "10.12"));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/export_angle", PROPERTY_HINT_ENUM, "Auto,Yes,No"), 0, true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "display/high_res"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "xcode/platform_build"), "14C18"));
@@ -1618,6 +1619,14 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
// Now process our template.
bool found_binary = false;
int export_angle = p_preset->get("application/export_angle");
bool include_angle_libs = false;
if (export_angle == 0) {
include_angle_libs = String(GLOBAL_GET("rendering/gl_compatibility/driver.macos")) == "opengl3_angle";
} else if (export_angle == 1) {
include_angle_libs = true;
}
while (ret == UNZ_OK && err == OK) {
// Get filename.
unz_file_info info;
@@ -1665,6 +1674,20 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
continue; // next
}
if (file == "Contents/Frameworks/libEGL.dylib") {
if (!include_angle_libs) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
}
if (file == "Contents/Frameworks/libGLESv2.dylib") {
if (!include_angle_libs) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
}
if (file == "Contents/Info.plist") {
_fix_plist(p_preset, data, pkg_name);
}