Skip to main content
Version: 1.0.0-preview.34

Velaptor.Content.TextureLoader

Velaptor

Velaptor.Content

TextureLoader Class

Loads textures.

public sealed class TextureLoader :
Velaptor.Content.ILoader<Velaptor.Content.ITexture>

Inheritance System.Object → TextureLoader

Implements Velaptor.Content.ILoader<ITexture>

Constructors

TextureLoader() Constructor

Initializes a new instance of the TextureLoader class.

public TextureLoader();

Methods

Load(string)

Loads a texture with the given contentPathOrName.

public Velaptor.Content.ITexture Load(string contentPathOrName);

Parameters

contentPathOrName System.String

The full file path or name of the texture to load.

Implements Load(string)

Returns

ITexture
The loaded texture.

Exceptions

System.ArgumentNullException
Thrown if the contentPathOrName is null or empty.

LoadTextureException
Thrown if the resulting texture content file path is invalid.

System.IO.FileNotFoundException
Thrown if the texture file does not exist.

System.IO.IOException
The directory specified a file or the network name is not known.

System.UnauthorizedAccessException
The caller does not have the required permissions.

System.IO.PathTooLongException
The specified path, file name, or both exceed the system-defined maximum length.

System.IO.DirectoryNotFoundException
The specified path is invalid (for example, it is on an unmapped drive).

System.NotSupportedException
The path contains a colon character : that is not part of a drive label.

Unload(string)

Unloads the data with the given contentPathOrName.

public void Unload(string contentPathOrName);

Parameters

contentPathOrName System.String

The name of the content item to unload.

Implements Unload(string)