diff --git a/vulkan-rs/src/pipelines/graphics_pipeline.rs b/vulkan-rs/src/pipelines/graphics_pipeline.rs index 276e940..114ea25 100644 --- a/vulkan-rs/src/pipelines/graphics_pipeline.rs +++ b/vulkan-rs/src/pipelines/graphics_pipeline.rs @@ -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,