Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chances/wgpu-d

Repository files navigation

wgpu-d

DUB Package wgpu-d CI codecov

D bindings to wgpu-native as an idiomatic wrapper around the library.

Targets wgpu-native v0.17.0.2.

Usage

"dependencies": {
 "wgpu-d": "0.3.1"
}

Examples

You can try the examples before installing:

Headless

dub run wgpu-d:headless

Triangle

dub run wgpu-d:triangle

Cube

dub run wgpu-d:cube

Development

Bindings to wgpu.h are generated dynamically on your host system and loaded by D with ImportC. See the wgpu Makefile task. The wgpu task is automatically performed as a Dub pre-generate command.

Testing

The unit test executable is patched (patchelf for Posix and install_name_tool for mac OS) to correct the library load path such that libwgpu is found.

See this StackOverflow answer.

Upgrading wgpu-native

  1. make clean
  2. Bump the version constraint in subprojects/wgpu.Makefile.
  3. dub test
  4. Ensure the examples compile:
    • dub build wgpu-d:headless
    • dub build wgpu-d:triangle
    • dub build wgpu-d:cube
  5. Fix any errors in the idiomatic wrapper

About

Idiomatic D wrapper around wgpu-native.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /