Struct three_d::core::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]
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]
pub fn new(
context: &Context,
color_texture: &'a ColorTargetTexture2DArray<T>,
depth_texture: &'b DepthTargetTexture2DArray
) -> Result<Self, Error>
[src]pub fn write<F: FnOnce() -> Result<(), Error>>(
&self,
color_layers: &[usize],
depth_layer: usize,
clear_state: ClearState,
render: F
) -> Result<(), Error>
[src]
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]
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]
impl<T: TextureValueType> Drop for RenderTargetArray<'_, '_, T>
[src]