Public Member Functions
GUI::Texture Class Reference

Abstract base class specifying the required interface for Texture objects. More...

List of all members.

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.

Detailed Description

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.


Member Function Documentation

int GUI::Texture::getWidth ( )

Returns the current pixel width of the texture.

Returns:
integer value that is the current width of the texture in pixels
int GUI::Texture::getHeight ( )

Returns the current pixel height of the texture.

Returns:
integer value that is the current height of the texture in pixels
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.

Parameters:
filenameThe filename of the image file that is to be loaded into the texture
resourceGroupResource group identifier to be passed to the resource provider when loading the image file.
Returns:
Nothing.
Renderer GUI::Texture::getRenderer ( )

Return a pointer to the Renderer object that created and owns this Texture.

Returns:
Renderer object that owns the Texture