[][src]Struct rendy::command::RenderPassEncoder

pub struct RenderPassEncoder<'a, B> where
    B: Backend,
    <B as Backend>::CommandBuffer: 'a, 
{ /* fields omitted */ }

Special encoder to record render-pass commands.

Methods

impl<'a, B> RenderPassEncoder<'a, B> where
    B: Backend
[src]

pub unsafe fn draw(&mut self, vertices: Range<u32>, instances: Range<u32>)[src]

Draw.

Safety

The range of vertices must not exceed the size of the currently bound vertex buffer, and the range of instances must not exceed the size of the currently bound instance buffer.

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDraw.html

pub unsafe fn draw_indexed(
    &mut self,
    indices: Range<u32>,
    base_vertex: i32,
    instances: Range<u32>
)
[src]

Draw indexed, with base_vertex specifying an offset that is treated as vertex number 0.

Safety

Same as draw(), plus the value of base_vertex. So, base_vertex + indices.end must not be larger than the currently bound vertex buffer.

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDrawIndexed.html

pub unsafe fn draw_indirect(
    &mut self,
    buffer: &<B as Backend>::Buffer,
    offset: u64,
    draw_count: u32,
    stride: u32
)
[src]

Draw indirect. Similar to draw except takes vertices and instance data from buffer at specified offset. buffer must contain draw_count of DrawCommand starting from offset with stride bytes between each.

Safety

Similar to draw().

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDrawIndirect.html

pub unsafe fn draw_indexed_indirect(
    &mut self,
    buffer: &<B as Backend>::Buffer,
    offset: u64,
    draw_count: u32,
    stride: u32
)
[src]

Draw indirect with indices. Similar to [draw_indexed] except takes vertices, indices and instance data from buffer at specified offset. buffer must contain draw_count of DrawIndexedCommand starting from offset with stride bytes between each.

Safety

Similar to draw_indexed()

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDrawIndexedIndirect.html

pub fn reborrow(&mut self) -> RenderPassEncoder<B>[src]

Reborrow encoder.

Methods from Deref<Target = EncoderCommon<'a, B, Graphics>>

pub unsafe fn bind_index_buffer(
    &mut self,
    buffer: &'b <B as Backend>::Buffer,
    offset: u64,
    index_type: IndexType
) where
    C: Supports<Graphics>, 
[src]

Bind index buffer. Last bound index buffer is used in draw_indexed command.

Note that draw* commands available only inside renderpass.

Safety

offset must not be greater than the size of buffer. Sum of offset and starting address of the buffer must be multiple of index size indicated by index_type.

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindIndexBuffer.html

pub unsafe fn bind_vertex_buffers<'b, impl IntoIterator>(
    &mut self,
    first_binding: u32,
    buffers: impl IntoIterator
) where
    C: Supports<Graphics>,
    impl IntoIterator: IntoIterator<Item = (&'b <B as Backend>::Buffer, u64)>, 
[src]

Bind vertex buffers. Last bound vertex buffer is used in draw and draw_indexed commands.

Note that draw* commands available only inside renderpass.

Safety

first_binding + buffers.into_iter().count() must less than or equal to the maxVertexInputBindings device limit.

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindVertexBuffers.html

pub fn bind_graphics_pipeline(
    &mut self,
    pipeline: &<B as Backend>::GraphicsPipeline
) where
    C: Supports<Graphics>, 
[src]

Bind graphics pipeline.

Last bound vertex buffer is used in [draw], [draw_indexed], draw_indirect and draw_indexed_indirect commands.

pub unsafe fn bind_graphics_descriptor_sets<'b, impl IntoIterator, impl IntoIterator>(
    &mut self,
    layout: &<B as Backend>::PipelineLayout,
    first_set: u32,
    sets: impl IntoIterator,
    offsets: impl IntoIterator
) where
    C: Supports<Graphics>,
    impl IntoIterator: IntoIterator<Item = &'b <B as Backend>::DescriptorSet>,
    impl IntoIterator: IntoIterator<Item = u32>, 
[src]

Bind descriptor sets to graphics pipeline.

Safety

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindDescriptorSets.html

pub fn bind_compute_pipeline(
    &mut self,
    pipeline: &<B as Backend>::ComputePipeline
) where
    C: Supports<Compute>, 
[src]

Bind compute pipeline.

pub unsafe fn bind_compute_descriptor_sets<'b, impl IntoIterator, impl IntoIterator>(
    &mut self,
    layout: &<B as Backend>::PipelineLayout,
    first_set: u32,
    sets: impl IntoIterator,
    offsets: impl IntoIterator
) where
    C: Supports<Compute>,
    impl IntoIterator: IntoIterator<Item = &'b <B as Backend>::DescriptorSet>,
    impl IntoIterator: IntoIterator<Item = u32>, 
[src]

Bind descriptor sets to compute pipeline.

Safety

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindDescriptorSets.html

pub unsafe fn pipeline_barrier<'b, impl IntoIterator>>(
    &mut self,
    stages: Range<PipelineStage>,
    dependencies: Dependencies,
    barriers: impl IntoIterator>
) where
    impl IntoIterator>: IntoIterator<Item = Barrier<'b, B>>, 
[src]

Insert pipeline barrier.

Safety

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdPipelineBarrier.html

pub unsafe fn push_constants(
    &mut self,
    layout: &<B as Backend>::PipelineLayout,
    stages: ShaderStageFlags,
    offset: u32,
    constants: &[u32]
)
[src]

Push graphics constants.

Safety

offset must be multiple of 4. constants.len() + offset, must be less than or equal to the maxPushConstantsSize device limit.

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdPushConstants.html

pub unsafe fn set_scissors<'b, impl IntoIterator>(
    &mut self,
    first_scissor: u32,
    rects: impl IntoIterator
) where
    C: Supports<Graphics>,
    impl IntoIterator: IntoIterator<Item = &'b Rect>, 
[src]

Set scissors

Safety

first_scissor + rects.count() must be less than the maxViewports device limit.

See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdSetScissor.html

pub fn reborrow<K>(&mut self) -> EncoderCommon<B, K> where
    C: Supports<K>, 
[src]

Reborrow encoder.

Trait Implementations

impl<'a, B> Debug for RenderPassEncoder<'a, B> where
    B: Debug + Backend
[src]

impl<'a, B> DerefMut for RenderPassEncoder<'a, B> where
    B: Backend
[src]

impl<'a, B> Deref for RenderPassEncoder<'a, B> where
    B: Backend
[src]

type Target = EncoderCommon<'a, B, Graphics>

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a, B> Unpin for RenderPassEncoder<'a, B>

impl<'a, B> Sync for RenderPassEncoder<'a, B> where
    <B as Backend>::CommandBuffer: Sync

impl<'a, B> Send for RenderPassEncoder<'a, B> where
    <B as Backend>::CommandBuffer: Send

impl<'a, B> !UnwindSafe for RenderPassEncoder<'a, B>

impl<'a, B> RefUnwindSafe for RenderPassEncoder<'a, B> where
    <B as Backend>::CommandBuffer: RefUnwindSafe

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

impl<T> Erased for T[src]

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more