Crazy Eddies GUI System
0.6.0
|
Abstract base class specifying the required interface for Texture objects. More...
Public Types | |
enum | PixelFormat { PF_RGB, PF_RGBA } |
Enum containing the list of supported pixel formats that can be passed to loadFromMemory. More... | |
Public Member Functions | |
virtual ushort | getWidth (void) const =0 |
Returns the current pixel width of the texture. More... | |
virtual ushort | getOriginalWidth (void) const |
Returns the original pixel width of the data loaded into the texture. More... | |
virtual float | getXScale (void) const |
Returns the current scale used for the width of the texture. More... | |
virtual ushort | getHeight (void) const =0 |
Returns the current pixel height of the texture. More... | |
virtual ushort | getOriginalHeight (void) const |
Returns the original pixel height of the data loaded into the texture. More... | |
virtual float | getYScale (void) const |
Returns the current scale used for the height of the texture. More... | |
virtual void | loadFromFile (const String &filename, const String &resourceGroup)=0 |
Loads the specified image file into the texture. The texture is resized as required to hold the image. More... | |
virtual void | loadFromMemory (const void *buffPtr, uint buffWidth, uint buffHeight, PixelFormat pixelFormat)=0 |
Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image. More... | |
Renderer * | getRenderer (void) const |
Return a pointer to the Renderer object that created and owns this Texture. More... | |
Protected Member Functions | |
Texture (Renderer *owner) | |
Constructor for Texture base class. This is never called by client code. | |
virtual | ~Texture (void) |
Destructor for Texture base class. This is never called by client code. | |
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.
|
pure virtual |
Returns the current pixel height of the texture.
|
inlinevirtual |
Returns the original pixel height of the data loaded into the texture.
|
inlinevirtual |
Returns the original pixel width of the data loaded into the texture.
|
inline |
Return a pointer to the Renderer object that created and owns this Texture.
Referenced by CEGUI::Imageset::draw().
|
pure virtual |
Returns the current pixel width of the texture.
|
inlinevirtual |
Returns the current scale used for the width of the texture.
Referenced by CEGUI::Imageset::draw().
|
inlinevirtual |
Returns the current scale used for the height of the texture.
Referenced by CEGUI::Imageset::draw().
|
pure virtual |
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. |
|
pure virtual |
Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image.
buffPtr | Pointer to the buffer containing the image data |
buffWidth | Width of the buffer (in pixels as specified by pixelFormat ) |
buffHeight | Height of the buffer (in pixels as specified by pixelFormat ) |
pixelFormat | PixelFormat value describing the format contained in buffPtr |
Referenced by CEGUI::FreeTypeFont::rasterize().