pub struct TextureCubeMap { /* private fields */ }
Expand description

A texture that covers all 6 sides of a cube.

Implementations

Creates a new cube map texture from the given CpuTextures. All of the cpu textures must contain data with the same TextureDataType.

Creates a new texture cube map.

Fills the cube map texture with the given pixel data for the 6 images.

Errors

Returns an error if the length of the data for all 6 images does not correspond to the width, height and format specified at construction. It is therefore necessary to create a new texture if the texture size or format has changed.

Creates a new cube texture generated from the equirectangular texture given as input.

Returns a ColorTarget which can be used to clear, write to and read from the given side and mip level of this texture. Combine this together with a DepthTarget with RenderTarget::new to be able to write to both a depth and color target at the same time. If None is specified as the mip level, the 0 level mip level is used and mip maps are generated after a write operation if a mip map filter is specified. Otherwise, the given mip level is used and no mip maps are generated.

Note: DepthTest is disabled if not also writing to a depth texture.

👎 Deprecated:

use as_color_target followed by clear and write

Writes whatever rendered in the render closure into the color texture at the cube map side given by the input parameter side. Before writing, the texture side is cleared based on the given clear state.

👎 Deprecated:

use as_color_target followed by clear and write

Writes whatever rendered in the render closure into the given mip level of the color texture at the cube map side given by the input parameter side. Before writing, the texture side is cleared based on the given clear state.

The width of this texture.

The height of this texture.

Whether this cube map contain HDR (high dynamic range) data.

Trait Implementations

Executes the destructor for this type. 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 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