Hi Daniel, and nice to hear from you after such a long time!

You're right that a lot of Emscripten WebGL apps leave the context loss
handling at the default mode where the shell just says "context lost,
please reload the page". I guess for desktop uses this is because the
problem so rarely hits the user at the face that people don't bother (or
don't even know about it). For mobile applications proper context loss
handling is more important, because it happens more often when context
switching between apps.

If you have small test cases that you can throw at our way to reproduce the
bugs that you find, that would be the easiest.

Tested your page, and works perfectly for me!

   Jukka


2014-12-30 11:32 GMT+02:00 Daniel Horn <[email protected]>:

> Hey fine Emscripten folks:
>
> I thought you might be interested in a test platform/game a few of my
> colleagues and I put together at
>
> https://github.com/cookingclub/polarity
>
> It's the only open source Emscripten example that deals properly with
> context loss and restore
> as well as having all of SDL1, SDL2, and OpenGL build targets that all
> look identical in both WebGL and native under linux.
> It supports sprite rendering (with scaling, rotation and both per pixel
> with per-surface alpha), font rendering and lines.
>
> Compiled versions are available here: arrows to move, shift adjusts
> polarity:
> http://graphics.stanford.edu/~danielh/polarity/opengl/
> and
> http://graphics.stanford.edu/~danielh/polarity/sdl/
> and
> http://graphics.stanford.edu/~danielh/polarity/opengl/?debug=1 if you
> want to test Lose WebGL context in N calls
>
>
> We'd love it if anyone was able to use this as a starting point for their
> own future projects that were significantly more cross platform than other
> examples out there and properly handled context loss.
>
> Comments/Suggestions are appreciated!
>
> -Daniel
>
> PS: emscripten needs a number of simple one-line bug fixes to properly
> support context loss and restore and 1 simple fix to support font rendering
> under OpenGL.
> https://github.com/cookingclub/polarity/blob/master/emscripten_bugs.txt
> Luckily javascript is flexible enough that the bugfixes can be
> monkeypatched in during runtime :-) which we do
> PPS: I hope y'all keep the amazing support for the canvas-based libSDL in
> emscripten. It would be unfortunate to require WebGL for graphical
> emscripten apps.
> Or that if y'all go to SDL2 that you make it backed by canvas instead of
> WebGL (that's what the OpenGL target is for).
>
>  --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to