Crazy Eddies GUI System  0.6.2
Public Member Functions | List of all members
CEGUI::IrrlichtTexture Class Reference
+ Inheritance diagram for CEGUI::IrrlichtTexture:
+ Collaboration diagram for CEGUI::IrrlichtTexture:

Public Member Functions

 IrrlichtTexture (Renderer *r, irr::IrrlichtDevice *device)
 
 IrrlichtTexture (Renderer *r, irr::IrrlichtDevice *dr, float size)
 
irr::video::ITexture * getTexture ()
 
void setTexture (irr::video::ITexture *texture)
 
virtual ushort getWidth (void) const
 Returns the current pixel width of the texture. More...
 
virtual ushort getOriginalWidth (void) const
 Returns the original pixel width of 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
 Returns the current pixel height of the texture. More...
 
virtual ushort getOriginalHeight (void) const
 Returns the original pixel height of 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)
 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)
 Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image. More...
 
- Public Member Functions inherited from CEGUI::Texture
RenderergetRenderer (void) const
 Return a pointer to the Renderer object that created and owns this Texture. More...
 

Additional Inherited Members

- Public Types inherited from CEGUI::Texture
enum  PixelFormat { PF_RGB, PF_RGBA }
 Enum containing the list of supported pixel formats that can be passed to loadFromMemory. More...
 
- Protected Member Functions inherited from CEGUI::Texture
 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.
 

Member Function Documentation

ushort CEGUI::IrrlichtTexture::getHeight ( void  ) const
virtual

Returns the current pixel height of the texture.

Returns
ushort value that is the current height of the texture in pixels

Implements CEGUI::Texture.

ushort CEGUI::IrrlichtTexture::getOriginalHeight ( void  ) const
virtual

Returns the original pixel height of the texture.

Returns
ushort value that is the original height of the texture data in pixels

Reimplemented from CEGUI::Texture.

ushort CEGUI::IrrlichtTexture::getOriginalWidth ( void  ) const
virtual

Returns the original pixel width of the texture.

Returns
ushort value that is the original width of the texture data in pixels

Reimplemented from CEGUI::Texture.

ushort CEGUI::IrrlichtTexture::getWidth ( void  ) const
virtual

Returns the current pixel width of the texture.

Returns
ushort value that is the current width of the texture in pixels

Implements CEGUI::Texture.

float CEGUI::IrrlichtTexture::getXScale ( void  ) const
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 from CEGUI::Texture.

float CEGUI::IrrlichtTexture::getYScale ( void  ) const
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 from CEGUI::Texture.

void CEGUI::IrrlichtTexture::loadFromFile ( const String filename,
const String resourceGroup 
)
virtual

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 passed to the resource provider.
Returns
Nothing.

Implements CEGUI::Texture.

References CEGUI::RawDataContainer::getDataPtr(), CEGUI::System::getResourceProvider(), CEGUI::System::getSingleton(), CEGUI::RawDataContainer::getSize(), CEGUI::ResourceProvider::loadRawDataContainer(), and CEGUI::ResourceProvider::unloadRawDataContainer().

Referenced by CEGUI::IrrlichtRenderer::createTexture().

void CEGUI::IrrlichtTexture::loadFromMemory ( const void *  buffPtr,
uint  buffWidth,
uint  buffHeight,
PixelFormat  pixelFormat 
)
virtual

Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image.

Parameters
buffPtrPointer to the buffer containing the image data
buffWidthWidth of the buffer (in pixels as specified by pixelFormat )
buffHeightHeight of the buffer (in pixels as specified by pixelFormat )
pixelFormatPixelFormat value describing the format contained in buffPtr
Returns
Nothing.

Implements CEGUI::Texture.

References CEGUI::Texture::PF_RGB, and CEGUI::Texture::PF_RGBA.