summaryrefslogtreecommitdiff
path: root/examples/Makefile.am
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2013-05-13 13:28:15 +0100
committerRobert Bragg <robert@linux.intel.com>2013-05-29 19:30:44 +0100
commit9ef37423fcfe863523f185f1ee671f7aa3f9883e (patch)
treeb6586bb33026b7903e1a22ab84498491277acbef /examples/Makefile.am
parent0e7a632e139611b63b188d9a4a3a49e296d93ea3 (diff)
downloadcogl-9ef37423fcfe863523f185f1ee671f7aa3f9883e.tar.gz
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)
Diffstat (limited to 'examples/Makefile.am')
-rw-r--r--examples/Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 404920af..332fa137 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -105,7 +105,7 @@ endif
if USING_EMSCRIPTEN
%.html: %.o $(top_builddir)/cogl/.libs/libcogl2.so $(top_builddir)/deps/glib/.libs/libglib.a
- $(CC) $(AM_CFLAGS) $(CFLAGS) -o $@ $^
+ $(CC) $(AM_CFLAGS) $(CFLAGS) --js-library $(top_srcdir)/examples/emscripten-example-js-library.js -o $@ $^
all-local: $(addsuffix .html, $(programs))
endif