All Projects → danilw → nanogui-GLES-wasm

danilw / nanogui-GLES-wasm

Licence: other
nanogui port for GLES and WASM

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to nanogui-GLES-wasm

SaltyNES
A NES emulator in WebAssembly
Stars: ✭ 69 (+86.49%)
Mutual labels:  wasm
ugo-compiler-book
📚 µGo语言实现(从头开发一个迷你Go语言编译器)[Go版本+Rust版本]
Stars: ✭ 996 (+2591.89%)
Mutual labels:  wasm
v6.dooring.public
可视化大屏解决方案, 提供一套可视化编辑引擎, 助力个人或企业轻松定制自己的可视化大屏应用.
Stars: ✭ 323 (+772.97%)
Mutual labels:  webgl2
wasm-toolchain
WebAssembly toolchain
Stars: ✭ 34 (-8.11%)
Mutual labels:  wasm
landlord
Magic: The Gathering mulligan and card draw simulator
Stars: ✭ 16 (-56.76%)
Mutual labels:  wasm
MudBlazor.Markdown
Markdown component based on the MudBlazor environment
Stars: ✭ 30 (-18.92%)
Mutual labels:  wasm
rocket-yew-starter-pack
Example boilerplate for websites in pure Rust
Stars: ✭ 77 (+108.11%)
Mutual labels:  wasm
wasmsign2
PoC implementation of the WebAssembly Modules Signatures proposal.
Stars: ✭ 18 (-51.35%)
Mutual labels:  wasm
spherro
Smooth particle hydrodynamics fluid simulator
Stars: ✭ 35 (-5.41%)
Mutual labels:  wasm
wasm-ops
Chart of WebAssembly Instructions
Stars: ✭ 46 (+24.32%)
Mutual labels:  wasm
geopattern-rs
Beautiful generative geometric images from a string, based on @jasonlong's geo_pattern, with a WASM demo
Stars: ✭ 44 (+18.92%)
Mutual labels:  wasm
css-inline
Inline CSS into style attributes
Stars: ✭ 96 (+159.46%)
Mutual labels:  wasm
webgl-memory
A library to track webgl-memory
Stars: ✭ 248 (+570.27%)
Mutual labels:  webgl2
wasp
WebAssembly module decoder in C++
Stars: ✭ 88 (+137.84%)
Mutual labels:  wasm
wasm-linker-js
A simple WebAssembly Linker in JavaScript
Stars: ✭ 14 (-62.16%)
Mutual labels:  wasm
Astar
The dApp hub for blockchains of the future
Stars: ✭ 533 (+1340.54%)
Mutual labels:  wasm
safenetwork-gitportal
p2p git portal - a decentralised alternative to github
Stars: ✭ 12 (-67.57%)
Mutual labels:  wasm
fullstack-rust
Reference implementation of a full-stack Rust application
Stars: ✭ 39 (+5.41%)
Mutual labels:  wasm
jasper
🧳 Single-binary packaging for Ruby applications that supports native and Wasm targets
Stars: ✭ 29 (-21.62%)
Mutual labels:  wasm
vrcpu
Code, documentation, schematics, notes for my Ben Eater inspired breadboard computer and emulator
Stars: ✭ 98 (+164.86%)
Mutual labels:  wasm

This is archived, and not supported! If you look for updates look on other forks example github.com/AE1020 or make your own repository with all updates you need.

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

$ cd ext
$ git clone https://github.com/libigl/eigen.git
$ cd ..
$ em++ -DNANOVG_GLES3_IMPLEMENTATION -DGLFW_INCLUDE_ES3 -DGLFW_INCLUDE_GLEXT -DNANOGUI_LINUX -Iext/nanovg/ ext/nanovg.c --std=c++11 -O3 -lGL -lGLU -lm -lGLEW -s USE_GLFW=3 -s FULL_ES3=1 -s USE_WEBGL2=1 -o nanovg.bc
$ em++ -DNANOVG_GLES3_IMPLEMENTATION -DGLFW_INCLUDE_ES3 -DGLFW_INCLUDE_GLEXT -DNANOGUI_LINUX -Iinclude/ -Iext/nanovg/ -Iext/eigen/ button.cpp checkbox.cpp colorpicker.cpp colorwheel.cpp combobox.cpp common.cpp glcanvas.cpp glutil.cpp graph.cpp imagepanel.cpp imageview.cpp label.cpp layout.cpp messagedialog.cpp popup.cpp popupbutton.cpp progressbar.cpp screen.cpp serializer.cpp slider.cpp stackedwidget.cpp tabheader.cpp tabwidget.cpp textbox.cpp theme.cpp vscrollpanel.cpp widget.cpp window.cpp nanogui_resources.cpp nanovg.bc --std=c++11 -O3 -lGL -lGLU -lm -lGLEW -s USE_GLFW=3 -s FULL_ES3=1 -s USE_WEBGL2=1 -s WASM=1 -o nanogui.bc
$ mkdir build
$ em++ -DNANOVG_GLES3_IMPLEMENTATION -DGLFW_INCLUDE_ES3 -DGLFW_INCLUDE_GLEXT -DNANOGUI_LINUX -Iinclude/ -Iext/nanovg/ -Iext/eigen/ nanogui.bc example1.cpp --std=c++11 -O3 -lGL -lGLU -lm -lGLEW -s USE_GLFW=3 -s FULL_ES3=1 -s USE_WEBGL2=1 -s WASM=1 -o build/nanogui.html --preload-file ./icons

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].