Fix WebGL2 for web build (raylib 5 requires VAOs)
Add -sUSE_WEBGL2=1 -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 to both EMCC_CFLAGS and linker flags. raylib 5.x enables VAOs by default which require WebGL2; without it glVertexAttribPointer fails on the clientside property of an undefined VAO object. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,5 +7,7 @@ rustflags = [
|
||||
"-C", "link-arg=-sWASM=1",
|
||||
"-C", "link-arg=-sALLOW_MEMORY_GROWTH=1",
|
||||
"-C", "link-arg=-sINITIAL_MEMORY=67108864",
|
||||
"-C", "link-arg=-sFULL_ES3=1",
|
||||
"-C", "link-arg=-sUSE_WEBGL2=1",
|
||||
"-C", "link-arg=-sMIN_WEBGL_VERSION=2",
|
||||
"-C", "link-arg=-sMAX_WEBGL_VERSION=2",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user