WASM: Allow clients to enable pthreads.
Filament does not yet fully support threads with WASM, but this is a baby step in that direction. To enable experimental pthreads support, enable the WEBGL_PTHREADS CMake option. This will enable pthreads support in `gltfio` and `utils`, which is known to work, but not when served with GitHub Pages. The web server must emit COOP, COEP and CORP headers, so our build instructions now recommend the use of `emrun` for local testing. This also changes our demos so that they do not use unpkg, which does not work when using `emrun`, due to cross-origin restrictions.
This commit is contained in:
@@ -303,6 +303,8 @@ public:
|
||||
return mParallelSplitCount;
|
||||
}
|
||||
|
||||
size_t getThreadCount() const { return mThreadCount; }
|
||||
|
||||
private:
|
||||
// this is just to avoid using std::default_random_engine, since we're in a public header.
|
||||
class default_random_engine {
|
||||
|
||||
Reference in New Issue
Block a user