LearnWebGPU-Code icon indicating copy to clipboard operation
LearnWebGPU-Code copied to clipboard

Not GLFW, using HTML OffscreenCanvas do multi-threads rendering?

Open xrui94 opened this issue 1 year ago • 2 comments

There is an example for multi-threads rendering based on html OffscreenCanvas by calling wgpu-native?

xrui94 avatar May 10 '24 09:05 xrui94

I do not have such example, but if you do find one I'd be interested in having a look at it!

eliemichel avatar May 16 '24 05:05 eliemichel

I do not have such example, but if you do find one I'd be interested in having a look at it!

Yes, I recently wrote a test demo that shows how to write C++ code and draw triangles using webgl and webgpu in the OffscreenCanvas, multi-threads environment. This is my project:

https://github.com/xrui94/test_webgl_webgpu_offscreencanvas

Note: Instead of wgpu-native and dawn, the webgpu implementation "webgpu_cpp. h" provided by emscripten was used in my test_webgl_webgpu_offscreencanvas project. If you want to see using wgpu-native to achieve the goals described in this issue, you can check out my another project: https://github.com/xrui94/iEngine. However, there are still some problems with this repository, and I am still looking for solutions. If you have a idea to help me solve them, then thank you very much.

xrui94 avatar May 31 '24 05:05 xrui94