Skip to content

AE1020/nanogui-GLES-wasm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nanogui GLES wasm

what is it this is fork of nanogui modified for WASM and GLES (nanovg and nanogui source files modified)

live demo link

Building

$ git clone https://github.com/libigl/eigen.git ext/eigen
$ make

Problems

  • WARNING I found problem with lambda in WASM, I think it work same way like in Java, in Java "local variables referenced from a lambda expression must be final or effectively final", I mean using any setCallback method you need make all variables Global (include object that call setCallback) or you can not call "callback" from other classes/functions (outside of creation function)
  • std::thread (pthread) support in wasm disabled check this
  • asserts in wasm does not fit C asserts
  • glGetError() has too much errors, better skip checking
  • exceptions to build with -s DISABLE_EXCEPTION_CATCHING=0

pthread nanogui can be builded in wasm with pthreads -s USE_PTHREADS=2 -s PTHREAD_POOL_SIZE=10 need to remove while(true) loop from threads (common.cpp line 79) building with pthread give you (much)less FPS and 100% processor usage, to launch it you need use old browser like firefox 57

About

nanogui port for GLES and WASM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 75.8%
  • C 24.2%