Merge pull request #87981 from adamscott/add-emscripten--sgl_enable_get_proc_address-linker-flag

Fix emscripten 3.1.51 breaking change about `*glGetProcAddress()`
This commit is contained in:
Rémi Verschelde 2024-02-05 18:06:15 +01:00
commit d3352813ea
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 0 deletions

View File

@ -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"])