Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscription demo #17

Open
behdad opened this issue Apr 26, 2016 · 7 comments
Open

Emscription demo #17

behdad opened this issue Apr 26, 2016 · 7 comments

Comments

@behdad
Copy link
Owner

behdad commented Apr 26, 2016

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.

@jamesgk
Copy link
Collaborator

jamesgk commented Apr 27, 2016

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

@behdad
Copy link
Owner Author

behdad commented Apr 27, 2016

Ah, thanks. Fixed the URL.

@ActuallyaDeviloper
Copy link

ActuallyaDeviloper commented Aug 5, 2016

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.

@jamesgk
Copy link
Collaborator

jamesgk commented Aug 6, 2016

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

@behdad
Copy link
Owner Author

behdad commented Aug 8, 2016

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:
#18

@ActuallyaDeviloper
Copy link

ActuallyaDeviloper commented Aug 9, 2016

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.

@ebraminio
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants