GFXD3D8TextureManager Class Reference

#include <gfxD3D8TextureManager.h>

Inheritance diagram for GFXD3D8TextureManager:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 GFXD3D8TextureManager (IDirect3DDevice8 *d3ddevice)

Protected Member Functions

GFXTextureObject_createTexture (U32 height, U32 width, U32 depth, GFXFormat format, GFXTextureProfile *profile, U32 numMipLevels, bool forceMips=false, S32 antialiasLevel=0)
 Allocate a texture with the internal API.
bool _loadTexture (GFXTextureObject *texture, DDSFile *dds)
 Load a texture from a proper DDSFile instance.
bool _loadTexture (GFXTextureObject *texture, GBitmap *bmp)
 Load data into a texture from a GBitmap using the internal API.
bool _loadTexture (GFXTextureObject *texture, void *raw)
 Load data into a texture from a raw buffer using the internal API.
bool _refreshTexture (GFXTextureObject *texture)
 Refresh a texture using the internal API.
bool _freeTexture (GFXTextureObject *texture, bool zombify=false)
 Free a texture (but do not delete the GFXTextureObject) using the internal API.
U32 _getTotalVideoMemory ()
 Returns available VRAM in bytes.

Private Member Functions

void innerCreateTexture (GFXD3D8TextureObject *obj, U32 height, U32 width, U32 depth, GFXFormat format, GFXTextureProfile *profile, U32 numMipLevels, bool forceMips=false)

Private Attributes

U32 mCurTexSet [TEXTURE_STAGE_COUNT]
IDirect3DDevice8 * mD3DDevice

Friends

class GFXD3D8TextureObject

Constructor & Destructor Documentation

GFXD3D8TextureManager::GFXD3D8TextureManager ( IDirect3DDevice8 *  d3ddevice  ) 


Member Function Documentation

void GFXD3D8TextureManager::innerCreateTexture ( GFXD3D8TextureObject obj,
U32  height,
U32  width,
U32  depth,
GFXFormat  format,
GFXTextureProfile profile,
U32  numMipLevels,
bool  forceMips = false 
) [private]

GFXTextureObject* GFXD3D8TextureManager::_createTexture ( U32  height,
U32  width,
U32  depth,
GFXFormat  format,
GFXTextureProfile profile,
U32  numMipLevels,
bool  forceMips = false,
S32  antialiasLevel = 0 
) [protected, virtual]

Allocate a texture with the internal API.

Parameters:
height Height of the texture.
width Width of the texture.
depth Depth of the texture. (Will normally be 1 unless we are doing a cubemap or volumetexture.)
format Pixel format of the texture.
profile Profile for the texture.
numMipLevels If not-NULL, then use that many mips. If NULL create the full mip chain
antialiasLevel,Use GFXTextureManager::AA_MATCH_BACKBUFFER to match the backbuffer settings (for render targets that want to share the backbuffer z buffer. 0 for no antialiasing, > 0 for levels that match the GFXVideoMode struct.

Implements GFXTextureManager.

bool GFXD3D8TextureManager::_loadTexture ( GFXTextureObject texture,
DDSFile dds 
) [protected, virtual]

Load a texture from a proper DDSFile instance.

Implements GFXTextureManager.

bool GFXD3D8TextureManager::_loadTexture ( GFXTextureObject texture,
GBitmap bmp 
) [protected, virtual]

Load data into a texture from a GBitmap using the internal API.

Implements GFXTextureManager.

bool GFXD3D8TextureManager::_loadTexture ( GFXTextureObject texture,
void raw 
) [protected, virtual]

Load data into a texture from a raw buffer using the internal API.

Note that the size of the buffer is assumed from the parameters used for this GFXTextureObject's _createTexture call.

Implements GFXTextureManager.

bool GFXD3D8TextureManager::_refreshTexture ( GFXTextureObject texture  )  [protected, virtual]

Refresh a texture using the internal API.

Implements GFXTextureManager.

bool GFXD3D8TextureManager::_freeTexture ( GFXTextureObject texture,
bool  zombify = false 
) [protected, virtual]

Free a texture (but do not delete the GFXTextureObject) using the internal API.

This is only called during zombification for textures which need it, so you don't need to do any internal safety checks.

Implements GFXTextureManager.

U32 GFXD3D8TextureManager::_getTotalVideoMemory (  )  [protected, virtual]

Returns available VRAM in bytes.

Implements GFXTextureManager.


Friends And Related Function Documentation

friend class GFXD3D8TextureObject [friend]


Member Data Documentation

U32 GFXD3D8TextureManager::mCurTexSet[TEXTURE_STAGE_COUNT] [private]

IDirect3DDevice8* GFXD3D8TextureManager::mD3DDevice [private]