[][src]Struct vulkano::pipeline::GraphicsPipelineBuilder

pub struct GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> { /* fields omitted */ }

Prototype for a GraphicsPipeline.

Methods

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> where
    Vdef: VertexDefinition<Vs::InputDefinition>,
    Vs: GraphicsEntryPointAbstract,
    Fs: GraphicsEntryPointAbstract,
    Gs: GraphicsEntryPointAbstract,
    Tcs: GraphicsEntryPointAbstract,
    Tes: GraphicsEntryPointAbstract,
    Vss: SpecializationConstants,
    Tcss: SpecializationConstants,
    Tess: SpecializationConstants,
    Gss: SpecializationConstants,
    Fss: SpecializationConstants,
    Vs::PipelineLayout: Clone + 'static + Send + Sync,
    Fs::PipelineLayout: Clone + 'static + Send + Sync,
    Tcs::PipelineLayout: Clone + 'static + Send + Sync,
    Tes::PipelineLayout: Clone + 'static + Send + Sync,
    Gs::PipelineLayout: Clone + 'static + Send + Sync,
    Tcs::InputDefinition: ShaderInterfaceDefMatch<Vs::OutputDefinition>,
    Tes::InputDefinition: ShaderInterfaceDefMatch<Tcs::OutputDefinition>,
    Gs::InputDefinition: ShaderInterfaceDefMatch<Tes::OutputDefinition> + ShaderInterfaceDefMatch<Vs::OutputDefinition>,
    Fs::InputDefinition: ShaderInterfaceDefMatch<Gs::OutputDefinition> + ShaderInterfaceDefMatch<Tes::OutputDefinition> + ShaderInterfaceDefMatch<Vs::OutputDefinition>,
    Rp: RenderPassAbstract + RenderPassSubpassInterface<Fs::OutputDefinition>, 
[src]

pub fn build(
    self,
    device: Arc<Device>
) -> Result<GraphicsPipeline<Vdef, Box<dyn PipelineLayoutAbstract + Send + Sync>, Rp>, GraphicsPipelineCreationError>
[src]

Builds the graphics pipeline, using an inferred a pipeline layout.

pub fn with_auto_layout(
    self,
    device: Arc<Device>,
    dynamic_buffers: &[(usize, usize)]
) -> Result<GraphicsPipeline<Vdef, Box<dyn PipelineLayoutAbstract + Send + Sync>, Rp>, GraphicsPipelineCreationError>
[src]

Builds the graphics pipeline, using an inferred pipeline layout with some dynamic buffers.

Configures the inferred layout for each descriptor (set, binding) in dynamic_buffers to accept dynamic buffers.

pub fn with_pipeline_layout<Pl>(
    self,
    device: Arc<Device>,
    pipeline_layout: Pl
) -> Result<GraphicsPipeline<Vdef, Pl, Rp>, GraphicsPipelineCreationError> where
    Pl: PipelineLayoutAbstract
[src]

Builds the graphics pipeline.

Does the same as build, except that build automatically builds the pipeline layout object corresponding to the union of your shaders while this function allows you to specify the pipeline layout.

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp>[src]

pub fn vertex_input<T>(
    self,
    vertex_input: T
) -> GraphicsPipelineBuilder<T, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp>
[src]

Sets the vertex input.

pub fn vertex_input_single_buffer<V>(
    self
) -> GraphicsPipelineBuilder<SingleBufferDefinition<V>, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp>
[src]

Sets the vertex input to a single vertex buffer.

You will most likely need to explicitly specify the template parameter to the type of a vertex.

pub fn vertex_shader<Vs2, Vss2>(
    self,
    shader: Vs2,
    specialization_constants: Vss2
) -> GraphicsPipelineBuilder<Vdef, Vs2, Vss2, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> where
    Vs2: GraphicsEntryPointAbstract<SpecializationConstants = Vss2>,
    Vss2: SpecializationConstants
[src]

Sets the vertex shader to use.

pub fn primitive_restart(self, enabled: bool) -> Self[src]

Sets whether primitive restart if enabled.

