Skip to content

kekland/wgpu_dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wgpu_dart

(Experimental stuff! Only using it for my own projects. Putting it out as a separate repository in case anyone else finds it useful. No promises about stability or API design.)

Bindings for WebGPU and wgpu_native for Dart/Flutter.

Developed as a part of motif (https://github.com/kekland/motif).

Currently only targets native platforms, but the codegen can be extended to support web as well. Outputting to a Flutter Texture is only implemented for macOS/iOS, but it should be possible to support other platforms.

package:wgpu uses build hooks to link the wgpu_native library with some of the platform-related code under packages/wgpu/src. To download the libraries, you should first run packages/wgpu/tool/download_wgpu_native.py.

wgslgen

An opinionated code generator for WGSL shaders. Point it at a WGSL source file and it will generate a Dart file with methods to instantiate the pipeline and buffers in a type safe (and hopefully efficient) way.

Reflection is using wgsl_reflect (https://github.com/brendan-duncan/wgsl_reflect).

Usage: dart run wgslgen path/to/shader.wgsl -o output.dart

About

bindings and codegen for wgpu_native

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors