Add convenience function for graphics pipe

This commit is contained in:
hodasemi 2025-03-02 08:37:05 +01:00
parent c9e00187da
commit e76d35d8d5

View file

@ -307,6 +307,21 @@ impl GraphicsPipelineBuilder {
self
}
pub fn whole_area(self, width: u32, height: u32) -> Self {
self.add_viewport(VkViewport {
x: 0.0,
y: 0.0,
width: width as f32,
height: height as f32,
minDepth: 0.0,
maxDepth: 1.0,
})
.add_scissor(VkRect2D {
offset: VkOffset2D { x: 0, y: 0 },
extent: VkExtent2D { width, height },
})
}
pub fn build(
mut self,
device: Arc<Device>,