From 7467e30b833415154f2dcfa6743aabd105d1491d Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Sun, 8 Jun 2014 18:50:40 -0300 Subject: [PATCH] Forgot a piece of README-nacl.txt --- README-nacl.txt | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README-nacl.txt b/README-nacl.txt index c9adb2e1936c0..6a452998bd149 100644 --- a/README-nacl.txt +++ b/README-nacl.txt @@ -28,6 +28,10 @@ path can't be modified externally, so the linker won't find SDL's binaries unles you dump them into the SDK path, which is inconvenient). Also provided in test/nacl is the required support file, such as index.html, manifest.json, etc. +SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure. +This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem), +hiding the asynchronous nature of the browser behind the scenes...which is not the +same as making it dissapear! ================================================================================ @@ -59,10 +63,24 @@ RWOps and nacl_io SDL_RWops work transparently with nacl_io. Two functions are provided to control mount points: + int SDL_NaClMount(const char* source, const char* target, + const char* filesystemtype, + unsigned long mountflags, const void *data); + int SDL_NaClUmount(const char *target); - For convenience, SDL will by default -mount an httpfs tree at / before calling the app's main function. Such setting -can be overriden by calling SDL_NaCl + For convenience, SDL will by default mount an httpfs tree at / before calling +the app's main function. Such setting can be overriden by calling: + + SDL_NaClUmount("/"); + +And then mounting a different filesystem at / + +It's important to consider that the asynchronous nature of file operations on a +browser is hidden from the application, effectively providing the developer with +a set of blocking file operations just like you get in a regular desktop +environment, which eases the job of porting to Native Client, but also introduces +a set of challenges of its own, in particular when big file sizes and slow +connections are involved. For more information on how nacl_io and mount points work, see: