From 71d85d536f97d77546b9227c2792a7fb353245ac Mon Sep 17 00:00:00 2001 From: Ben Hansen Date: Tue, 19 May 2020 11:47:59 -0600 Subject: [PATCH] added warning in depth tutorial --- docs/beginner/tutorial8-depth/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/beginner/tutorial8-depth/README.md b/docs/beginner/tutorial8-depth/README.md index e0d7340a..39fc22a2 100644 --- a/docs/beginner/tutorial8-depth/README.md +++ b/docs/beginner/tutorial8-depth/README.md @@ -136,6 +136,8 @@ fn resize(&mut self, new_size: winit::dpi::PhysicalSize) { } ``` +Make sure you update the `depth_texture` *after* you update `sc_desc`. If you don't, your program will crash as the `depth_texture` will be a different size than the `swap_chain` texture. + The last change we need to make is in the `render()` function. We've created the `depth_texture`, but we're not currently using it. We use it by attaching it to the `depth_stencil_attachment` of a render pass. ```rust