1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Disable *glGetProcAddress() on the web

This commit is contained in:
David Snopek
2024-06-22 15:55:48 -05:00
parent 8a6c1e8f52
commit 8e242fe7c1
3 changed files with 8 additions and 5 deletions

View File

@@ -207,11 +207,10 @@ def configure(env: "SConsEnvironment"):
env.Append(LINKFLAGS=["-sMAX_WEBGL_VERSION=2"])
# Allow use to take control of swapping WebGL buffers.
env.Append(LINKFLAGS=["-sOFFSCREEN_FRAMEBUFFER=1"])
# Breaking change since emscripten 3.1.51
# https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3151---121323
# Disables the use of *glGetProcAddress() which is inefficient.
# See https://emscripten.org/docs/tools_reference/settings_reference.html#gl-enable-get-proc-address
if cc_semver >= (3, 1, 51):
# Enables the use of *glGetProcAddress()
env.Append(LINKFLAGS=["-sGL_ENABLE_GET_PROC_ADDRESS=1"])
env.Append(LINKFLAGS=["-sGL_ENABLE_GET_PROC_ADDRESS=0"])
if env["javascript_eval"]:
env.Append(CPPDEFINES=["JAVASCRIPT_EVAL_ENABLED"])