Abstract base class specifying the required interface for Texture objects. More...
Public Member Functions | |
int | getWidth () |
Returns the current pixel width of the texture. | |
int | getHeight () |
Returns the current pixel height of the texture. | |
void | loadFromFile (string filename, string resourceGroup) |
Loads the specified image file into the texture. The texture is resized as required to hold the image. | |
Renderer | getRenderer () |
Return a pointer to the Renderer object that created and owns this Texture. |
Abstract base class specifying the required interface for Texture objects.
Texture objects are created via the Renderer. The actual inner workings of any Texture object are dependant upon the Renderer (and underlying API) in use. This base class defines the minimal set of functions that is required for the rest of the system to work. Texture objects are only created through the Renderer object's texture creation functions.
int GUI::Texture::getWidth | ( | ) |
Returns the current pixel width of the texture.
int GUI::Texture::getHeight | ( | ) |
Returns the current pixel height of the texture.
void GUI::Texture::loadFromFile | ( | string | filename, |
string | resourceGroup | ||
) |
Loads the specified image file into the texture. The texture is resized as required to hold the image.
filename | The filename of the image file that is to be loaded into the texture |
resourceGroup | Resource group identifier to be passed to the resource provider when loading the image file. |