From 5572e36e0cc69cbca9006ce70d2deb1ece2c8f3e Mon Sep 17 00:00:00 2001 From: kejor Date: Thu, 8 Oct 2020 20:33:02 -0500 Subject: [PATCH] Adding missing parameter on tutorial5 snippet Added parameter `&queue` to `texture::Texture::from_bytes` call. --- docs/beginner/tutorial5-textures/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/beginner/tutorial5-textures/README.md b/docs/beginner/tutorial5-textures/README.md index 905f9be7..f52591ad 100644 --- a/docs/beginner/tutorial5-textures/README.md +++ b/docs/beginner/tutorial5-textures/README.md @@ -513,7 +513,7 @@ The texture creation code in `new()` gets a lot simpler. ```rust let diffuse_bytes = include_bytes!("happy-tree.png"); -let diffuse_texture = texture::Texture::from_bytes(&device, diffuse_bytes, "happy-tree.png").unwrap(); +let diffuse_texture = texture::Texture::from_bytes(&device, &queue, diffuse_bytes, "happy-tree.png").unwrap(); ``` Creating the `diffuse_bind_group` changes slightly to use the `view` and `sampler` fields of our `diffuse_texture`.