Struct three_d::core::render_target::Screen [−][src]
pub struct Screen {}
Expand description
The screen render target which is essential to get something on the screen (see the write function).
Implementations
pub fn write<F: FnOnce() -> ThreeDResult<()>>(
context: &Context,
clear_state: ClearState,
render: F
) -> ThreeDResult<()>
pub fn write<F: FnOnce() -> ThreeDResult<()>>(
context: &Context,
clear_state: ClearState,
render: F
) -> ThreeDResult<()>
Call this function and make a render call (for example one of the draw functions on Program)
in the render
closure to render something to the screen.
Before writing, the screen is cleared based on the given clear state.
Returns the RGBA color values from the screen as a list of bytes (one byte for each color channel).
Returns the depth values from the screen as a list of 32-bit floats. Only available on desktop.
pub fn copy_from<T: TextureDataType>(
context: &Context,
color_texture: Option<&Texture2D<T>>,
depth_texture: Option<&DepthTargetTexture2D>,
viewport: Viewport,
write_mask: WriteMask
) -> ThreeDResult<()>
pub fn copy_from<T: TextureDataType>(
context: &Context,
color_texture: Option<&Texture2D<T>>,
depth_texture: Option<&DepthTargetTexture2D>,
viewport: Viewport,
write_mask: WriteMask
) -> ThreeDResult<()>
Copies the content of the color and depth texture to the specified viewport of this render target. Only copies the channels given by the write mask.
pub fn copy_from_array<T: TextureDataType>(
context: &Context,
color_texture: Option<(&Texture2DArray<T>, u32)>,
depth_texture: Option<(&DepthTargetTexture2DArray, u32)>,
viewport: Viewport,
write_mask: WriteMask
) -> ThreeDResult<()>
pub fn copy_from_array<T: TextureDataType>(
context: &Context,
color_texture: Option<(&Texture2DArray<T>, u32)>,
depth_texture: Option<(&DepthTargetTexture2DArray, u32)>,
viewport: Viewport,
write_mask: WriteMask
) -> ThreeDResult<()>
Copies the content of the given layers of the color and depth array textures to the specified viewport of this render target. Only copies the channels given by the write mask.
Auto Trait Implementations
impl RefUnwindSafe for Screen
impl UnwindSafe for Screen
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more