Module gfx::texture

source ·
Expand description

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

Enums

  • Describes the configuration of samples inside each texel.
  • Pure texture object creation error.
  • The face of a cube texture to do an operation on.
  • 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.
  • Specifies the kind of a texture storage to be allocated.
  • An error associated with selected texture layer.
  • The marker for the texture initializer to generate extra space for the mipmap generation.
  • Specifies how texture coordinates outside the range [0, 1] are handled.

Constants

  • A constant array of cube faces in the order they map to the hardware.
  • Maximum accessible mipmap level of a texture.

Type Definitions

  • Number of bits per component
  • Dimensions: width, height, depth, and samples.
  • A depth value, specifying which plane to select out of a 3D texture.
  • Mipmap level to select in a texture.
  • 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.
  • Number of EQAA fragments
  • Number of MSAA samples
  • New raw image info based on the universal format spec.
  • Dimension size