C# Class OpenBveApi.Textures.TextureInterface

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

Public Methods

Method 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 method

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.
return bool

Load() public method

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

LoadTexture() public abstract method

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.
return bool

QueryTextureDimensions() public abstract method

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.
return bool

Unload() public method

Called when the plugin is unloaded.
public Unload ( ) : void
return void