glyphy icon indicating copy to clipboard operation
glyphy copied to clipboard

Emscription demo

Open behdad opened this issue 8 years ago • 7 comments

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.

behdad avatar Apr 26 '16 22:04 behdad

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

jamesgk avatar Apr 27 '16 00:04 jamesgk

Ah, thanks. Fixed the URL.

behdad avatar Apr 27 '16 05:04 behdad

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.

ActuallyaDeviloper avatar Aug 05 '16 14:08 ActuallyaDeviloper

Oh wow. I see the same results on Windows 10 with GTX 950M. Still looks fine on all browsers in Linux and OSX though.

jamesgk avatar Aug 06 '16 18:08 jamesgk

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

behdad avatar Aug 08 '16 21:08 behdad

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.

ActuallyaDeviloper avatar Aug 09 '16 12:08 ActuallyaDeviloper

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)

ebraminio avatar Mar 04 '18 18:03 ebraminio