C# Class OpenBveApi.Textures.TextureInterface

Represents the interface for loading textures. Plugins must implement this interface if they wish to expose textures.
Afficher le fichier Open project: leezer3/OpenBVE Class Usage Examples

Méthodes publiques

Méthode Description
CanLoadTexture ( string path ) : bool

Checks whether the plugin can load the specified texture.

Load ( Hosts host ) : void

Called when the plugin is loaded.

LoadTexture ( string path, Texture &texture ) : bool

Loads the specified texture.

QueryTextureDimensions ( string path, int &width, int &height ) : bool

Queries the dimensions of a texture.

Unload ( ) : void

Called when the plugin is unloaded.

Method Details

CanLoadTexture() public abstract méthode

Checks whether the plugin can load the specified texture.
public abstract CanLoadTexture ( string path ) : bool
path string The path to the file or folder that contains the texture.
Résultat bool

Load() public méthode

Called when the plugin is loaded.
public Load ( Hosts host ) : void
host Hosts The host that loaded the plugin.
Résultat void

LoadTexture() public abstract méthode

Loads the specified texture.
public abstract LoadTexture ( string path, Texture &texture ) : bool
path string The path to the file or folder that contains the texture.
texture Texture Receives the texture.
Résultat bool

QueryTextureDimensions() public abstract méthode

Queries the dimensions of a texture.
public abstract QueryTextureDimensions ( string path, int &width, int &height ) : bool
path string The path to the file or folder that contains the texture.
width int Receives the width of the texture.
height int Receives the height of the texture.
Résultat bool

Unload() public méthode

Called when the plugin is unloaded.
public Unload ( ) : void
Résultat void