Closed RobLoach closed 2 years ago
Seems to work for me with emcc
, thanks, merged!
I have also improved it to make sample effects to work and added to github pages. So you can view the demos on github in the following links:
Primitives sample - https://edubart.github.io/sokol_gp/sample-primitives.html Blending modes sample - https://edubart.github.io/sokol_gp/sample-blend.html Frame buffer sample - https://edubart.github.io/sokol_gp/sample-framebuffer.html Rectangle sample - https://edubart.github.io/sokol_gp/sample-rectangle.html Effect sample - https://edubart.github.io/sokol_gp/sample-effect.html SDF sample - https://edubart.github.io/sokol_gp/sample-sdf.html
This adds definitions for building for the web. You will need emcc installed. Also need to run a web server that supports
.wasm
file requests.Caveat
sample-effect's doesn't work since
load_image()
loads an image usingstbi_load()
. File system loading has to be switched to usesokol_fetch.h
instead of through straight up file system.