emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

WebGL Worker question

Open HendrixString opened this issue 7 years ago • 2 comments

hi @kripken , thank you very much for this project !!!

I have a few questions regarding WebGlWorker polyfill:

  1. does it work with Modularize=1 option ? I ask because I keep seeing Module. in the related WebGLClient.js and proxyClient.js. May I speculate it won't matter executing my code ?
  2. is there a simple way/method to be notified when rendering a frame is complete ? or should I hack that ?
  3. I would like to call JS function(defined on main thread) from C code (that will run in a Worker). will that work ? will it be proxied ?

all the best Tomer

HendrixString avatar Dec 25 '18 10:12 HendrixString

Possibly those modes are not compatible (I wouldn't be surprised, as modularize was created later, and does add some requirements of the JS). But in general, that proxying code is not the current focus of development - see the PROXY_TO_WORKER mode, which runs the main program on a pthread, and proxies WebGL etc. as needed. That needs multithreading support in browsers, which is not in all browsers yet, though.

I wouldn't say the proxy-to-worker mode is deprecated, but I'm not aware of anyone working to improve it at this point.

kripken avatar Dec 25 '18 18:12 kripken

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

stale[bot] avatar Dec 25 '19 19:12 stale[bot]