missed "y is down" in tutorial4

pull/29/head
Ben Hansen 4 years ago
parent 2fb06b49fb
commit 6bd7d714e8

@ -34,8 +34,6 @@ const VERTICES: &[Vertex] = &[
We arrange the vertices in counter clockwise order: top, bottom left, bottom right. We do it this way partially out of tradition, but mostly because we specified in the `rasterization_state` of the `render_pipeline` that we want the `front_face` of our triangle to be `wgpu::FrontFace::Ccw` so that we cull the back face. This means that any triangle that should be facing us should have it's vertices in counter clockwise order.
Another thing to note is that the y coordinate is negative for up and positive for down. This may seem weird to those of you coming from an OpenGL perspective, or even more traditional mathematics, but it's actually quite common for down to be positive on the y axis in graphics. We can change this later using a projection matrix, but we'll leave it as is for now.
Now that we have our vertex data, we need to store it in a buffer. Let's add a `vertex_buffer` field to `State`.
```rust

Loading…
Cancel
Save