Struct three_d::core::RenderTargetArray[][src]

pub struct RenderTargetArray<'a, 'b> { /* fields omitted */ }

Same as RenderTarget except that the render target contains an array of color textures and depth textures.

Implementations

impl<'a, 'b> RenderTargetArray<'a, 'b>[src]

pub fn new(
    context: &Context,
    color_texture: &'a ColorTargetTexture2DArray,
    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 new_color(
    context: &Context,
    color_texture: &'a ColorTargetTexture2DArray
) -> Result<Self, Error>
[src]

pub fn new_depth(
    context: &Context,
    depth_texture: &'b DepthTargetTexture2DArray
) -> Result<Self, Error>
[src]

pub fn write<F: FnOnce() -> Result<(), Error>>(
    &self,
    clear_state: &ClearState,
    color_layers: &[usize],
    depth_layer: usize,
    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_screen(
    &self,
    color_layer: usize,
    depth_layer: usize,
    viewport: Viewport
) -> Result<(), Error>
[src]

pub fn copy_color_to_screen(
    &self,
    color_layer: usize,
    viewport: Viewport
) -> Result<(), Error>
[src]

pub fn copy_depth_to_screen(
    &self,
    depth_layer: usize,
    viewport: Viewport
) -> Result<(), Error>
[src]

pub fn copy(
    &self,
    color_layer: usize,
    depth_layer: usize,
    other: &RenderTarget<'_, '_>,
    viewport: Viewport
) -> Result<(), Error>
[src]

pub fn copy_color(
    &self,
    color_layer: usize,
    other: &RenderTarget<'_, '_>,
    viewport: Viewport
) -> Result<(), Error>
[src]

pub fn copy_depth(
    &self,
    depth_layer: usize,
    other: &RenderTarget<'_, '_>,
    viewport: Viewport
) -> Result<(), Error>
[src]

Trait Implementations

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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

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

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.