samdauwe / webgpu-native-examples

Collection of C-language examples that demonstrate basic rendering and computation in WebGPU native.
Apache License 2.0
373 stars 21 forks source link

how to support opengl bakend? #7

Open Joyzen opened 1 year ago

Joyzen commented 1 year ago

I'm using WSL2 Ubuntu on windows11 which can't support vulkan api so far! I tried to disable vulkan and enable opengl options,but it seems useless.

samdauwe commented 1 year ago

Hi Joyzen,

I did not try to get the examples working with an OpenGL backend, at the moment only Vulkan backend is supported.

To support OpenGL backend you could try the following steps.

  1. Try the Google Dawn examples on WSL2 Ubuntu on windows11, the examples should support the OpenGL backend.
  2. The Vulkan code in this project is based on the example code of the Google Dawn examples, so you could try adding a new OpenGL backend in the wgpu-native lib. based on the Google Dawn example code.

Hope it helps. Sam

Joyzen commented 1 year ago

@samdauwe thank you so much for your careful advice.I'm really appreciate your idea and working on this project. I am a web programmer but I'm very interested in google's Dawn which could bring WebGPU across the Web to the native.And I will continue to find how to make this available on WSL2 Ubuntu.