Skip to content

Commit

Permalink
Merge pull request #87981 from adamscott/add-emscripten--sgl_enable_g…
Browse files Browse the repository at this point in the history
…et_proc_address-linker-flag

Fix emscripten 3.1.51 breaking change about `*glGetProcAddress()`
  • Loading branch information
akien-mga committed Feb 5, 2024
2 parents 9a63aed + 5922ac0 commit d335281
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/web/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit d335281

Please sign in to comment.