CEGUI::Texture Class Reference

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

Inherited by CEGUI::DirectfbTexture, CEGUI::DirectX10Texture, CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, CEGUI::IrrlichtTexture, and CEGUI::OpenGLTexture.

Collaboration diagram for CEGUI::Texture:

Collaboration graph
[legend]

List of all members.

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.
virtual ushort getOriginalWidth (void) const
 Returns the original pixel width of the data loaded into the texture.
virtual float getXScale (void) const
 Returns the current scale used for the width of the texture.
virtual ushort getHeight (void) const =0
 Returns the current pixel height of the texture.
virtual ushort getOriginalHeight (void) const
 Returns the original pixel height of the data loaded into the texture.
virtual float getYScale (void) const
 Returns the current scale used for the 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, PixelFormat pixelFormat)=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.

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.


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 Enumeration Documentation

Enum containing the list of supported pixel formats that can be passed to loadFromMemory.

Enumerator:
PF_RGB  Each pixel is 3 bytes. RGB in that order.
PF_RGBA  Each pixel is 4 bytes. RGBA in that order.


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::DirectfbTexture, CEGUI::DirectX10Texture, CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

Referenced by CEGUI::IrrlichtRenderer::addQuad(), and CEGUI::DirectfbRenderer::addQuad().

virtual ushort CEGUI::Texture::getOriginalHeight ( void   )  const [inline, virtual]

Returns the original pixel height of the data loaded into the texture.

Returns:
ushort value that is the original height, in pixels, of the data last loaded into the texture.
Note:
for compatibility reason this method is optional the auto scale issue mantis ticket # 0000045 is not fixed for renderer that do not handle this.

Reimplemented in CEGUI::DirectX10Texture, CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

virtual ushort CEGUI::Texture::getOriginalWidth ( void   )  const [inline, virtual]

Returns the original pixel width of the data loaded into the texture.

Returns:
ushort value that is the original width, in pixels, of the data last loaded into the texture.
Note:
for compatibility reason this method is optional the auto scale issue mantis ticket # 0000045 is not fixed for renderer that do not handle this.

Reimplemented in CEGUI::DirectX10Texture, CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

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

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::DirectfbTexture, CEGUI::DirectX10Texture, CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

Referenced by CEGUI::IrrlichtRenderer::addQuad(), and CEGUI::DirectfbRenderer::addQuad().

virtual float CEGUI::Texture::getXScale ( void   )  const [inline, virtual]

Returns the current scale used for the width of the texture.

Returns:
float value that denotes the horizontal scaling required to accurately map pixel positions to texture co-ords.

Reimplemented in CEGUI::OpenGLTexture.

Referenced by CEGUI::Imageset::draw().

virtual float CEGUI::Texture::getYScale ( void   )  const [inline, virtual]

Returns the current scale used for the height of the texture.

Returns:
float value that denotes the vertical scaling required to accurately map pixel positions to texture co-ords.

Reimplemented in CEGUI::OpenGLTexture.

Referenced by CEGUI::Imageset::draw().

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::DirectfbTexture, CEGUI::DirectX10Texture, CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

virtual void CEGUI::Texture::loadFromMemory ( const void *  buffPtr,
uint  buffWidth,
uint  buffHeight,
PixelFormat  pixelFormat 
) [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 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
Returns:
Nothing.

Implemented in CEGUI::DirectfbTexture, CEGUI::DirectX10Texture, CEGUI::DirectX81Texture, CEGUI::DirectX9Texture, and CEGUI::OpenGLTexture.

Referenced by CEGUI::TGAImageCodec::load(), CEGUI::SILLYImageCodec::load(), CEGUI::FreeImageImageCodec::load(), CEGUI::DevILImageCodec::load(), CEGUI::CoronaImageCodec::load(), and CEGUI::FreeTypeFont::rasterize().


Generated on Thu Nov 27 20:34:32 2008 for Crazy Eddies GUI System by  doxygen 1.5.7.1