Crates.io | xmath |
lib.rs | xmath |
version | 0.2.9 |
source | src |
created_at | 2015-07-07 15:49:18.679928 |
updated_at | 2023-06-03 15:37:59.81312 |
description | Rust port of Microsoft DirectXMath |
homepage | https://github.com/simnalamburt/xmath |
repository | https://github.com/simnalamburt/xmath |
max_upload_size | |
id | 2554 |
size | 72,114 |
Rust port of Microsoft DirectXMath. Documentation
[dependencies]
xmath = "0.2"
xmath supports glium out of the box, but because of its compilation time
it is disabled by default. To use xmath with glium, you can enable it in
Cargo.toml
.
[dependencies]
xmath = { version = "0.2", features = ["glium-support"] }
let uniforms = uniform! {
matrix: Matrix::orthographic(width as f32/10.0, height as f32/10.0, 0.0, 1.0)
};
target.draw(&unit.vb, &unit.ib, program, uniforms, &draw_parameters);