Module gfx_core::tex [] [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

Descriptor

Texture storage descriptor.

ImageInfoCommon

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

Lod

A wrapper for the LOD level of a texture.

SamplerInfo

Specifies how to sample from a texture.

ViewDesc

Texture view descriptor.

Enums

AaMode

Describes the configuration of samples inside each texel.

CubeFace

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

Error

Pure texture object creation error.

FilterMethod

How to filter the texture when sampling. They correspond to increasing levels of quality, but also cost. They "layer" on top of each other: it is not possible to have bilinear filtering without mipmapping, for example.

Kind

Specifies the kind of a texture storage to be allocated.

WrapMode

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

Type Definitions

ArraySize

Array size

Bits

Number of bits per component

Dimensions

Dimensions: width, height, depth, and samples.

Layer
Level
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