github.com/chances/wgpu-crystal

Bindings to wgpu-native for the Crystal programming language

17 stars
1 dependent
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  wgpu:
    github: chances/wgpu-crystal
    version: ~> 0.9.2

Then run:

shards install

shard.yml

Crystal
>= 0.28.0, < 2.0
License
MIT
Author
Chance Snow <git@chancesnow.me>

Dependencies

Runtime Dependencies

  • future~> 1.0.0github: crystal-community/future.cr

Development Dependencies

  • ameba~> 0.14.3github: crystal-ameba/amebadev
  • clang*github: crystal-lang/clang.cr, branch: masterdev
  • stumpy_png~> 5.0github: stumpycr/stumpy_pngdev
  • baked_file_system0.10.0github: schovi/baked_file_systemdev

README

# wgpu-crystal

[![wgpu.cr v0.9.2](https://img.shields.io/badge/shards-v0.9.2-important)](https://shards.info/github/chances/wgpu-crystal)
[![wgpu.cr CI](https://github.com/chances/wgpu-crystal/actions/workflows/ci.yml/badge.svg)](https://github.com/chances/wgpu-crystal/actions/workflows/ci.yml)
[![wgpu.cr license: MIT](https://img.shields.io/badge/license-MIT-informational)](https://github.com/chances/wgpu-crystal/blob/master/LICENSE)

Bindings to [gfx-rs/wgpu-native](https://github.com/gfx-rs/wgpu-native) for the [Crystal](https://crystal-lang.org/) programming language.

## Installation

1. Add the dependency to your `shard.yml`:

   ```yaml
   dependencies:
     wgpu:
      github: chances/wgpu-crystal
   ```

2. Run `shards install`

## Usage

```crystal
require "wgpu"

# TODO: Write usage instructions here
```

See the [wgpu-native Usage instructions](https://github.com/gfx-rs/wgpu-native#usage).

## Development

TODO: Write development instructions here

### Running examples

#### Headless

`make example-headless`

#### Headless Triangle

`make example-triangle`

#### Windowed Triangle

TODO: Add a windowed example

Ensure [glfw3](https://formulae.brew.sh/formula/glfw) is installed.

`make example-glfw-triangle`

## Contributing

1. Fork it ([https://github.com/chances/wgpu-crystal/fork](https://github.com/chances/wgpu-crystal/fork))
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Contributors

- [Chance Snow](https://github.com/chances) - creator and maintainer