From 6cb43e8e61262e50918624071130ac7d3d83107f Mon Sep 17 00:00:00 2001 From: matthew Date: Thu, 8 Oct 2020 20:04:56 -0400 Subject: [PATCH 1/2] set_vertex_buffer doesn't expect a reference --- docs/beginner/tutorial4-buffer/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/beginner/tutorial4-buffer/README.md b/docs/beginner/tutorial4-buffer/README.md index 48e11717..20b64618 100644 --- a/docs/beginner/tutorial4-buffer/README.md +++ b/docs/beginner/tutorial4-buffer/README.md @@ -198,7 +198,7 @@ One more thing: we need to actually set the vertex buffer in the render method o // render() render_pass.set_pipeline(&self.render_pipeline); // NEW! -render_pass.set_vertex_buffer(0, &self.vertex_buffer.slice(..)); +render_pass.set_vertex_buffer(0, self.vertex_buffer.slice(..)); render_pass.draw(0..3, 0..1); ``` From 64fa3c901761559309e8c5f822eb4cdeee2a2485 Mon Sep 17 00:00:00 2001 From: matthew Date: Thu, 8 Oct 2020 20:15:01 -0400 Subject: [PATCH 2/2] more --- docs/beginner/tutorial4-buffer/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/beginner/tutorial4-buffer/README.md b/docs/beginner/tutorial4-buffer/README.md index 20b64618..f1c1285c 100644 --- a/docs/beginner/tutorial4-buffer/README.md +++ b/docs/beginner/tutorial4-buffer/README.md @@ -369,8 +369,8 @@ 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_index_buffer(&self.index_buffer.slice(..)); // 1. +render_pass.set_vertex_buffer(0, self.vertex_buffer(..)); +render_pass.set_index_buffer(self.index_buffer.slice(..)); // 1. render_pass.draw_indexed(0..self.num_indices, 0, 0..1); // 2. ```