Skip to main content

load_texture_from_file

Function load_texture_from_file 

Source
pub fn load_texture_from_file(
    identifier: impl AsRef<str>,
    file: impl AsRef<Path>,
    callback: Option<RawTextureReceiveCallback>,
)
Expand description

Loads a texture from the given file path.

You can create a RawTextureReceiveCallback using the texture_receive macro.

A conversion of the file path may have to be performed every call. To avoid the conversion when the path is known to be ASCII, use load_texture_from_file_ascii.