diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-21 14:24:46 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-21 14:24:46 +0200 |
| commit | 4f314a64a5e44c1a7b607a3c1f41d2e07b2dac55 (patch) | |
| tree | b303d94caa33c5ee0f27544057f8cea1ced36a5e /platform/windows/detect.py | |
| parent | 59139df16e7a10c3b9176f697d23b557af46601e (diff) | |
| parent | 1887a9df19ea689bfb69f55454f0598bd09ab95f (diff) | |
| download | redot-engine-4f314a64a5e44c1a7b607a3c1f41d2e07b2dac55.tar.gz | |
Merge pull request #72831 from bruvzg/angle++
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support (runtime backend selection).
Diffstat (limited to 'platform/windows/detect.py')
| -rw-r--r-- | platform/windows/detect.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 6e56f2a525..340b95e4ab 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -186,6 +186,7 @@ def get_opts(): BoolVariable("use_asan", "Use address sanitizer (ASAN)", False), BoolVariable("debug_crt", "Compile with MSVC's debug CRT (/MDd)", False), BoolVariable("incremental_link", "Use MSVC incremental linking. May increase or decrease build times.", False), + ("angle_libs", "Path to the ANGLE static libraries", ""), ] @@ -431,7 +432,16 @@ def configure_msvc(env, vcvars_msvc_config): if env["opengl3"]: env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"]) - LIBS += ["opengl32"] + if env["angle_libs"] != "": + env.AppendUnique(CPPDEFINES=["EGL_STATIC"]) + env.Append(LIBPATH=[env["angle_libs"]]) + LIBS += [ + "libANGLE.windows." + env["arch"], + "libEGL.windows." + env["arch"], + "libGLES.windows." + env["arch"], + ] + LIBS += ["dxgi", "d3d9", "d3d11"] + env.Prepend(CPPPATH=["#thirdparty/angle/include"]) env.Append(LINKFLAGS=[p + env["LIBSUFFIX"] for p in LIBS]) @@ -614,7 +624,18 @@ def configure_mingw(env): if env["opengl3"]: env.Append(CPPDEFINES=["GLES3_ENABLED"]) - env.Append(LIBS=["opengl32"]) + if env["angle_libs"] != "": + env.AppendUnique(CPPDEFINES=["EGL_STATIC"]) + env.Append(LIBPATH=[env["angle_libs"]]) + env.Append( + LIBS=[ + "EGL.windows." + env["arch"], + "GLES.windows." + env["arch"], + "ANGLE.windows." + env["arch"], + ] + ) + env.Append(LIBS=["dxgi", "d3d9", "d3d11"]) + env.Prepend(CPPPATH=["#thirdparty/angle/include"]) env.Append(CPPDEFINES=["MINGW_ENABLED", ("MINGW_HAS_SECURE_API", 1)]) |
