-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make headless-gl context aware #182
base: master
Are you sure you want to change the base?
Conversation
@robertleeplummerjr with more work, is this something that'd be useful in gpu.js? In your project, I see references to workers, but they look like browser workers, and not Node.js Worker Threads. |
We test against web workers currently. However, this would be a very useful addition. When this is added, we'll be sure to add tests to showcase the feature. |
loads the package in both main thread and worker thread. demonstrates two ways of running gl with worker threads - in series, or in parallel. The parallel segfaults currently
The good news is that I suspect part of the problem may be global/static data being accessed across threads, specifically headless-gl/src/native/webgl.cc Lines 7 to 10 in 8667ce0
If that were somehow addressed, I wonder if the Angle library itself would work as expected. Scouring the Angle project's forums, it seems that Angle (at least our version) is not thread-safe. So perhaps this feature is a fool's errand? |
Hello, has this plan been terminated? I want to use gl on the main process of Electron 22+, but it is currently not feasible. After consulting a lot of information, I couldn't solve it, probably because of this: |
For use in workers, etc.
See
To do:
Closes #151