------------------------------------------------------------------------------
| 625 | |
| 626 | //------------------------------------------------------------------------------ |
| 627 | void vtkWebGPUConfiguration::ProcessEvents() |
| 628 | { |
| 629 | #if defined(__EMSCRIPTEN__) |
| 630 | vtkWebGPUConfigurationInternals::Instance.ProcessEvents(); |
| 631 | if (emscripten_has_asyncify()) |
| 632 | { |
| 633 | // gives a chance for webgpu callback code to execute |
| 634 | emscripten_sleep(1); |
| 635 | } |
| 636 | else |
| 637 | { |
| 638 | vtkErrorMacro(<< "This build of VTK cannot run asynchronous javascript code synchronously." |
| 639 | "Please compile VTK with ASYNCIFY or JSPI."); |
| 640 | } |
| 641 | #else |
| 642 | vtkWebGPUConfigurationInternals::Instance.ProcessEvents(); |
| 643 | #endif |
| 644 | } |
| 645 | |
| 646 | //------------------------------------------------------------------------------ |
| 647 | vtkWebGPUConfiguration::BackendType vtkWebGPUConfiguration::GetBackendInUse() |
no outgoing calls