Crate texture

Crate texture 

Source
Expand description

Texture is an image that used to fill faces to add details to them.

In most cases textures are just 2D images, however there are some exclusions to that - for example cube maps, that may be used for environment mapping. Fyrox supports 1D, 2D, 3D and Cube textures.

§Supported formats

To load images and decode them, Fyrox uses image and ddsfile crates. Here is the list of supported formats: png, tga, bmp, dds, jpg, gif, tiff, dds.

§Compressed textures

Fyrox supports most commonly used formats of compressed textures: DXT1, DXT3, DXT5.

§Render target

Texture can be used as render target to render scene in it. To do this you should use new_render_target method and pass its result to scene’s render target property. Renderer will automatically provide you info about metrics of texture, but it won’t give you access to pixels of render target.

Modules§

loader
Texture loader.

Structs§

PLACEHOLDER
Placeholder texture.
Texture
Actual texture data.
TextureBytes
Data storage of a texture.
TextureDataRefMut
A special reference holder that provides mutable access to content of the texture and automatically calculates hash of the data in its destructor.
TextureImportOptions
Allows you to define a set of parameters for a texture resource.

Enums§

CompressionOptions
Texture compression options.
MipFilter
A filter for mip-map generation.
TextureError
An error that may occur during texture operations.
TextureKind
Texture kind.
TextureMagnificationFilter
The texture magnification function is used when the pixel being textured maps to an area less than or equal to one texture element.
TextureMinificationFilter
The texture minifying function is used whenever the pixel being textured maps to an area greater than one texture element.
TexturePixelKind
Texture kind defines pixel format of texture.
TextureWrapMode
Defines a law of texture coordinate modification.

Traits§

TextureResourceExtension
Extension trait for texture resources.

Type Aliases§

TextureResource
Type alias for texture resources.