REVIEWED: PLATFORM_WEB build flags, added GL_ENABLE_GET_PROC_ADDRESS

Reviewed flags formating
This commit is contained in:
Ray 2024-02-05 21:12:57 +01:00
parent 6a8cc62b67
commit ea31bd47e5
3 changed files with 59 additions and 55 deletions

View file

@ -306,11 +306,12 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# -sASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
# -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
# -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
# -sGL_ENABLE_GET_PROC_ADDRESS # enable using the *glGetProcAddress() family of functions, required for extensions loading
# --profiling # include information for code profiling
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# --preload-file resources # specify a resources folder for data compilation
# --source-map-base # allow debugging in browser with source map
LDFLAGS += -s USE_GLFW=3 -s TOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -s FORCE_FILESYSTEM=1
LDFLAGS += -sUSE_GLFW=3 -sTOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -sFORCE_FILESYSTEM=1 -sGL_ENABLE_GET_PROC_ADDRESS
# Build using asyncify
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)

View file

@ -253,11 +253,12 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
# -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
# -sEXPORTED_RUNTIME_METHODS=ccall # require exporting some LEGACY_RUNTIME functions, ccall() is required by miniaudio
# -sGL_ENABLE_GET_PROC_ADDRESS # enable using the *glGetProcAddress() family of functions, required for extensions loading
# --profiling # include information for code profiling
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# --preload-file resources # specify a resources folder for data compilation
# --source-map-base # allow debugging in browser with source map
LDFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s EXPORTED_RUNTIME_METHODS=ccall
LDFLAGS += -sUSE_GLFW=3 -sASYNCIFY -sEXPORTED_RUNTIME_METHODS=ccall -sGL_ENABLE_GET_PROC_ADDRESS
# NOTE: Simple raylib examples are compiled to be interpreter with asyncify, that way,
# we can compile same code for ALL platforms with no change required, but, working on bigger

View file

@ -353,12 +353,14 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# -sUSE_PTHREADS=1 # multithreading support
# -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
# -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
# -sGL_ENABLE_GET_PROC_ADDRESS # enable using the *glGetProcAddress() family of functions, required for extensions loading
# --profiling # include information for code profiling
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# --preload-file resources # specify a resources folder for data compilation
ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
CFLAGS += -sASSERTIONS=1 --profiling
endif
CFLAGS += -sGL_ENABLE_GET_PROC_ADDRESS
endif
ifeq ($(PLATFORM),PLATFORM_ANDROID)
# Compiler flags for arquitecture