emscripten-core / emscripten-core/emscripten
Use OffscreenCanvas instead of `--proxy-to-worker`
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
I was trying to figure out how to get WORKERFS to work so I can read from `File` objects directly, and for that I needed my SDL application to run in a web worker. In order to do that I came across `--proxy-to-worker`, but ran into its limitations (e.g. it crashes on `createVertexArray` because [`getExtension('OES_vertex_array_object')` is not implemented](https://github.com/kripken/webgl-worker/blob/e64b0c6910cf8bb96b03517deab2f1f0f9377fbe/webGLWorker.js#L534)).
I was then wondering if `--proxy-to-worker` should be deprecated altogether, since we can now render to a WebGL OffscreenCanvas in a WebWorker directly. I'm still trying to figure out how to do this exactly, so maybe it's implemented already (`-s PROXY_TO_PTHREAD`?). In that case it might be good to update the documentation accordingly (and perhaps add a note to `--proxy-to-worker` that you shouldn't use it, and what the alternative is?). Thanks!!
Contributor guide
Assessment
This issue has not been assessed yet.