Jump to content

Unigine in webgl


photo

Recommended Posts

in this case, everything works except the file creation main.js. It creates a very small and does not collect  engine.

I'm trying to understand where is a problem

Link to comment

I m looking too the scons and it must be work, when i look your main.js for me there only main.cpp and GLESAppSDL.cpp inside nothing more, like the libs (extern & engine) are not added but i m not sure.

 

Link to comment

Hi Anton, i reinstall all the stuff on my Seven, for do some test, and at the end i have the same warning on unresolved symbol.

For me i never found the lib call Unigine_jsd_framework, Unigine_jsd_api and the other .... May be i  am missing something but the problem is here. Inside the evaluation kit, i am not found some .js or .so of Unigine.

 

I succesfully generate the externs lib and the main part but i have no trace of Unigine ....
 

Link to comment

Very sad. 2 previous version contained a theoretical possibility of creating applications for webGL. After all, it was necessary to add one of the missing folder in the lib ...

Link to comment

Dear unigine team. Maybe for the binary version you add compiled main.js, while the full source code will be able to Compile your own? I'd like to try this technology on real projects. If it turns out - I will be immensely grateful!

Link to comment
  • 2 weeks later...

The current situation with emscripten is stable. There are no serious problems in the modern browsers. So we will try to add WebGL binary in the upcoming SDK updates.

Link to comment
  • 2 months later...

Hi Frustum,

 

Do you recently make some test with Emscripten and WebCL, I was working with an older version of Unigine,

and i recently update both to the last version, and I have some trouble building Unigine. 

Do you have the same trouble ??

Tony

Link to comment

Genius guys from emscripten team declare several functions as defines:

#define isalpha(a) ((((unsigned)(a)|32)-'a') < 26)
#define isdigit(a) (((unsigned)(a)-'0') < 10)
 

It's break compilation because String class has isalpha and isdigit methods...

engine/utils/Str.h:111:14: error: expected member name or ';' after declaration specifiers

                static int isdigit(int code);

                ~~~~~~~~~~ ^

/Users/frustum/Work/Sources/webgl/emscripten/system/include/libc/ctype.h:26:23: note: expanded from macro 'isdigit'

#define isdigit(a) (((unsigned)(a)-'0') < 10)
Comment this defines from emscripten/system/include/libc/ctype.h file to fix:

/*#define isalpha(a) ((((unsigned)(a)|32)-'a') < 26)
#define isdigit(a) (((unsigned)(a)-'0') < 10)
#define islower(a) (((unsigned)(a)-'a') < 26)
#define isupper(a) (((unsigned)(a)-'A') < 26)
#define isprint(a) (((unsigned)(a)-0x20) < 0x5f)
#define isgraph(a) (((unsigned)(a)-0x21) < 0x5e)
*/
  • Like 1
Link to comment

Yep I found this problem because Alchemy & Duetto as the exact same problem.

My trouble was more about OpenGLES rendering? But I don't test with your last SDK yet :(

Tony

Link to comment
  • 2 weeks later...

Здравствуйте, Александр!

Следует полагать, вы сейчас работаете над версией unigine для браузера?

Значит ли это, что будет официальная поддержка встраивания в браузеры движка unigine?

 

 


 

Link to comment

There is WebGL version of the engine (at the alpha stage for now), we consider making it an official supported platform later.

At the moment stopping factors are compatibility problems with different browsers and limited availability of WebGL support in them.

Link to comment
  • 4 weeks later...

Hi !

Some problems compiling unigine webgl...

 

Running on : ubuntu 12.10 x86

Sdk : UnigineSDK_source_2013-10-01_linux

LLVM : RELEASE 3.2

Emscripten : version 1.7.5 (git - Tue Nov 12)

Compiled with : scons platform=webgl in source/app/WebGL

 

Error : (had to run 2 times before having this issue, first was strange error about GLESAppSDL.o not found)

 

