Struct PassInFrame

Source
pub struct PassInFrame<'a, P: ?Sized> { /* private fields */ }
Expand description

A frame in the process of being drawn using a given GraphicalPass.

Implementations§

Source§

impl<'a, P> PassInFrame<'a, P>
where P: GraphicsPipelineAbstract + Send + Sync + 'static + ?Sized,

Source

pub fn draw<VB, DSC, PC>( self, vertex_buffer: VB, descriptor_sets: DSC, push_constants: PC, ) -> Self

Draw some data using a pass.

The result depends highly on the GraphicalPass that was used to create the PassInFrame. Push-constants should correspond to the ones in the shader used for creating the GraphicalPass.

§Panic.
  • Panics if fails to write draw commands to the command buffer.
Source

pub fn draw_indexed<VB, IB, DSC, PC, I>( self, vertex_buffer: VB, index_buffer: IB, descriptor_sets: DSC, push_constants: PC, ) -> Self
where P: VertexSource<VB>, DSC: DescriptorSetsCollection, IB: BufferAccess + TypedBufferAccess<Content = [I]> + Send + Sync + 'static, I: Index + 'static,

Draw some indexed vertex data using a pass.

The result depends highly on the GraphicalPass that was used to create the PassInFrame. Push-constants should correspond to the ones in the shader used for creating the GraphicalPass.

§Panic.
  • Panics if fails to write draw commands to the command buffer.
Source

pub fn finish_pass(self) -> Frame

Finish using a GraphicalPass.

Releases the consumed Frame to begin the next pass or finish the frame.

§Panic.
  • Panics if fails to write end renderpass command to the command buffer.

Auto Trait Implementations§

§

impl<'a, P> Freeze for PassInFrame<'a, P>
where P: ?Sized,

§

impl<'a, P> !RefUnwindSafe for PassInFrame<'a, P>

§

impl<'a, P> !Send for PassInFrame<'a, P>

§

impl<'a, P> !Sync for PassInFrame<'a, P>

§

impl<'a, P> Unpin for PassInFrame<'a, P>
where P: ?Sized,

§

impl<'a, P> !UnwindSafe for PassInFrame<'a, P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Content for T

Source§

fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>

Builds a pointer to this type from a raw pointer.
Source§

fn is_size_suitable(size: usize) -> bool

Returns true if the size is suitable to store a type like this.
Source§

fn indiv_size() -> usize

Returns the size of an individual element.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> SafeBorrow<T> for T