Struct three_d::RenderTargetArray[][src]

pub struct RenderTargetArray<'a, 'b, T: TextureValueType> { /* fields omitted */ }
Expand description

Adds additional functionality to write to and copy from both a ColorTargetTexture2DArray and a DepthTargetTexture2DArray at the same time. It purely adds functionality, so it can be created each time it is needed, the data is saved in the textures.

Implementations

impl<'a, 'b, T: TextureValueType> RenderTargetArray<'a, 'b, T>[src]

pub fn new(
    context: &Context,
    color_texture: &'a ColorTargetTexture2DArray<T>,
    depth_texture: &'b DepthTargetTexture2DArray
) -> Result<Self, Error>
[src]

Constructs a new render target array that enables rendering into the given color and depth array textures.

pub fn write<F: FnOnce() -> Result<(), Error>>(
    &self,
    color_layers: &[usize],
    depth_layer: usize,
    clear_state: ClearState,
    render: F
) -> Result<(), Error>
[src]

Renders whatever rendered in the render closure into the textures defined at construction and defined by the input parameters color_layers and depth_layer. Output at location i defined in the fragment shader is written to the color texture layer at the ith index in color_layers. The depth is written to the depth texture defined by depth_layer. Before writing, the textures are cleared based on the given clear state.

pub fn copy_to(
    &self,
    color_layer: usize,
    depth_layer: usize,
    destination: CopyDestination<'_, '_, '_, '_, T>,
    viewport: Viewport,
    write_mask: WriteMask
) -> Result<(), Error>
[src]

Copies the content of the specified color and depth layers in this render target to the given viewport of the given destination. Only copies the channels specified by the write mask.

Trait Implementations

impl<T: TextureValueType> Drop for RenderTargetArray<'_, '_, T>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'a, 'b, T> !RefUnwindSafe for RenderTargetArray<'a, 'b, T>

impl<'a, 'b, T> !Send for RenderTargetArray<'a, 'b, T>

impl<'a, 'b, T> !Sync for RenderTargetArray<'a, 'b, T>

impl<'a, 'b, T> Unpin for RenderTargetArray<'a, 'b, T>

impl<'a, 'b, T> !UnwindSafe for RenderTargetArray<'a, 'b, T>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.