update README
This commit is contained in:
parent
9b656a0591
commit
c83346aa70
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue