Skip to content

Commit

Permalink
Update how we communicate resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Jul 6, 2023
1 parent d815828 commit 03166f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ impl<'a> Gui<'a> {
self.gfx_renderer.draw_content(
&mut frame,
&mut self.rcp_output,
&self.rcp.rdp.output_dimensions,
draw_data,
)?;

Expand Down
6 changes: 2 additions & 4 deletions src/gui/wgpu_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ impl<'a> Renderer<'a> {
self.surface_config.height = height.max(1);
self.surface.configure(&self.device, &self.surface_config);
self.depth_texture = create_depth_texture(&self.surface_config, &self.device);
self.graphics_device
.resize(&self.surface_config, &self.device);
self.graphics_device.resize([width, height]);
}

pub fn get_current_texture(&mut self) -> Option<Frame> {
Expand All @@ -198,7 +197,6 @@ impl<'a> Renderer<'a> {
&mut self,
frame: &mut Frame,
rcp_output: &mut RCPOutput,
output_size: &OutputDimensions,
imgui_draw_data: &imgui::DrawData,
) -> anyhow::Result<()> {
let frame_texture = frame
Expand Down Expand Up @@ -239,7 +237,7 @@ impl<'a> Renderer<'a> {
.process_rcp_output(&self.device, &self.queue, self.surface_config.format, rcp_output);

// Draw the RCP output
self.graphics_device.draw(output_size, &mut rpass);
self.graphics_device.draw(&mut rpass);

// Drop the render pass
drop(rpass);
Expand Down

0 comments on commit 03166f2

Please sign in to comment.