summaryrefslogtreecommitdiffstats
path: root/platform/web
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2024-02-05 11:42:28 -0500
committerAdam Scott <ascott.ca@gmail.com>2024-02-05 11:55:03 -0500
commit5922ac0fb11105da67d28847b60a521406a77cdb (patch)
treede88ee0920551157267b0a370a6ffeb8e58dad43 /platform/web
parentf8f2c8c85a91a25560f6742472a3a4afdc400d0f (diff)
downloadredot-engine-5922ac0fb11105da67d28847b60a521406a77cdb.tar.gz
Fix emscripten 3.1.51 breaking change about `*glGetProcAddress()`
Diffstat (limited to 'platform/web')
-rw-r--r--platform/web/detect.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/web/detect.py b/platform/web/detect.py
index bce03eb79e..7deec7b593 100644
--- a/platform/web/detect.py
+++ b/platform/web/detect.py
@@ -206,6 +206,11 @@ def configure(env: "Environment"):
env.Append(LINKFLAGS=["-s", "USE_WEBGL2=1"])
# Allow use to take control of swapping WebGL buffers.
env.Append(LINKFLAGS=["-s", "OFFSCREEN_FRAMEBUFFER=1"])
+ # Breaking change since emscripten 3.1.51
+ # https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3151---121323
+ if cc_semver >= (3, 1, 51):
+ # Enables the use of *glGetProcAddress()
+ env.Append(LINKFLAGS=["-s", "GL_ENABLE_GET_PROC_ADDRESS=1"])
if env["javascript_eval"]:
env.Append(CPPDEFINES=["JAVASCRIPT_EVAL_ENABLED"])