pub struct DepthTarget<'a> { /* private fields */ }
Expand description

Adds additional functionality to clear, read from and write to a texture. Use the as_depth_target function directly on the texture structs (for example DepthTargetTexture2D) to construct a depth target. Combine this together with a ColorTarget with RenderTarget::new to be able to write to both a depth and color target at the same time. A depth target purely adds functionality, so it can be created each time it is needed, the actual data is saved in the texture.

Implementations

Clears the depth of this depth target as defined by the given clear state.

Clears the depth of the part of this depth target that is inside the given scissor box.

Writes whatever rendered in the render closure into this depth target.

Writes whatever rendered in the render closure into the part of this depth target defined by the scissor box.

Returns the depth values in this depth target.

Returns the depth values in this depth target inside the given scissor box.

Returns the width of the depth target in texels, which is simply the width of the underlying texture.

Returns the height of the depth target in texels, which is simply the height of the underlying texture.

Returns the scissor box that encloses the entire target.

Render the objects using the given camera and lights into this depth target. Use an empty array for the lights argument, if the objects does not require lights to be rendered. Also, objects outside the camera frustum are not rendered and the objects are rendered in the order given by cmp_render_order.

Render the objects using the given camera and lights into the part of this depth target defined by the scissor box. Use an empty array for the lights argument, if the objects does not require lights to be rendered. Also, objects outside the camera frustum are not rendered and the objects are rendered in the order given by cmp_render_order.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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