Skip to content

Commit

Permalink
fix missing field window
Browse files Browse the repository at this point in the history
  • Loading branch information
yzx9 committed Sep 30, 2024
1 parent ad3d08b commit 9bcc14d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/beginner/tutorial2-surface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ Now that we've configured our surface properly, we can add these new fields at t
queue,
config,
size,
windows,
}
}
```
Expand Down
2 changes: 2 additions & 0 deletions docs/beginner/tutorial3-pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ struct State<'a> {
queue: wgpu::Queue,
config: wgpu::SurfaceConfiguration,
size: winit::dpi::PhysicalSize<u32>,
window: &'a Window,
// NEW!
render_pipeline: wgpu::RenderPipeline,
}
Expand Down Expand Up @@ -288,6 +289,7 @@ Self {
queue,
config,
size,
window,
// NEW!
render_pipeline,
}
Expand Down
5 changes: 5 additions & 0 deletions docs/beginner/tutorial4-buffer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Self {
queue,
config,
size,
window,
render_pipeline,
vertex_buffer,
}
Expand Down Expand Up @@ -261,6 +262,8 @@ impl<'a> State<'a> {
device,
queue,
config,
size,
window,
render_pipeline,
vertex_buffer,
num_vertices,
Expand Down Expand Up @@ -389,6 +392,7 @@ struct State<'a> {
queue: wgpu::Queue,
config: wgpu::SurfaceConfiguration,
size: winit::dpi::PhysicalSize<u32>,
window: &'a Window,
render_pipeline: wgpu::RenderPipeline,
vertex_buffer: wgpu::Buffer,
// NEW!
Expand All @@ -406,6 +410,7 @@ Self {
queue,
config,
size,
window,
render_pipeline,
vertex_buffer,
// NEW!
Expand Down
6 changes: 3 additions & 3 deletions docs/beginner/tutorial5-textures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ Now, let's create the `Texture`:
let texture_size = wgpu::Extent3d {
width: dimensions.0,
height: dimensions.1,
// All textures are stored as 3D, we represent our 2D texture
// by setting depth to 1.
depth_or_array_layers: 1,
};
let diffuse_texture = device.create_texture(
&wgpu::TextureDescriptor {
// All textures are stored as 3D, we represent our 2D texture
// by setting depth to 1.
size: texture_size,
mip_level_count: 1, // We'll talk about this a little later
sample_count: 1,
Expand Down Expand Up @@ -534,7 +534,7 @@ impl Texture {
..Default::default()
}
);

Ok(Self { texture, view, sampler })
}
}
Expand Down

0 comments on commit 9bcc14d

Please sign in to comment.