OpenB3D for Emscripten

BlitzMax Forums/MiniB3D Module/OpenB3D for Emscripten

angros47(Posted 2016) [#1]
Yes, I did it! I managed to get it to run on Emscripten, I merged the code with the standard version, and this is the result:

https://sourceforge.net/projects/minib3d/files/

By compiling with "make", it will build the standard library for Windows or Linux (there are only minor tweaks from the version 1.12). It will still use fixed function pipeline by default, to be compatible even with older adapters.

By compiling with "make web" (of course, Emscripten compiler must be installed, and the environment must be configured), it will produce a library that will work in a browser, using GLES2/WebGl, and building automatically a series of shader to emulate the fixed functions used by the standard version (including cubemapping, and multiple lights)


RustyKristi(Posted 2016) [#2]
wow this awesome angros47!! :D trying it now..


RustyKristi(Posted 2016) [#3]
I'm seeing only a OpenB3D.bc file when opening the tar.gz file.. :/


angros47(Posted 2016) [#4]
Yes, it is the library for emscripten. The source code is in:

https://sourceforge.net/projects/minib3d/files/OpenB3D%201.15%20src.tar.gz

You can use the .h files, that are part of the source code, to use the library in your projects


RustyKristi(Posted 2016) [#5]
Ok so I guess it is not blitzmax ready? which is kind of a problem since munch stopped maintaining the wrapper months ago.. :/

So there's no plan of continuing with a Blitzmax module which looks like a dead end..

NG's html build is not yet ready afaik and not sure if it uses emscripten as well.


angros47(Posted 2016) [#6]
Well, does BlitzMax have an Emscripten target? If not, this port would have been useless for BlitzMax anyway.

But, if I am not wrong, Monkey has support for Emscripten, so an OpenB3D port for it should open new possibilities


RustyKristi(Posted 2016) [#7]
Vanilla Blitzmax only has 3 targets, Win,Linux,Mac. NG has added Android support that's all.


angros47(Posted 2016) [#8]
It would need at least some tweaks in the #DEFINEs, to compile it on Android. But WebGL, is a subset of GLES2, so anything that can work using WebGL should work fine under GLES2


RustyKristi(Posted 2016) [#9]
nice. so are you going to continue with munch's wrapper? he already has some progress with GLES but it's not working atm..

https://github.com/markcwm/openb3d.mod/commit/aae3c8e5b3727eacb89e2353e35eff1edc69af3d


angros47(Posted 2016) [#10]
I am actually going to continue working on 'vanilla' OpenB3D, since it targets different languages, not just BlitzMax


RustyKristi(Posted 2016) [#11]
Ok good enough. I just don't understand why it is still under 'Blitzmax Modules' category since it is not an actual BlitzMax mod. It is kinda confusing don't you think? :-)

BlitzMax Modules Forums/MiniB3D/OpenB3D for Emscripten


Just saying..