Skip to content

Commit

Permalink
fix: changing surface argument to boxed version
Browse files Browse the repository at this point in the history
  • Loading branch information
SkillerRaptor committed Aug 11, 2024
1 parent 71cb53e commit c0b8d6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/hyper_rhi/src/d3d12/graphics_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ impl crate::graphics_device::GraphicsDevice for GraphicsDevice {
}
}

fn present(&self, surface: &dyn crate::surface::Surface) {
fn present(&self, surface: &Box<dyn crate::surface::Surface>) {
let surface = surface.downcast_ref::<Surface>().unwrap();

unsafe {
Expand Down
2 changes: 1 addition & 1 deletion crates/hyper_rhi/src/graphics_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub trait GraphicsDevice: Downcast {
// NOTE: This function assumes, that there will be only 1 command buffer and 1 submission per frame
fn submit(&self, command_list: CommandList);

fn present(&self, surface: &dyn Surface);
fn present(&self, surface: &Box<dyn Surface>);
}

downcast_rs::impl_downcast!(GraphicsDevice);
Expand Down
2 changes: 1 addition & 1 deletion crates/hyper_rhi/src/vulkan/graphics_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ impl crate::graphics_device::GraphicsDevice for GraphicsDevice {
}
}

fn present(&self, surface: &dyn crate::surface::Surface) {
fn present(&self, surface: &Box<dyn crate::surface::Surface>) {
let surface = surface.downcast_ref::<Surface>().unwrap();

let swapchains = [surface.swapchain()];
Expand Down

0 comments on commit c0b8d6c

Please sign in to comment.