pub fn primitive_topology(self, topology: PrimitiveTopology) -> Self[src]

Sets the topology of the primitives that are expected by the pipeline.

pub fn point_list(self) -> Self[src]

Sets the topology of the primitives to a list of points.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::PointList).

pub fn line_list(self) -> Self[src]

Sets the topology of the primitives to a list of lines.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::LineList).

pub fn line_strip(self) -> Self[src]

Sets the topology of the primitives to a line strip.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::LineStrip).

pub fn triangle_list(self) -> Self[src]

Sets the topology of the primitives to a list of triangles. Note that this is the default.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::TriangleList).

pub fn triangle_strip(self) -> Self[src]

Sets the topology of the primitives to a triangle strip.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::TriangleStrip).

pub fn triangle_fan(self) -> Self[src]

Sets the topology of the primitives to a fan of triangles.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::TriangleFan).

pub fn line_list_with_adjacency(self) -> Self[src]

Sets the topology of the primitives to a list of lines with adjacency information.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::LineListWithAdjacency).

pub fn line_strip_with_adjacency(self) -> Self[src]

Sets the topology of the primitives to a line strip with adjacency information.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::LineStripWithAdjacency).

pub fn triangle_list_with_adjacency(self) -> Self[src]

Sets the topology of the primitives to a list of triangles with adjacency information.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::TriangleListWithAdjacency).

pub fn triangle_strip_with_adjacency(self) -> Self[src]

