1
0
Fork 0
mutter-performance-source/examples
Robert Bragg 9ef37423fc emscripten-hello: improve mainloop integration
Instead of simply relying on the emscripten mainloop api to wake us up
periodically so that we can poll for SDL events we now pause the
emscripten mainloop whenever no redraw is queued and instead hook an
input event listener into the real browser mainloop to resume the
emscripten mainloop whenever input is received. This way the example
can go to sleep while there's no input to handle.

This provides a simple example of binding custom javascript into native
code.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit a8b1e2eda491dc7c44c84cd47e160c7b8ba0f792)
2013-05-29 19:30:44 +01:00
..
android/hello examples: Fix the first colour in the triangle_vertices 2013-04-22 13:01:45 +01:00
cogl-crate.c Move event polling into CoglRenderer 2013-04-30 16:39:31 +01:00
cogl-emscripten-hello.c emscripten-hello: improve mainloop integration 2013-05-29 19:30:44 +01:00
cogl-gles2-context.c examples: Fix the first colour in the triangle_vertices 2013-04-22 13:01:45 +01:00
cogl-gles2-gears.c Fix a warning about ‘sincos’ in examples/cogl-gles2-gears 2013-04-23 18:30:54 +01:00
cogl-hello.c examples: Fix the first colour in the triangle_vertices 2013-04-22 13:01:45 +01:00
cogl-info.c Adds initial Emscripten support to Cogl 2013-05-29 19:30:44 +01:00
cogl-msaa.c Move event polling into CoglRenderer 2013-04-30 16:39:31 +01:00
cogl-sdl-hello.c examples: Fix the first colour in the triangle_vertices 2013-04-22 13:01:45 +01:00
cogl-sdl2-hello.c examples: Fix the first colour in the triangle_vertices 2013-04-22 13:01:45 +01:00
cogl-x11-foreign.c Move event polling into CoglRenderer 2013-04-30 16:39:31 +01:00
cogl-x11-tfp.c Adds CoglError api 2013-01-22 17:47:39 +00:00
cogland.c cogland: Listen for Expose events when Cogl is using X 2013-05-13 17:32:34 +01:00
crate.jpg Adds another example that draws a 3D crate 2011-06-30 14:33:11 +01:00
emscripten-example-js-library.js emscripten-hello: improve mainloop integration 2013-05-29 19:30:44 +01:00
emscripten-example-js.h emscripten-hello: improve mainloop integration 2013-05-29 19:30:44 +01:00
Makefile.am emscripten-hello: improve mainloop integration 2013-05-29 19:30:44 +01:00