Skip to content
Anthony Liot edited this page Dec 10, 2013 · 7 revisions

WebCL-Translator embed the incoming branch version of Emscripten, It's updated frequently.

If you want use your own Emscripten (master branch), just follow this step:

Emscripten Part

  1. Download Emscripten here
  2. Follow the install instruction

WebCL Part

  1. Download opencl headers and add it inside ./emscripten/system/include/CL/

  2. Download library_opencl.js and add it inside ./emscripten/src/

  3. Change inside emscripten/src/moudle.js the LibraryManger.load function line 412 by :

     load: function() {
       if (this.library) return;
    
       var libraries = ['library.js', 'library_path.js', 'library_fs.js', 'library_idbfs.js', 'library_memfs.js', 'library_nodefs.js', 'library_sockfs.js', 'library_tty.js', 'library_browser.js', 'library_sdl.js', 'library_gl.js', 'library_glut.js', 'library_xlib.js', 'library_egl.js', 'library_gc.js', 'library_jansson.js', 'library_openal.js', 'library_glfw.js', 'library_opencl.js'].concat(additionalLibraries);
       for (var i = 0; i < libraries.length; i++) {
         eval(processMacros(preprocess(read(libraries[i]))));
       }
    
       this.loaded = true;
     },
    
  4. Add inside emscripten/src/settings.js :

     var OPENCL_DEBUG = 0;
     var OPENCL_GRAB_TRACE = 0;
     var OPENCL_PRINT_TRACE = 0;
     var OPENCL_PROFILE = 0;
     var OPENCL_CHECK_SET_POINTER = 0;
     var OPENCL_CHECK_VALID_OBJECT = 0;
    

Now, you have an emscripten version who include the WebCL-translator. You are ready to build your own demo, go the the Tutorial !

Clone this wiki locally