Sets the topology of the primitives to a triangle strip with adjacency information`

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::TriangleStripWithAdjacency).

pub fn patch_list(self, vertices_per_patch: u32) -> Self[src]

Sets the topology of the primitives to a list of patches. Can only be used and must be used with a tessellation shader.

Note: This is equivalent to self.primitive_topology(PrimitiveTopology::PatchList { vertices_per_patch }).

pub fn tessellation_shaders<Tcs2, Tcss2, Tes2, Tess2>(
    self,
    tessellation_control_shader: Tcs2,
    tessellation_control_shader_spec_constants: Tcss2,
    tessellation_evaluation_shader: Tes2,
    tessellation_evaluation_shader_spec_constants: Tess2
) -> GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs2, Tcss2, Tes2, Tess2, Gs, Gss, Fs, Fss, Rp> where
    Tcs2: GraphicsEntryPointAbstract<SpecializationConstants = Tcss2>,
    Tes2: GraphicsEntryPointAbstract<SpecializationConstants = Tess2>,
    Tcss2: SpecializationConstants,
    Tess2: SpecializationConstants
[src]

Sets the tessellation shaders to use.

pub fn tessellation_shaders_disabled(self) -> Self[src]

Sets the tessellation shaders stage as disabled. This is the default.

pub fn geometry_shader<Gs2, Gss2>(
    self,
    shader: Gs2,
    specialization_constants: Gss2
) -> GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs2, Gss2, Fs, Fss, Rp> where
    Gs2: GraphicsEntryPointAbstract<SpecializationConstants = Gss2>,
    Gss2: SpecializationConstants
[src]

Sets the geometry shader to use.

pub fn geometry_shader_disabled(self) -> Self[src]

Sets the geometry shader stage as disabled. This is the default.

pub fn viewports<I>(self, viewports: I) -> Self where
    I: IntoIterator<Item = Viewport>, 
[src]

Sets the viewports to some value, and the scissor boxes to boxes that always cover the whole viewport.

pub fn viewports_scissors<I>(self, viewports: I) -> Self where
    I: IntoIterator<Item = (Viewport, Scissor)>, 
[src]

Sets the characteristics of viewports and scissor boxes in advance.

pub fn viewports_dynamic_scissors_fixed<I>(self, scissors: I) -> Self where
    I: IntoIterator<Item = Scissor>, 
[src]

Sets the scissor boxes to some values, and viewports to dynamic. The viewports will need to be set before drawing.

pub fn viewports_dynamic_scissors_irrelevant(self, num: u32) -> Self[src]

Sets the viewports to dynamic, and the scissor boxes to boxes that always cover the whole viewport. The viewports will need to be set before drawing.

pub fn viewports_fixed_scissors_dynamic<I>(self, viewports: I) -> Self where
    I: IntoIterator<Item = Viewport>, 
[src]

Sets the viewports to some values, and scissor boxes to dynamic. The scissor boxes will need to be set before drawing.

pub fn viewports_scissors_dynamic(self, num: u32) -> Self[src]

Sets the viewports and scissor boxes to dynamic. They will both need to be set before drawing.

pub fn depth_clamp(self, clamp: bool) -> Self[src]

If true, then the depth value of the vertices will be clamped to the range [0.0 ; 1.0]. If false, fragments whose depth is outside of this range will be discarded before the fragment shader even runs.

pub fn front_face_counter_clockwise(self) -> Self[src]

Sets the front-facing faces to counter-clockwise faces. This is the default.

Triangles whose vertices are oriented counter-clockwise on the screen will be considered as facing their front. Otherwise they will be considered as facing their back.

pub fn front_face_clockwise(self) -> Self[src]

Sets the front-facing faces to clockwise faces.

Triangles whose vertices are oriented clockwise on the screen will be considered as facing their front. Otherwise they will be considered as facing their back.

pub fn cull_mode_disabled(self) -> Self[src]

Sets backface culling as disabled. This is the default.

pub fn cull_mode_front(self) -> Self[src]

Sets backface culling to front faces. The front faces (as chosen with the front_face_* methods) will be discarded by the GPU when drawing.

pub fn cull_mode_back(self) -> Self[src]

Sets backface culling to back faces. Faces that are not facing the front (as chosen with the front_face_* methods) will be discarded by the GPU when drawing.

pub fn cull_mode_front_and_back(self) -> Self[src]

Sets backface culling to both front and back faces. All the faces will be discarded.

Note: This option exists for the sake of completeness. It has no known practical usage.

pub fn polygon_mode_fill(self) -> Self[src]

Sets the polygon mode to "fill". This is the default.

pub fn polygon_mode_line(self) -> Self[src]

Sets the polygon mode to "line". Triangles will each be turned into three lines.

pub fn polygon_mode_point(self) -> Self[src]

Sets the polygon mode to "point". Triangles and lines will each be turned into three points.

pub fn line_width(self, value: f32) -> Self[src]

Sets the width of the lines, if the GPU needs to draw lines. The default is 1.0.

pub fn line_width_dynamic(self) -> Self[src]

Sets the width of the lines as dynamic, which means that you will need to set this value when drawing.

pub fn sample_shading_disabled(self) -> Self[src]

Disables sample shading. The fragment shader will only be run once per fragment (ie. per pixel) and not once by sample. The output will then be copied in all of the covered samples.

Sample shading is disabled by default.

pub fn sample_shading_enabled(self, min_fract: f32) -> Self[src]

Enables sample shading. The fragment shader will be run once per sample at the borders of the object you're drawing.

Enabling sampling shading requires the sample_rate_shading feature to be enabled on the device.

The min_fract parameter is the minimum fraction of samples shading. For example if its value is 0.5, then the fragment shader will run for at least half of the samples. The other half of the samples will get their values determined automatically.

Sample shading is disabled by default.

Panic

  • Panics if min_fract is not between 0.0 and 1.0.

pub fn alpha_to_coverage_disabled(self) -> Self[src]

pub fn alpha_to_coverage_enabled(self) -> Self[src]

pub fn alpha_to_one_disabled(self) -> Self[src]

Disables alpha-to-one.

Alpha-to-one is disabled by default.

pub fn alpha_to_one_enabled(self) -> Self[src]

Enables alpha-to-one. The alpha component of the first color output of the fragment shader will be replaced by the value 1.0.

Enabling alpha-to-one requires the alpha_to_one feature to be enabled on the device.

Alpha-to-one is disabled by default.

pub fn fragment_shader<Fs2, Fss2>(
    self,
    shader: Fs2,
    specialization_constants: Fss2
) -> GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs2, Fss2, Rp> where
    Fs2: GraphicsEntryPointAbstract<SpecializationConstants = Fss2>,
    Fss2: SpecializationConstants
[src]

Sets the fragment shader to use.

The fragment shader is run once for each pixel that is covered by each primitive.

pub fn depth_stencil(self, depth_stencil: DepthStencil) -> Self[src]

Sets the depth/stencil configuration. This function may be removed in the future.

pub fn depth_stencil_disabled(self) -> Self[src]

Sets the depth/stencil tests as disabled.

Note: This is a shortcut for all the other depth_* and depth_stencil_* methods of the builder.

pub fn depth_stencil_simple_depth(self) -> Self[src]

Sets the depth/stencil tests as a simple depth test and no stencil test.

Note: This is a shortcut for setting the depth test to Less, the depth write Into true and disable the stencil test.

pub fn depth_write(self, write: bool) -> Self[src]

Sets whether the depth buffer will be written.

pub fn blend_collective(self, blend: AttachmentBlend) -> Self[src]

pub fn blend_individual<I>(self, blend: I) -> Self where
    I: IntoIterator<Item = AttachmentBlend>, 
[src]

pub fn blend_pass_through(self) -> Self[src]

Each fragment shader output will have its value directly written to the framebuffer attachment. This is the default.

pub fn blend_alpha_blending(self) -> Self[src]

pub fn blend_logic_op(self, logic_op: LogicOp) -> Self[src]

pub fn blend_logic_op_disabled(self) -> Self[src]

Sets the logic operation as disabled. This is the default.

pub fn blend_constants(self, constants: [f32; 4]) -> Self[src]

Sets the blend constant. The default is [0.0, 0.0, 0.0, 0.0].

The blend constant is used for some blending calculations. It is irrelevant otherwise.

pub fn blend_constants_dynamic(self) -> Self[src]

Sets the blend constant value as dynamic. Its value will need to be set before drawing.

The blend constant is used for some blending calculations. It is irrelevant otherwise.

pub fn render_pass<Rp2>(
    self,
    subpass: Subpass<Rp2>
) -> GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp2>
[src]

Sets the render pass subpass to use.

Trait Implementations

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> Clone for GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> where
    Vdef: Clone,
    Vs: Clone,
    Vss: Clone,
    Tcs: Clone,
    Tcss: Clone,
    Tes: Clone,
    Tess: Clone,
    Gs: Clone,
    Gss: Clone,
    Fs: Clone,
    Fss: Clone,
    Rp: Clone
[src]

Auto Trait Implementations

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> !Send for GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp>

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> Unpin for GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> where
    Fs: Unpin,
    Fss: Unpin,
    Gs: Unpin,
    Gss: Unpin,
    Rp: Unpin,
    Tcs: Unpin,
    Tcss: Unpin,
    Tes: Unpin,
    Tess: Unpin,
    Vdef: Unpin,
    Vs: Unpin,
    Vss: Unpin

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> !Sync for GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp>

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> UnwindSafe for GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> where
    Fs: UnwindSafe,
    Fss: UnwindSafe,
    Gs: UnwindSafe,
    Gss: UnwindSafe,
    Rp: UnwindSafe,
    Tcs: UnwindSafe,
    Tcss: UnwindSafe,
    Tes: UnwindSafe,
    Tess: UnwindSafe,
    Vdef: UnwindSafe,
    Vs: UnwindSafe,
    Vss: UnwindSafe

impl<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> RefUnwindSafe for GraphicsPipelineBuilder<Vdef, Vs, Vss, Tcs, Tcss, Tes, Tess, Gs, Gss, Fs, Fss, Rp> where
    Fs: RefUnwindSafe,
    Fss: RefUnwindSafe,
    Gs: RefUnwindSafe,
    Gss: RefUnwindSafe,
    Rp: RefUnwindSafe,
    Tcs: RefUnwindSafe,
    Tcss: RefUnwindSafe,
    Tes: RefUnwindSafe,
    Tess: RefUnwindSafe,
    Vdef: RefUnwindSafe,
    Vs: RefUnwindSafe,
    Vss: RefUnwindSafe

Blanket Implementations

impl<T> Content for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]