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

CEGUI::DirectX9Texture Class Reference

Texture class that is created by DirectX9Renderer objects. More...

#include <d3d9texture.h>

Inheritance diagram for CEGUI::DirectX9Texture:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ushort getWidth (void) const
 Returns the current pixel width of the texture.
virtual ushort getHeight (void) const
 Returns the current pixel height of the texture.
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.
virtual void loadFromMemory (const void *buffPtr, uint buffWidth, uint buffHeight)
 Loads (copies) an image in memory into the texture. The texture is resized as required to hold the image.
LPDIRECT3DTEXTURE9 getD3DTexture (void) const
 Return a pointer to the internal Direct3DTexture9 object.
void setD3DTextureSize (uint size)
 set the size of the internal D3D texture. Previous D3D texture is lost.
virtual void preD3DReset (void)
 Direct3D support method that must be called prior to a Reset call on the Direct3DDevice; this is required so that the GUI renderer can release any unmanaged D3D resources as needed for the device reset to succeed.
virtual void postD3DReset (void)
 Direct3D support method that must be called after a Reset call on the Direct3DDevice; this is required so that the GUI renderer can rebuild any unmanaged D3D resources after the device has been reset.
RenderergetRenderer (void) const
 Return a pointer to the Renderer object that created and owns this Texture.

Friends

TextureDirectX9Renderer::createTexture (void)
TextureDirectX9Renderer::createTexture (const String &filename, const String &resourceGroup)
TextureDirectX9Renderer::createTexture (float size)
void DirectX9Renderer::destroyTexture (Texture *texture)

Detailed Description

Texture class that is created by DirectX9Renderer objects.

Definition at line 44 of file d3d9texture.h.


Member Function Documentation

LPDIRECT3DTEXTURE9 CEGUI::DirectX9Texture::getD3DTexture void   )  const [inline]
 

Return a pointer to the internal Direct3DTexture9 object.

Returns:
Pointer to the IDirect3DTexture9 interface currently being used by this Texture object

Definition at line 125 of file d3d9texture.h.

virtual ushort CEGUI::DirectX9Texture::getHeight void   )  const [inline, 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.

Definition at line 80 of file d3d9texture.h.

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

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(), loadFromFile(), CEGUI::DirectX81Texture::loadFromMemory(), loadFromMemory(), CEGUI::DirectX81Texture::setD3DTextureSize(), and setD3DTextureSize().

virtual ushort CEGUI::DirectX9Texture::getWidth void   )  const [inline, 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.

Definition at line 70 of file d3d9texture.h.

void CEGUI::DirectX9Texture::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:
filename The filename of the image file that is to be loaded into the texture
resourceGroup Resource group identifier passed to the resource provider.
Returns:
Nothing.

Implements CEGUI::Texture.

Definition at line 63 of file d3d9texture.cpp.

References CEGUI::DataContainer< T >::getDataPtr(), CEGUI::Texture::getRenderer(), CEGUI::System::getResourceProvider(), CEGUI::System::getSingleton(), CEGUI::DataContainer< T >::getSize(), CEGUI::ResourceProvider::loadRawDataContainer(), and CEGUI::ResourceProvider::unloadRawDataContainer().

Referenced by CEGUI::DirectX9Renderer::createTexture(), and postD3DReset().

void CEGUI::DirectX9Texture::loadFromMemory const void *  buffPtr,
uint  buffWidth,
uint  buffHeight
[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.

Implements CEGUI::Texture.

Definition at line 98 of file d3d9texture.cpp.

References ceguimax, and CEGUI::Texture::getRenderer().

void CEGUI::DirectX9Texture::postD3DReset void   )  [virtual]
 

Direct3D support method that must be called after a Reset call on the Direct3DDevice; this is required so that the GUI renderer can rebuild any unmanaged D3D resources after the device has been reset.

Note:
You do not need to call this on DirectX9Texture objects created via the DirectX9Renderer object; for such textures the method is called by the system when you call the DirectX9Renderer::postD3DReset method.

Definition at line 233 of file d3d9texture.cpp.

References loadFromFile().

void CEGUI::DirectX9Texture::preD3DReset void   )  [virtual]
 

Direct3D support method that must be called prior to a Reset call on the Direct3DDevice; this is required so that the GUI renderer can release any unmanaged D3D resources as needed for the device reset to succeed.

Note:
You do not need to call this on DirectX9Texture objects created via the DirectX9Renderer object; for such textures the method is called by the system when you call the DirectX9Renderer::preD3DReset method.

Definition at line 207 of file d3d9texture.cpp.

void CEGUI::DirectX9Texture::setD3DTextureSize uint  size  ) 
 

set the size of the internal D3D texture. Previous D3D texture is lost.

Parameters:
size pixel size of the new internal texture. This will be rounded up to a power of 2.
Returns:
Nothing.

Definition at line 180 of file d3d9texture.cpp.

References CEGUI::Texture::getRenderer().

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


Friends And Related Function Documentation

Texture* DirectX9Renderer::createTexture float  size  )  [friend]
 

Texture* DirectX9Renderer::createTexture const String filename,
const String resourceGroup
[friend]
 

Texture* DirectX9Renderer::createTexture void   )  [friend]
 

void DirectX9Renderer::destroyTexture Texture texture  )  [friend]
 


The documentation for this class was generated from the following files:
Generated on Wed Sep 7 10:10:21 2005 for Crazy Eddies GUI System by  doxygen 1.4.3