Page 1 of 1

[1.12.5] Emscripten sample build

Posted: Thu Feb 20, 2020 11:25 am
by Icedev
First the emscripten build is broken on al version and platform I have tested them : windows and linux.

Here is how to fix it on Linux platform with emsdk 1.39.7
instead of what is said here: https://ogrecave.github.io/ogre/api/1.1 ... -ogre.html
you have to replace

Code: Select all

emcmake cmake .. -DCMAKE_BUILD_TYPE=Release"
with

Code: Select all

emcmake cmake .. -DCMAKE_BUILD_TYPE=Release -DEMSCRIPTEN=1 -DOGRE_BUILD_COMPONENT_CSHARP=0 -DOGRE_BUILD_PLUGIN_DOT_SCENE=0 -DOGRE_BUILD_SAMPLES=1 -DOGRE_BUILD_COMPONENT_JAVA=0 -DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=0
Then you have to patch ogre/RenderSystems/GLSupport/src/EGL/Emscripten/OgreEmscriptenEGLWindow.cpp
In each emscripten function of the constructor/destructor, replace the first NULL argument with "#canvas"
Then launch the build:

Code: Select all

emmake make
You will then have a success build and a working sample.

Re: [1.12.5] Emscripten sample build

Posted: Thu Feb 20, 2020 12:13 pm
by paroj
does full-screen switching work? https://github.com/OGRECave/ogre/issues/1289

Re: [1.12.5] Emscripten sample build

Posted: Thu Feb 20, 2020 2:23 pm
by Icedev
No, It shows a black screen. The init of the call back in source code is commented and even uncommented it does not change anything.