Struct three_d::core::RenderTarget [−][src]
pub struct RenderTarget<'a, 'b, T: TextureValueType> { /* fields omitted */ }
Expand description
Adds additional functionality to write to and copy from both a ColorTargetTexture2D and a DepthTargetTexture2D 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> RenderTarget<'a, 'b, T>
[src]
impl<'a, 'b, T: TextureValueType> RenderTarget<'a, 'b, T>
[src]pub fn new(
context: &Context,
color_texture: &'a ColorTargetTexture2D<T>,
depth_texture: &'b DepthTargetTexture2D
) -> Result<Self, Error>
[src]
pub fn new(
context: &Context,
color_texture: &'a ColorTargetTexture2D<T>,
depth_texture: &'b DepthTargetTexture2D
) -> Result<Self, Error>
[src]pub fn write<F: FnOnce() -> Result<(), Error>>(
&self,
clear_state: ClearState,
render: F
) -> Result<(), Error>
[src]
pub fn write<F: FnOnce() -> Result<(), Error>>(
&self,
clear_state: ClearState,
render: F
) -> Result<(), Error>
[src]Renders whatever rendered in the render
closure into the textures defined at construction.
Before writing, the textures are cleared based on the given clear state.
pub fn copy_to(
&self,
destination: CopyDestination<'_, '_, '_, '_, T>,
viewport: Viewport,
write_mask: WriteMask
) -> Result<(), Error>
[src]
pub fn copy_to(
&self,
destination: CopyDestination<'_, '_, '_, '_, T>,
viewport: Viewport,
write_mask: WriteMask
) -> Result<(), Error>
[src]Copies the content of the color and depth textures in this render target to the specified viewport of the specified destination. Only copies the channels given by the write mask.
Trait Implementations
impl<T: TextureValueType> Drop for RenderTarget<'_, '_, T>
[src]
impl<T: TextureValueType> Drop for RenderTarget<'_, '_, T>
[src]