Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUI::Texture Class Reference

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

#include <CEGUITexture.h>

Inheritance diagram for CEGUI::Texture:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::Texture:

Collaboration graph
[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.
RenderergetRenderer (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.

Definition at line 45 of file CEGUITexture.h.


Constructor & Destructor Documentation

CEGUI::Texture::Texture Renderer owner  )  [inline, protected]
 

Constructor for Texture base class. This is never called by client code.

Definition at line 124 of file CEGUITexture.h.

virtual CEGUI::Texture::~Texture void   )  [inline, virtual]
 

Destructor for Texture base class. This is never called by client code.

Definition at line 131 of file CEGUITexture.h.


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, CEGUI::IrrlichtTexture, and CEGUI::OpenGLTexture.

Referenced by CEGUI::IrrlichtRenderer::addQuad(), CEGUI::Imageset::draw(), CEGUI::DirectX81Renderer::getHeight(), CEGUI::OpenGLRenderer::getHeight(), and CEGUI::DirectX9Renderer::getHeight().

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

Definition at line 113 of file CEGUITexture.h.

Referenced by CEGUI::Imageset::draw(), CEGUI::DirectX81Texture::loadFromFile(), CEGUI::DirectX9Texture::loadFromFile(), CEGUI::DirectX81Texture::loadFromMemory(), CEGUI::DirectX9Texture::loadFromMemory(), CEGUI::DirectX81Texture::setD3DTextureSize(), CEGUI::DirectX9Texture::setD3DTextureSize(), and CEGUI::Imageset_xmlHandler::startElement().

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, CEGUI::IrrlichtTexture, and CEGUI::OpenGLTexture.

Referenced by CEGUI::IrrlichtRenderer::addQuad(), CEGUI::Imageset::draw(), CEGUI::DirectX81Renderer::getWidth(), CEGUI::OpenGLRenderer::getWidth(), and CEGUI::DirectX9Renderer::getWidth().

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, CEGUI::IrrlichtTexture, 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, CEGUI::IrrlichtTexture, and CEGUI::OpenGLTexture.


The documentation for this class was generated from the following file:
Generated on Wed Feb 16 12:41:11 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1