/learn-gfx-hal

Step by step tutorials for gfx-hal

Primary LanguageBatchfileApache License 2.0Apache-2.0

License:Apache2 AppVeyor travis.ci

gfx-hal:0.1

learn-gfx-hal

Step by step tutorials for using the gfx-hal crate.

The tutorials all target the current version on crates.io, not on the master branch of git. At the time of me writing this that means 0.1.0.

This is not intended to be a library crate for you to just import into your own projects. It is a series of examples and explanations for you read and learn from.

  • Fully working examples are in the examples/ directory. Each example attempts to be a single file that works on its own, so in some cases the code style isn't quite what you'd want on a full project (eg: shader code contained in string literals instead of saved in separate files).
  • The lessons are in the book/ directory in markdown form. They can be rendered to HTML with mdbook, and the GitHub Pages site for this repository hosts a rendered version of the master branch.

Requirements

Uses shaderc-rs, please follow their setup instructions.

  • Regarding msys2 on Windows: Note that the first time you run the pacman command they list it doesn't install the packages. Instead it actually just installs the latest pacman and msys files. You have to then run the pacman command again to make it actually download the stuff (and if you ran it from within the msys2 terminal you have to close that terminal and open a new one).
    • Yes, that is totally stupid, but it is also real advice that you must follow in this, the year of our lord two thousand and nineteen, if you want to program 3D graphics programs on windows.
  • When they say "the msys2 mingw64 binary path" they mean C:\msys64\usr\bin and C:\msys64\mingw64\bin (assuming that you installed to C:\msys64).

Contribution

This repo is Apache 2 licensed and all of your contributions must be made under that license.

Disclaimer

Hello. The primary author quixotic fool of this project is me, Lokathor. I explain things in a way that beginners can hopefully understand by not actually knowing anything about it myself. I get advice and guidance from the gfx-rs team when writing each lesson, but the final editorial sign off is mine, and and crazy or stupid opinions that you find here are mine alone, not any fault of theirs.

If there are mistakes that have crept in anywhere please file an issue. You can also attempt to contact me interactively on the #gamedev channel of the community discord.