glyphy
glyphy copied to clipboard
Emscription demo
A while back I got emscription demo going again. Unfortunately the HTML wrapper does not handle retina displays, so it looks bad on such devices. And it's not sexy like http://wdobbie.com/pdf/ but thought I just put a link here in case someone wants to give it some love.
http://behdad.github.io/glyphy-emscripten/glyphy-demo.html
I should write up instructions for compiling.
The posted link is broken for me (fragment shader failed to compile). But the following is working:
http://behdad.github.io/glyphy-emscripten/glyphy-demo.html
Ah, thanks. Fixed the URL.
Unfortunately the web demo freezes on Firefox (after "Enter: link_program") and looks terrible on Chrome. I made a screenshot of the problem: http://www.imagenetz.de/img.php?file=9700029a2e.png
I am using Windows 8 and a GTX 760 graphics card.
Oh wow. I see the same results on Windows 10 with GTX 950M. Still looks fine on all browsers in Linux and OSX though.
Such artefacts typically come from driver bugs or low preceision of floats in the hardware (or both).
In this case though, I think Firefox and Chrome both compile GL ES shaders to D3D using a piece of code called Angle. It might be a but in code that produces (maybe missing precision clause).
If someone can build the native (non-web) version and try, we can narrow down the bug: https://github.com/behdad/glyphy/pull/18
The desktop version appears to work fine.
Btw. it's great that he provides Visual Studio Solution files that just work without any terrible Cmake hassle. Not many projects manage to achieve that.
After lots of tests and struggle, glyphy emscripten compile instruction:
NOCONFIGURE=1 ./autogen.sh
CPPFLAGS='-s USE_FREETYPE=1' LDFLAGS='-s USE_FREETYPE=1' emconfigure ./configure
emmake make EXEEXT=.html GL_LIBS= GLUT_LIBS=
The final result will be located on demo/.libs/glyphy-demo.html
(not demo/glyphy-demo.html
)