emscripten-core / emscripten-core/emscripten
Feature Request: USE_GLFW + PROXY_TO_PTHREAD + OFFSCREENCANVAS_SUPPORT
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Overview**
Current version of emscripten seems not to support `USE_GLFW + PROXY_TO_PTHREAD + OFFSCREENCANVAS_SUPPORT` linker flang combination.
**Current Status**
The application built with the flags, `USE_GLFW + PROXY_TO_PTHREAD`, will succeed, but gives following error:
Code:
```
function _glfwInit() {
// ...
window.addEventListener("gamepadconnected", GLFW.onGamepadConnected, true); // this line
}
```
Error:
```
window is not defined
```
Almost functions of GLFW can be proxied to the main thread. However, with the additional flag `OFFSCREENCANVAS_SUPPORT`, another runtime error occurs:
```
Cannot set width of placeholder canvas transferred to OffscreenCanvas.
```
I think this error means that canvas size modification should be done in the worker thread.
Contributor guide
Assessment
This issue has not been assessed yet.