Horde3D
http://horde3d.org/forums/

Horde3D emscripten
http://horde3d.org/forums/viewtopic.php?f=8&t=2309
Page 1 of 1

Author:  mikel [ 25.08.2018, 04:39 ]
Post subject:  Horde3D emscripten

This is a fork of https://github.com/attilaz/horde3d-x/tree/gles2_d3d11 which is based on horde3d beta5. This can be compiled to js/wasm with emscripten.

https://github.com/bosoni/Horde3D_em

Author:  Irdis [ 26.08.2018, 12:05 ]
Post subject:  Re: Horde3D emscripten

Hello. Good work. I've also worked on emscripten support earlier with ES3 backend that is not yet uploaded. I see that you've made your own framework for samples - it's probably good because current sample framework in v1.0 has problems with pointers to parent classes in emscripten. If you wish I can pull request the current ES3 backend to develop branch so that you can work on the latest code base. The backend still has some problems, but it works with emscripten.

Author:  rasteron [ 13.09.2018, 00:08 ]
Post subject:  Re: Horde3D emscripten

yes, nice and interesting work there mikel! I'm assuming the skybox/dds loading problem is related to the horde3d-x port?

Image

good job, keep it up!

Author:  mikel [ 19.09.2018, 17:24 ]
Post subject:  Re: Horde3D emscripten

Thanks Irdis and rasteron :)

@Irdis Sure, it would be nice to have horde3d-develop with ES3 backend (ES2 would be nice too but maybe too much work to merge these). Actually horde3d-x and horde3d-emscripten have only few modifications (at core code), it is almost the same.
My little framework (using sdl2) works with develop branch (quicker develop with normal OS and IDE and now and then compile it with emscripten (and add #ifdef's when needed).

@rasteron
"I'm assuming the skybox/dds loading problem is related to the horde3d-x port?"
I'm not sure, havent have time to check, I think it is because of some unavailable extension or so (like shadows, those worked on android but something missing in webgl).
I know dds can be loaded and used too with webgl (babylon.js, three3d.js).
I tested years ago horde3d-x with android but dont remember if I used skymap/reflection.

I havent touched the code quite a while, I'm learning opencv and raspi3 and so, but maybe someday I will once again check these all again.

Cheers :)

Author:  rasteron [ 02.07.2019, 04:42 ]
Post subject:  Re: Horde3D emscripten

Just got back and I see the gles2 desktop version works w/o any problems and yes it could be the issue with missing extensions or maybe decompressing dds textures on Android? I just read it somewhere related, but not entirely sure.

In the meantime, perhaps a good workaround would be just a standard skybox shader with 6 separate images in jpg/tga format?

Author:  Irdis [ 04.07.2019, 20:19 ]
Post subject:  Re: Horde3D emscripten

Horde currently supports ES3 backend in the develop branch. Emscripten is not yet done, but is planned for final 2.0 release. Es3 backend fully supports etc2 and astc compression.

Author:  rasteron [ 05.07.2019, 13:26 ]
Post subject:  Re: Horde3D emscripten

Irdis wrote:
Horde currently supports ES3 backend in the develop branch. Emscripten is not yet done, but is planned for final 2.0 release. Es3 backend fully supports etc2 and astc compression.


That's good to know. Any chance there will be support for ES2 as well? If there will plans for Android/iOS targets then it would be nice to have this at least to reach more older targets (but not too old). or is it compatible also with ES2 devices?

Author:  Irdis [ 05.07.2019, 16:48 ]
Post subject:  Re: Horde3D emscripten

Currently I'm adding support for Android and Ios. As for ES2 - practically all devices, even low end, that are released now support es 3.1 or 3.2. Most middle-end devices from 2015 support ES 3.0. WebGL 2 also suggests using ES 3. And using es2 requires a lot of hacks and extensions in order to support common Horde functionality. So, currently I have no plans to support es2 backend.

Author:  rasteron [ 09.07.2019, 01:49 ]
Post subject:  Re: Horde3D emscripten

Irdis wrote:
Currently I'm adding support for Android and Ios. As for ES2 - practically all devices, even low end, that are released now support es 3.1 or 3.2. Most middle-end devices from 2015 support ES 3.0. WebGL 2 also suggests using ES 3. And using es2 requires a lot of hacks and extensions in order to support common Horde functionality. So, currently I have no plans to support es2 backend.


That's great. Too bad it won't be supported and instead of getting out of topic here in mikel's thread, I would be posting some thoughts re this on a new separate thread. Thanks!

Author:  gwald [ 18.01.2024, 08:59 ]
Post subject:  Re: Horde3D emscripten

Thanks for this repo.
It works but the current emcc has a issue with this line:
gRDI->setShaderConst( _defColorShader.uni_worldMat, CONST_FLOAT44, &Matrix4f().x[0] );

/Source/Horde3DEngine/egRenderer.cpp:2009:69: error: cannot take the address of an rvalue of type 'float'

I dont know why, but it doesn't like that way of sending the float array, this worked fine:
gRDI->setShaderConst( _defColorShader.uni_worldMat, CONST_FLOAT44, Matrix4f().x );

And thanks for the makefiles I was wondering how to bypass cmake, I a lot easier!




I spoke too soon, it's missing a few GL functions somewhere.

Anyway its still a good guide to h3d and emscripten.

Code:

warning: undefined symbol: glBlitFramebufferANGLE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: glCompressedTexImage3DOES (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: glFramebufferTexture2DMultisampleEXT (referenced by root reference (e.g. compiled C/C++ code)
)
warning: undefined symbol: glRenderbufferStorageMultisampleANGLE (referenced by root reference (e.g. compiled C/C++ code
))
warning: undefined symbol: glRenderbufferStorageMultisampleEXT (referenced by root reference (e.g. compiled C/C++ code))

warning: undefined symbol: glTexImage3DOES (referenced by root reference (e.g. compiled C/C++ code))
emcc: warning: warnings in JS library compilation [-Wjs-compiler]

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/