GFXD3D9TextureManager Class Reference

#include <gfxD3D9TextureManager.h>

Inheritance diagram for GFXD3D9TextureManager:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 GFXD3D9TextureManager (LPDIRECT3DDEVICE9 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 (GFXD3D9TextureObject *obj, U32 height, U32 width, U32 depth, GFXFormat format, GFXTextureProfile *profile, U32 numMipLevels, bool forceMips=false, S32 antialiasLevel=0)

Private Attributes

U32 mCurTexSet [TEXTURE_STAGE_COUNT]
LPDIRECT3DDEVICE9 mD3DDevice
D3DCAPS9 mDeviceCaps

Friends

class GFXD3D9TextureObject

Constructor & Destructor Documentation

GFXD3D9TextureManager::GFXD3D9TextureManager ( LPDIRECT3DDEVICE9  d3ddevice  ) 


Member Function Documentation

GFXTextureObject* GFXD3D9TextureManager::_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 GFXD3D9TextureManager::_loadTexture ( GFXTextureObject texture,
DDSFile dds 
) [protected, virtual]

Load a texture from a proper DDSFile instance.

Implements GFXTextureManager.

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

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

Implements GFXTextureManager.

bool GFXD3D9TextureManager::_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 GFXD3D9TextureManager::_refreshTexture ( GFXTextureObject texture  )  [protected, virtual]

Refresh a texture using the internal API.

Implements GFXTextureManager.

bool GFXD3D9TextureManager::_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 GFXD3D9TextureManager::_getTotalVideoMemory (  )  [protected, virtual]

Returns available VRAM in bytes.

Implements GFXTextureManager.

void GFXD3D9TextureManager::_innerCreateTexture ( GFXD3D9TextureObject obj,
U32  height,
U32  width,
U32  depth,
GFXFormat  format,
GFXTextureProfile profile,
U32  numMipLevels,
bool  forceMips = false,
S32  antialiasLevel = 0 
) [private]


Friends And Related Function Documentation

friend class GFXD3D9TextureObject [friend]


Member Data Documentation

U32 GFXD3D9TextureManager::mCurTexSet[TEXTURE_STAGE_COUNT] [private]

LPDIRECT3DDEVICE9 GFXD3D9TextureManager::mD3DDevice [private]