summaryrefslogtreecommitdiffstats
path: root/drivers/gl_context
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-11-12 14:49:49 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-09-21 14:21:00 +0300
commit1887a9df19ea689bfb69f55454f0598bd09ab95f (patch)
treeb303d94caa33c5ee0f27544057f8cea1ced36a5e /drivers/gl_context
parent59139df16e7a10c3b9176f697d23b557af46601e (diff)
downloadredot-engine-1887a9df19ea689bfb69f55454f0598bd09ab95f.tar.gz
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
Diffstat (limited to 'drivers/gl_context')
-rw-r--r--drivers/gl_context/SCsub10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub
index ce3a598573..ce6ea747b1 100644
--- a/drivers/gl_context/SCsub
+++ b/drivers/gl_context/SCsub
@@ -5,9 +5,11 @@ Import("env")
if env["platform"] in ["macos", "windows", "linuxbsd"]:
# Thirdparty source files
thirdparty_dir = "#thirdparty/glad/"
- thirdparty_sources = [
- "gl.c",
- ]
+ thirdparty_sources = ["gl.c"]
+
+ if not env.get("angle_libs"):
+ thirdparty_sources += ["egl.c"]
+
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
# Treat glad headers as system headers to avoid raising warnings. Not supported on MSVC.
@@ -17,7 +19,7 @@ if env["platform"] in ["macos", "windows", "linuxbsd"]:
env.Prepend(CPPPATH=[thirdparty_dir])
env.Append(CPPDEFINES=["GLAD_ENABLED"])
- env.Append(CPPDEFINES=["GLES_OVER_GL"])
+ env.Append(CPPDEFINES=["EGL_ENABLED"])
env_thirdparty = env.Clone()
env_thirdparty.disable_warnings()