[1.12.5] Emscripten sample build

Minor issues with the Ogre API that can be trivial to fix
Post Reply
Icedev
Gnoblar
Posts: 8
Joined: Thu Sep 22, 2011 10:31 am

[1.12.5] Emscripten sample build

Post 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.

paroj
OGRE Team Member
OGRE Team Member
Posts: 1121
Joined: Sun Mar 30, 2014 2:51 pm
x 403
Contact:

Re: [1.12.5] Emscripten sample build

Post by paroj »

does full-screen switching work? https://github.com/OGRECave/ogre/issues/1289

Icedev
Gnoblar
Posts: 8
Joined: Thu Sep 22, 2011 10:31 am

Re: [1.12.5] Emscripten sample build

Post 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.

Post Reply