Rust wrapper around bgfx, providing a clean, safe API for rust applications.
Note: This is a fork of rhoot/bgfx-rs, which is no longer maintained. This may also end up unmaintained, but let's give it a shot anyways.
- License: ISC
- Documentation: rhoot/bgfx-rs
| OS | Requirements |
|---|---|
| Windows (MSVC) | Rust, VS2017, VS2015, or VS2013 with the standard C++ tools [1]. |
| Windows (GNU) | Rust, MinGW?, Some GnuWin32 Utilities |
| Linux | Rust, G++ 4.8?, Make, OpenGL and X11 dev packages |
| Windows UWP | Rust and BGFX have support, needs implementing though. |
| Android | Rust and BGFX have support, needs implementing though. |
| iOS | Rust and BGFX have support, needs implementing though. |
| OS X | Rust and BGFX have support, needs implementing though. |
| Windows Phone | BGFX has support, but Microsoft has sunset this platform. |
- The x86 compiler may require an opt-in individual component in some VS versions.
- See also bgfx's build docs.
bx,bimg, andgeniedependencies can be ignored as they're handled via submodules.
For working on this project, I also recommend grabbing Git, VS Code, and installing the workspace recommended extensions, rust-lang.rust and ms-vscode.cpptools.
- If you haven't already, install VS2017 w/ Desktop C++ Tools, VS Code, and Git
- Open a
cmdprompt- Run
git clone --recurse-submodules https://github.com/MaulingMonkey/bgfx-rs.gitto get the full source code, or rungit submodule update --initif you already had a partial checkout. - Run
code bgfx-rsto open VS Code in the right folder.
- Run
- Consider installing workspace recommended extensions (
Ctrl+Shift+Xto open the Extensions tab) - Press
F5toStart Debugging - Press
Enterto select the default example,00-helloworld, when VS Code prompts you - Profit! Set breakpoints, step through code, inspect variables, etc.
Just use the regular cargo commands:
cargo run --example 00-helloworld
cargo run --example 01-cubes
OSX Note: There is currently no really clean way to exit the examples in
OSX, and closing the window may in fact cause a crash. This is due to
limitations in glutin (specifically #468 and #520). This only
effects the examples, and not the crate itself. The best way of closing them
is to simply Ctrl-C in the console.
Copyright (c) 2015-2016, Johan Sköld
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.