[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

@@ -32,6 +32,7 @@ def get_opts():
BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN)", False),
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN)", False),
BoolVariable("use_coverage", "Use instrumentation codes in the binary (e.g. for code coverage)", False),
("angle_libs", "Path to the ANGLE static libraries", ""),
]
@@ -255,7 +256,13 @@ def configure(env: "Environment"):
if env["opengl3"]:
env.Append(CPPDEFINES=["GLES3_ENABLED"])
env.Append(LINKFLAGS=["-framework", "OpenGL"])
if env["angle_libs"] != "":
env.AppendUnique(CPPDEFINES=["EGL_STATIC"])
env.Append(LINKFLAGS=["-L" + env["angle_libs"]])
env.Append(LINKFLAGS=["-lANGLE.macos." + env["arch"]])
env.Append(LINKFLAGS=["-lEGL.macos." + env["arch"]])
env.Append(LINKFLAGS=["-lGLES.macos." + env["arch"]])
env.Prepend(CPPPATH=["#thirdparty/angle/include"])
env.Append(LINKFLAGS=["-rpath", "@executable_path/../Frameworks", "-rpath", "@executable_path"])