update README

This commit is contained in:
maik klein 2016-12-09 21:01:44 +01:00
parent 9b656a0591
commit c83346aa70
6 changed files with 8 additions and 3 deletions

View file

@ -110,7 +110,12 @@ You can find the examples [here](https://github.com/MaikKlein/ash/tree/master/ex
### [Triangle](https://github.com/MaikKlein/ash/blob/master/examples/src/main.rs)
Currently only runs under Linux (x11) and requires GLFW, the LunarG Validation layers, a Vulkan library. Ports for other operating systems are in progress. (Currently the GLFW wrapper only wraps the low level x11 bindings)
The triangle example is written from top to bottom without many helper functions and external dependencies. It renders a color triangle.
The triangle example is written from top to bottom without many helper functions or external dependencies. It renders a colored triangle. The shaders a written in GLSL and compiled into SPIR-V with [glslang](https://github.com/KhronosGroup/glslang)
```
cd examples
cargo run
```
![screenshot](http://i.imgur.com/PQZcL6w.jpg)

View file

@ -592,8 +592,8 @@ fn main() {
slice.copy_from_slice(&vertices);
device.unmap_memory(vertex_input_buffer_memory);
device.bind_buffer_memory(vertex_input_buffer, vertex_input_buffer_memory, 0).unwrap();
let vertex_spv_file = File::open(Path::new("vert.spv")).expect("Could not find vert.spv.");
let frag_spv_file = File::open(Path::new("frag.spv")).expect("Could not find frag.spv.");
let vertex_spv_file = File::open(Path::new("shader/vert.spv")).expect("Could not find vert.spv.");
let frag_spv_file = File::open(Path::new("shader/frag.spv")).expect("Could not find frag.spv.");
let vertex_bytes: Vec<u8> = vertex_spv_file.bytes().filter_map(|byte| byte.ok()).collect();
let vertex_shader_info = vk::ShaderModuleCreateInfo {