Add convenience function for graphics pipe
This commit is contained in:
parent
c9e00187da
commit
e76d35d8d5
1 changed files with 15 additions and 0 deletions
|
@ -307,6 +307,21 @@ impl GraphicsPipelineBuilder {
|
||||||
self
|
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(
|
pub fn build(
|
||||||
mut self,
|
mut self,
|
||||||
device: Arc<Device>,
|
device: Arc<Device>,
|
||||||
|
|
Loading…
Reference in a new issue