File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl App {
121
121
self . surface_config . width = new_size. width ;
122
122
self . surface . configure ( & self . device , & self . surface_config ) ;
123
123
let input_texture = self . renderer . create_input_texture ( & self . device ) ;
124
- self . render_pipeline . set_input_texture ( input_texture)
124
+ self . render_pipeline . set_input_texture ( input_texture) ;
125
125
}
126
126
pub fn queue ( & mut self ) {
127
127
let size = self . renderer . size ( ) ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ impl Renderer {
36
36
& self . image_buffer
37
37
}
38
38
39
- pub fn resize ( & mut self , new_size : winit :: dpi :: PhysicalSize < u32 > ) {
39
+ pub fn resize ( & mut self , new_size : PhysicalSize < u32 > ) {
40
40
warn ! (
41
41
"image buffer now has size: {}" ,
42
42
self . image_buffer. pixels( ) . len( )
Original file line number Diff line number Diff line change @@ -108,15 +108,13 @@ impl RenderPipeline {
108
108
. create_view ( & TextureViewDescriptor :: default ( ) )
109
109
}
110
110
pub fn prepare_bind_group ( & mut self , device : & Device ) {
111
- if self . bind_group . is_none ( ) {
112
- self . bind_group = Some ( device. create_bind_group ( & wgpu:: BindGroupDescriptor {
113
- label : Some ( "Render bind group" ) ,
114
- layout : & self . bind_group_layout ,
115
- entries : & [ wgpu:: BindGroupEntry {
116
- binding : 0 ,
117
- resource : wgpu:: BindingResource :: TextureView ( & self . input_texture_view ) ,
118
- } ] ,
119
- } ) ) ;
120
- }
111
+ self . bind_group = Some ( device. create_bind_group ( & wgpu:: BindGroupDescriptor {
112
+ label : Some ( "Render bind group" ) ,
113
+ layout : & self . bind_group_layout ,
114
+ entries : & [ wgpu:: BindGroupEntry {
115
+ binding : 0 ,
116
+ resource : wgpu:: BindingResource :: TextureView ( & self . input_texture_view ) ,
117
+ } ] ,
118
+ } ) ) ;
121
119
}
122
120
}
You can’t perform that action at this time.
0 commit comments