From 3f2607e66359de2edd58ff7773d0c45070e5cf27 Mon Sep 17 00:00:00 2001 From: Ben Hansen Date: Fri, 28 Aug 2020 19:59:04 -0600 Subject: [PATCH] forgot some stuff --- docs/beginner/tutorial4-buffer/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/beginner/tutorial4-buffer/README.md b/docs/beginner/tutorial4-buffer/README.md index 96b0709d..f9f25e33 100644 --- a/docs/beginner/tutorial4-buffer/README.md +++ b/docs/beginner/tutorial4-buffer/README.md @@ -160,7 +160,11 @@ wgpu::VertexBufferDescriptor { } ``` -While this is definitely nice, it wouldn't work +While this is definitely nice, we would have to change the lifetime on `wgpu::VertexBufferDescriptor` to `'static` as rust wouldn't compile the code because the result of `vertex_attr_array` is a temporary value, which we can't return from a function. + +Beyond that, I feel it's good to show how the data gets mapped, so I'll forgo using this macro for now. + + Now we can use it when we create the `render_pipeline`.