Coder Social home page Coder Social logo

tlively / learn-gfx-hal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dylan-dpc-zz/learn-gfx-hal

0.0 3.0 0.0 3.76 MB

Step by step tutorials for gfx-hal

Home Page: https://lokathor.github.io/learn-gfx-hal/

License: Apache License 2.0

Batchfile 100.00%

learn-gfx-hal's Introduction

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.

  • 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.
  • The 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 code examples are not meant to be taken alone. There is effectively zero explanation within the code files themselves. You are absolutely encouraged to read the lesson text that goes with each example.

Learning More

The lessons here mostly focus on the particulars of how to get the output you want with gfx-hal. Some information on graphical techniques in general will eventually be covered, but I can only cover so much material so fast.

If you want a whole lot more about general graphical stuff there's a large number of free books on the RealTimeRendering.com website. It's mostly their older editions, but the math for ray tracing or lighting or whatever else is all is still accurate enough. Once you know enough about how gfx-hal does things you should be able to pick any book off of that list and convert the techniques shown (usually C++ and OpenGL) over into your own code (Rust and gfx-hal).

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.

learn-gfx-hal's People

Contributors

aleksijuvani avatar aoowweenn avatar bors[bot] avatar dylan-dpc avatar fu5ha avatar grovesnl avatar hecrj avatar jackmott avatar lokathor avatar mahulst avatar nopey avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.