obj-rs cargo-i travis-i

Wavefront obj parser for Rust. It handles both .obj and .mtl formats. Documentation

toml [dependencies.obj-rs] git = "https://github.com/simnalamburt/obj-rs" features = ["glium-support"] ```rust use std::fs::File; use std::io::BufReader; use obj::*;

let input = BufReader::new(File::open("tests/fixtures/dome.obj").unwrap()); let dome: Obj = load_obj(input).unwrap();

// Do whatever you want dome.vertices; dome.indices; ```

img

This sample image is pretty good illustration of current status of obj-rs. obj-rs is currently able to load position and normal data of obj but not texture & material data yet.

Glium support

obj-rs supports glium out of the box. See example for further details.

```rust use glium::*;

let input = BufReader::new(File::open("rilakkuma.obj").unwrap()); let bear: Obj = load_obj(input).unwrap();

let vertexbuffer = VertexBuffer::new(&display, bear.vertices); let indexbuffer = IndexBuffer::new(&display, index::TrianglesList(bear.indices)); ```


BSD 2-Clause