DEBUG    root: will generate JavaScript
DEBUG    root: considering libcxx: we need set([]) and have set([])
DEBUG    root: considering libcextra: we need set([]) and have set([])
DEBUG    root: considering libcxxabi: we need set([]) and have set([])
DEBUG    root: considering sdl: we need set(['SDL_Init']) and have set([])
DEBUG    root: including libc
DEBUG    root: linking: ['/tmp/tmpVB4Rwe/main_0.o', '/tmp/tmpVB4Rwe/GLESAppSDL_1.o', '/tmp/tmpVB4Rwe/libUnigine_jsd_2.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_framework_3.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_physics_4.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_render_5.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_sound_6.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_node_7.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_gui_8.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_api_9.so', '/home/christophe/.emscripten_cache/libc.bc']
DEBUG    root: emcc: llvm-linking: ['/tmp/tmpVB4Rwe/main_0.o', '/tmp/tmpVB4Rwe/GLESAppSDL_1.o', '/tmp/tmpVB4Rwe/libUnigine_jsd_2.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_framework_3.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_physics_4.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_render_5.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_sound_6.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_node_7.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_gui_8.so', '/tmp/tmpVB4Rwe/libUnigine_jsd_api_9.so', '/home/christophe/.emscripten_cache/libc.bc'] to /tmp/tmpVB4Rwe/main.bc
0  llvm-link       0x0831a328
1  llvm-link       0x0831a704
2  libpthread.so.0 0xb779ff38
3  llvm-link       0x080bf2f1
4  llvm-link       0x080b5285
5  llvm-link       0x080b52df
6  llvm-link       0x080b5844
7  llvm-link       0x080bcd84 llvm::WriteBitcodeToFile(llvm::Module const*, llvm::raw_ostream&) + 5492
8  llvm-link       0x080a4602 main + 1650
9  libc.so.6       0xb74cc4d3 __libc_start_main + 243
10 llvm-link       0x080a6df1
Stack dump:
0. Program arguments: /home/christophe/Devel/Compilation/llvm32build/bin/llvm-link /tmp/tmpVB4Rwe/main_0.o /tmp/tmpVB4Rwe/GLESAppSDL_1.o /tmp/tmpVB4Rwe/libUnigine_jsd_2.so /tmp/tmpVB4Rwe/libUnigine_jsd_framework_3.so /tmp/tmpVB4Rwe/libUnigine_jsd_physics_4.so /tmp/tmpVB4Rwe/libUnigine_jsd_render_5.so /tmp/tmpVB4Rwe/libUnigine_jsd_sound_6.so /tmp/tmpVB4Rwe/libUnigine_jsd_node_7.so /tmp/tmpVB4Rwe/libUnigine_jsd_gui_8.so /tmp/tmpVB4Rwe/libUnigine_jsd_api_9.so /home/christophe/.emscripten_cache/libc.bc -o /tmp/tmpVB4Rwe/main.bc 
Traceback (most recent call last):
  File "/home/christophe/Devel/Compilation/emscripten/emcc", line 1589, in <module>
    shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'), force_archive_contents = len(filter(lambda temp: not temp.endswith(STATICLIB_SUFFIXES), temp_files)) == 0)
  File "/home/christophe/Devel/Compilation/emscripten/tools/shared.py", line 1095, in link
    assert os.path.exists(target) and (output is None or 'Could not open input file' not in output), 'Linking error: ' + output
AssertionError: Linking error: 
scons: *** [app/WebGL/main.js] Error 1
 
Ideas ? Am I doing something wrong ?
Link to comment
  • 3 weeks later...

Hi, 

Just in case if @unigine crew do some test with webgl, I found some bug recently with Unigine and Emscripten.

First it's when you use thread script, there are some trouble with thread parameter, if you have thread function like InternClass::mythread(InternClass class, string filename), the typeof of the second parameter is InternClass not string.

Second, I patch freetype for test asm_js, but it doesn't work anymore, do you successfully make it work with asm_js ( I make it work but long time ago, not recently ) ??

Third it's the more problematic, When i launch Unigine i receive a lot of OpenGLES error: invalid value. 

 

enumerror.png



 

Link to comment

Hi, Just for keep you updated, I successfully build Unigine with ASM_JS enabled. There was a regression inside emscripten, now fix inside the incoming branch.
It's necessary to patch free type because the lib contains some error inside.

In the previous post the loading of the shop was taking 20 sec, now with ASM_JS enabled the loading take 9 sec. It's pretty cool :)

Link to comment
  • 8 months later...

Hi, I know the support of WebGL is deprecated, Anyway, I test the OpenAL part of Unigine.

 

I just make a pull request on emscripten repository for add some missing function :

 

https://github.com/kripken/emscripten/pull/2648

 

I make a little patch of the sound part of Unigine, it's working only for static sound not stream :

https://www.dropbox.com/s/omdsqh6ceh4xjcl/OpenALSoundPatch.zip

 

Enjoy :)

Link to comment
×
×
  • Create New...