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§
- Depth
Stencil Desc - Texture depth-stencil view descriptor.
- Depth
Stencil Flags - Depth-stencil read-only flags
- Image
Info Common - 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.
- Packed
Color - A wrapper for the 8bpp RGBA color, encoded as u32.
- Raw
- Untyped texture
- Render
Desc - Texture render view descriptor.
- Resource
Desc - Texture resource view descriptor.
- Sampler
Info - Specifies how to sample from a texture.
- Texture
Copy Region - A texture region defined for copy operations
Enums§
- AaMode
- Describes the configuration of samples inside each texel.
- Creation
Error - Pure texture object creation error.
- Cube
Face - The face of a cube texture to do an operation on.
- Filter
Method - 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.
- Layer
Error - An error associated with selected texture layer.
- Mipmap
- The marker for the texture initializer to generate extra space for the mipmap generation.
- Wrap
Mode - 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 Aliases§
- 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.
- NewImage
Info - 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
- RawImage
Info - New raw image info based on the universal format spec.
- Size
- Dimension size