Crazy Eddies GUI System: CEGUI::Texture Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# CEGUI::Texture Class Reference

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

Inheritance diagram for CEGUI::Texture:

[legend]
Collaboration diagram for CEGUI::Texture:

[legend]
List of all members.

## Public Member Functions
virtual ushort | getWidth (void) const =0
| Returns the current pixel width of the texture.
virtual ushort | getHeight (void) const =0
| Returns the current pixel height of the texture.
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.
virtual void | loadFromMemory (const void *buffPtr, uint buffWidth, uint buffHeight)=0
| Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image.
Renderer * | getRenderer (void) const
| Return a pointer to the Renderer object that created and owns this Texture.
virtual | ~Texture (void)
| Destructor for Texture base class. This is never called by client code.
## Protected Member Functions
| Texture (Renderer *owner)
| Constructor for Texture base class. This is never called by client code.

## 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

virtual ushort CEGUI::Texture::getHeight | ( | void |  | ) | const`[pure virtual]`

| Returns the current pixel height of the texture. Returns: ushort value that is the current height of the texture in pixels Implemented in CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

Renderer* CEGUI::Texture::getRenderer | ( | void |  | ) | const`[inline]`

| Return a pointer to the Renderer object that created and owns this Texture. Returns: Pointer to the Renderer object that owns the Texture

virtual ushort CEGUI::Texture::getWidth | ( | void |  | ) | const`[pure virtual]`

| Returns the current pixel width of the texture. Returns: ushort value that is the current width of the texture in pixels Implemented in CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

virtual void CEGUI::Texture::loadFromFile | ( | const String & | filename,
|  | const String & | resourceGroup
| ) | `[pure virtual]`

  | Loads the specified image file into the texture. The texture is resized as required to hold the image. Parameters:
  | 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.
Returns: Nothing. Implemented in CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

virtual void CEGUI::Texture::loadFromMemory | ( | const void * | buffPtr,
|  | uint | buffWidth,
|  | uint | buffHeight
| ) | `[pure virtual]`

  | Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image. Parameters:
  | buffPtr | Pointer to the buffer containing the image data
  | buffWidth | Width of the buffer (in 0xAARRGGBB pixels)
  | buffHeight | Height of the buffer (in 0xAARRGGBB pixels)
Returns: Nothing. Implemented in CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.