Skip to content

Commit 7a173af

Browse files
committed
Merge pull request godotengine#87981 from adamscott/add-emscripten--sgl_enable_get_proc_address-linker-flag
Fix emscripten 3.1.51 breaking change about `*glGetProcAddress()`
2 parents 6b01687 + c4e1cc2 commit 7a173af

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

platform/web/detect.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ def configure(env: "Environment"):
206206
env.Append(LINKFLAGS=["-s", "USE_WEBGL2=1"])
207207
# Allow use to take control of swapping WebGL buffers.
208208
env.Append(LINKFLAGS=["-s", "OFFSCREEN_FRAMEBUFFER=1"])
209+
# Breaking change since emscripten 3.1.51
210+
# https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3151---121323
211+
if cc_semver >= (3, 1, 51):
212+
# Enables the use of *glGetProcAddress()
213+
env.Append(LINKFLAGS=["-s", "GL_ENABLE_GET_PROC_ADDRESS=1"])
209214

210215
if env["javascript_eval"]:
211216
env.Append(CPPDEFINES=["JAVASCRIPT_EVAL_ENABLED"])

0 commit comments

Comments
 (0)