Merge pull request #91 from axe312ger/glsl-emscripten

[WIP] GLSL via emscripten
This commit is contained in:
Mischa Spiegelmock
2018-08-01 13:27:09 +03:00
committed by GitHub
2 changed files with 12 additions and 11 deletions

View File

@ -4,7 +4,6 @@ ${my_CFLAGS} \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-I${top_srcdir}/src/libprojectM \
-I${top_srcdir}/src/libprojectM/Renderer \
USE_SDL=2 \
${SDL_CFLAGS}
REALSRCDIR=${top_srcdir}/src/projectM-sdl
@ -14,5 +13,3 @@ projectW_bc_SOURCES = $(REALSRCDIR)/pmSDL.cpp $(REALSRCDIR)/projectM_SDL_main.cp
projectW_bc_LDADD = ${SDL_LIBS} ${top_srcdir}/src/libprojectM/libprojectM.la
projectW_bc_LDFLAGS = -static -s USE_SDL=2
projectW_bc_PROGRAM = projectW.bc
# emcc -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1 projectW.bc -o projectW.html

View File

@ -1,15 +1,19 @@
Building w/ emscripten
* Activate the emsdk
## Crepare
* Activate the emsdk (https://github.com/juj/emsdk#installation-instructions)
* make sure you are in the root directory of this project
* on fresh repositories: `./autogen.sh`
## Compile
* `emconfigure ./configure --enable-emscripten --enable-gles --enable-sdl`
* `emmake make -j4`
## Create wasm & html files
* `cd src/projectM-emscripten`
* `emcc -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1 projectW.bc -o projectW.html`
Does not work? Try:
emcc -I../libprojectm -I../libprojectM/Renderer -Llib \
../libprojectM/KeyHandler.cpp projectM_SDL_emscripten.cpp \
-lRenderer -lprojectM -lMilkdropPresetFactory -lprojectM -lRenderer \
-s USE_SDL=2 -s LEGACY_GL_EMULATION=1 \
-o build/projectEM.html
* `mkdir vendor && cp /usr/local/Cellar/glm/xx/include/glm ./vendor/`
* `emmake make -j4 -lvendor`