From 869c486053b7022367709044a98c387d71faf7ef Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Fri, 26 Oct 2018 23:53:11 +1100 Subject: [PATCH] Add documentation for GraphicsPipelineAbstract (#1083) --- vulkano/src/pipeline/graphics_pipeline/mod.rs | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/vulkano/src/pipeline/graphics_pipeline/mod.rs b/vulkano/src/pipeline/graphics_pipeline/mod.rs index 358125d0..ff286202 100644 --- a/vulkano/src/pipeline/graphics_pipeline/mod.rs +++ b/vulkano/src/pipeline/graphics_pipeline/mod.rs @@ -322,42 +322,44 @@ impl Drop for Inner { /// Trait implemented on objects that reference a graphics pipeline. Can be made into a trait /// object. +/// When using this trait `AutoCommandBufferBuilder::draw*` calls will need the buffers to be +/// wrapped in a `vec!()`. pub unsafe trait GraphicsPipelineAbstract: PipelineLayoutAbstract + RenderPassAbstract + VertexSource>> { -/// Returns an opaque object that represents the inside of the graphics pipeline. + /// Returns an opaque object that represents the inside of the graphics pipeline. fn inner(&self) -> GraphicsPipelineSys; -/// Returns the index of the subpass this graphics pipeline is rendering to. + /// Returns the index of the subpass this graphics pipeline is rendering to. fn subpass_index(&self) -> u32; -/// Returns the subpass this graphics pipeline is rendering to. + /// Returns the subpass this graphics pipeline is rendering to. #[inline] fn subpass(self) -> Subpass where Self: Sized { let index = self.subpass_index(); Subpass::from(self, index).expect("Wrong subpass index in GraphicsPipelineAbstract::subpass") } -/// Returns true if the line width used by this pipeline is dynamic. + /// Returns true if the line width used by this pipeline is dynamic. fn has_dynamic_line_width(&self) -> bool; -/// Returns the number of viewports and scissors of this pipeline. + /// Returns the number of viewports and scissors of this pipeline. fn num_viewports(&self) -> u32; -/// Returns true if the viewports used by this pipeline are dynamic. + /// Returns true if the viewports used by this pipeline are dynamic. fn has_dynamic_viewports(&self) -> bool; -/// Returns true if the scissors used by this pipeline are dynamic. + /// Returns true if the scissors used by this pipeline are dynamic. fn has_dynamic_scissors(&self) -> bool; -/// Returns true if the depth bounds used by this pipeline are dynamic. + /// Returns true if the depth bounds used by this pipeline are dynamic. fn has_dynamic_depth_bounds(&self) -> bool; -/// Returns true if the stencil compare masks used by this pipeline are dynamic. + /// Returns true if the stencil compare masks used by this pipeline are dynamic. fn has_dynamic_stencil_compare_mask(&self) -> bool; -/// Returns true if the stencil write masks used by this pipeline are dynamic. + /// Returns true if the stencil write masks used by this pipeline are dynamic. fn has_dynamic_stencil_write_mask(&self) -> bool; -/// Returns true if the stencil references used by this pipeline are dynamic. + /// Returns true if the stencil references used by this pipeline are dynamic. fn has_dynamic_stencil_reference(&self) -> bool; }