Skip to content

Commit

Permalink
vulkan: use our conversion functions for viewport and scissor
Browse files Browse the repository at this point in the history
  • Loading branch information
EriKWDev committed Dec 27, 2024
1 parent 5cfa3b4 commit 5f9be98
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions blade-graphics/src/vulkan/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,21 +389,21 @@ impl super::CommandEncoder {
}
}

let render_area = vk::Rect2D {
offset: Default::default(),
extent: vk::Extent2D {
width: target_size[0] as u32,
height: target_size[1] as u32,
},
};
let viewport = vk::Viewport {
let render_area = crate::ScissorRect {
x: 0,
y: 0,
w: target_size[0] as u32,
h: target_size[1] as u32,
}
.to_vk();
let viewport = crate::Viewport {
x: 0.0,
y: target_size[1] as f32,
width: target_size[0] as f32,
height: -(target_size[1] as f32),
min_depth: 0.0,
max_depth: 1.0,
};
y: 0.0,
w: target_size[0] as f32,
h: target_size[1] as f32,
depth: 0.0..1.0,
}
.to_vk();
rendering_info.render_area = render_area;

let cmd_buf = self.buffers.first_mut().unwrap();
Expand Down

0 comments on commit 5f9be98

Please sign in to comment.