Module gfx::texture[][src]

Texture creation and modification.

“Texture” is an overloaded term. In gfx-rs, a texture consists of two separate pieces of information: image storage description (which is immutable for a single texture object), and image data. To actually use a texture, a “sampler” is needed, which provides a way of accessing the image data. Image data consists of an array of “texture elements”, or texels.

Structs

DepthStencilDesc

Texture depth-stencil view descriptor.

DepthStencilFlags

Depth-stencil read-only flags

ImageInfoCommon

Describes a subvolume of a texture, which image data can be uploaded into.

Info

Texture storage descriptor.

Lod

A wrapper for the LOD level of a texture.

PackedColor

A wrapper for the 8bpp RGBA color, encoded as u32.

Raw

Untyped texture

RenderDesc

Texture render view descriptor.

ResourceDesc

Texture resource view descriptor.

SamplerInfo

Specifies how to sample from a texture.

TextureCopyRegion

A texture region defined for copy operations

Enums

AaMode

Describes the configuration of samples inside each texel.

CreationError

Pure texture object creation error.

CubeFace

The face of a cube texture to do an operation on.

FilterMethod

How to filter the texture when sampling. They correspond to increasing levels of quality, but also cost. Mipmap, trilinear and anisotropic filtering require mipmapping, but the other filtering methods do not.

Kind

Specifies the kind of a texture storage to be allocated.

LayerError

An error associated with selected texture layer.

Mipmap

The marker for the texture initializer to generate extra space for the mipmap generation.

WrapMode

Specifies how texture coordinates outside the range [0, 1] are handled.

Constants

CUBE_FACES

A constant array of cube faces in the order they map to the hardware.

MAX_LEVEL

Maximum accessible mipmap level of a texture.

Type Definitions

Bits

Number of bits per component

Dimensions

Dimensions: width, height, depth, and samples.

Layer

A depth value, specifying which plane to select out of a 3D texture.

Level

Mipmap level to select in a texture.

NewImageInfo

New image info based on the universal format spec. The format is suppsed to come from compile-time information as opposed to run-time enum values.

NumFragments

Number of EQAA fragments

NumSamples

Number of MSAA samples

RawImageInfo

New raw image info based on the universal format spec.

Size

Dimension size