Fix a type in the code example

Was missing the `slice` method
pull/136/head
Aleksey Halahan 3 years ago committed by GitHub
parent 19c99e28d0
commit ad0515bdfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -402,7 +402,7 @@ All we have to do now is update the `render()` method to use the `index_buffer`.
```rust
// render()
render_pass.set_pipeline(&self.render_pipeline);
render_pass.set_vertex_buffer(0, self.vertex_buffer(..));
render_pass.set_vertex_buffer(0, self.vertex_buffer.slice(..));
render_pass.set_index_buffer(self.index_buffer.slice(..)); // 1.
render_pass.draw_indexed(0..self.num_indices, 0, 0..1); // 2.
```

Loading…
Cancel
Save