Emscripten port
Re: Emscripten port
createDevice is one of the startup functions so it looks like the irrlicht library for emscripten is not properly build or linked.
-
- Posts: 2
- Joined: Fri Aug 24, 2018 11:34 pm
Re: Emscripten port
Thanks, I will experiment with the compilation.
Re: Emscripten port
https://github.com/netpipe/IrrlichtDemo ... emscripten uses codeblocks to make the result very streamlined and easy.
http://www.netpipe.ca/games/test.html
https://github.com/netpipe/IrrlichtDemo ... /emRagdoll
http://www.netpipe.ca/games/SoftBody.html
http://www.netpipe.ca/games/test.html
https://github.com/netpipe/IrrlichtDemo ... /emRagdoll
http://www.netpipe.ca/games/SoftBody.html
Last edited by netpipe on Fri May 29, 2020 10:12 pm, edited 2 times in total.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
made setup very easy and enjoyable , was thinking about making a scripted app/game launcher also a custom webpage format that is animated and easy to make sites for. please message me if interested in helping.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
Last edited by netpipe on Sun May 31, 2020 4:52 pm, edited 3 times in total.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
new demo added, the EMMath http://www.netpipe.ca/apps/math/test.html resulting wasm was 40 mb not sure what changed from the other demos
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
i got the EmCPython compile working but when i add
-s EMULATE_FUNCTION_POINTER_CASTS=1 to irrlicht compile it says
FuncCastEmulation::NUM_PARAMS needs to be at least FuncCastEmulation::NUM_PARAMS needs to be at least 1717
https://i.imgur.com/wkgf8sD.png
-s EMULATE_FUNCTION_POINTER_CASTS=1 to irrlicht compile it says
FuncCastEmulation::NUM_PARAMS needs to be at least FuncCastEmulation::NUM_PARAMS needs to be at least 1717
https://i.imgur.com/wkgf8sD.png
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
Can't say I remember any functions in Irrlicht with 1717 parameters :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Emscripten port
https://i.imgur.com/46tehnn.png spark engine is working nicely
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
https://github.com/netpipe/emscripten-projects a little collection of working libs for emscripten.
Last edited by netpipe on Fri May 29, 2020 10:26 pm, edited 1 time in total.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
also i have SDL_audio compiled and working for emscripten now http://netpipe.ca/apps/sam/Pong.html
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Emscripten port
was able to fix FuncCastEmulation::NUM_PARAMS needs to be at least FuncCastEmulation::NUM_PARAMS needs to be at least 1717 by using latest opengl-es branch of irrlicht.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
-
- Posts: 386
- Joined: Sun May 11, 2014 12:13 am
Re: Emscripten port
Not sure when this started happening as I'm on an entirely new PC now and don't have my old one, but Irrlicht is crashing on Emscripten when I remove an element that has children. Here's the stack trace:
Trying to debug it but I'm not entirely sure yet...
EDIT:
So I traced it all the way back to this code:
Once I'm done with an image I don't want it sitting in cached memory so I remove it. The webassembly apparently does not like this, but everything else is fine with it (Windows, Mac, Linux, Android, and iOS don't complain)
Code: Select all
exception thrown: RuntimeError: memory access out of bounds,RuntimeError: memory access out of bounds
at irr::IReferenceCounted::drop() const (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[486]:0x1b3f3)
at irr::gui::CGUIImage::~CGUIImage() (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[21709]:0x805dc1)
at irr::gui::CGUIImage::~CGUIImage().1 (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[21711]:0x805ea7)
at irr::gui::CGUIImage::~CGUIImage().2 (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[21714]:0x806021)
at virtual thunk to irr::gui::CGUIImage::~CGUIImage().3 (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[21716]:0x806108)
at irr::IReferenceCounted::drop() const (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[486]:0x1b44f)
at irr::gui::IGUIElement::removeChild(irr::gui::IGUIElement*) (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[560]:0x2253d)
at irr::gui::IGUIElement::remove() (http://127.0.0.1:8887/EmscriptenApp.wasm:wasm-function[562]:0x2289b)
printErr @ EmscriptenApp.html:316
handleException @ EmscriptenApp.js:4320
callUserCallback @ EmscriptenApp.js:4444
runIter @ EmscriptenApp.js:4497
Browser_mainLoop_runner @ EmscriptenApp.js:4403
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
requestAnimationFrame (async)
requestAnimationFrame @ EmscriptenApp.js:4812
Browser_mainLoop_scheduler_rAF @ EmscriptenApp.js:4263
Browser_mainLoop_runner @ EmscriptenApp.js:4416
EmscriptenApp.js:4321 Uncaught RuntimeError: memory access out of bounds
at irr::IReferenceCounted::drop() const (EmscriptenApp.wasm:0x1b3f3)
at irr::gui::CGUIImage::~CGUIImage() (EmscriptenApp.wasm:0x805dc1)
at irr::gui::CGUIImage::~CGUIImage().1 (EmscriptenApp.wasm:0x805ea7)
at irr::gui::CGUIImage::~CGUIImage().2 (EmscriptenApp.wasm:0x806021)
at virtual thunk to irr::gui::CGUIImage::~CGUIImage().3 (EmscriptenApp.wasm:0x806108)
at irr::IReferenceCounted::drop() const (EmscriptenApp.wasm:0x1b44f)
at irr::gui::IGUIElement::removeChild(irr::gui::IGUIElement*) (EmscriptenApp.wasm:0x2253d)
at irr::gui::IGUIElement::remove() (EmscriptenApp.wasm:0x2289b)
EDIT:
So I traced it all the way back to this code:
Code: Select all
ITexture* curTex = ((IGUIImage*)this->b)->getImage();
driver->removeTexture(curTex);