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.
- Texture
Bytes - Data storage of a texture.
- Texture
Data RefMut - A special reference holder that provides mutable access to content of the texture and automatically calculates hash of the data in its destructor.
- Texture
Import Options - Allows you to define a set of parameters for a texture resource.
Enums§
- Compression
Options - Texture compression options.
- MipFilter
- A filter for mip-map generation.
- Texture
Error - An error that may occur during texture operations.
- Texture
Kind - Texture kind.
- Texture
Magnification Filter - The texture magnification function is used when the pixel being textured maps to an area less than or equal to one texture element.
- Texture
Minification Filter - The texture minifying function is used whenever the pixel being textured maps to an area greater than one texture element.
- Texture
Pixel Kind - Texture kind defines pixel format of texture.
- Texture
Wrap Mode - Defines a law of texture coordinate modification.
Traits§
- Texture
Resource Extension - Extension trait for texture resources.
Type Aliases§
- Texture
Resource - Type alias for texture resources.