Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
TextureBaseClass Class Referenceabstract

#include <texture.h>

Inherits RefCountClass.

Inherited by TextureClass, and ZTextureClass.

Public Types

enum  PoolType { POOL_DEFAULT =0 , POOL_MANAGED , POOL_SYSTEMMEM }
 
enum  TexAssetType { TEX_REGULAR , TEX_CUBEMAP , TEX_VOLUME }
 

Public Member Functions

 TextureBaseClass (unsigned width, unsigned height, MipCountType mip_level_count=MIP_LEVELS_ALL, PoolType pool=POOL_MANAGED, bool rendertarget=false, bool reducible=true)
 
virtual ~TextureBaseClass ()
 Base texture class destructor.
 
virtual TexAssetType Get_Asset_Type () const =0
 
void Set_Texture_Name (const char *name)
 Set texture name.
 
void Set_Full_Path (const char *path)
 
const StringClassGet_Texture_Name (void) const
 
const StringClassGet_Full_Path (void) const
 
unsigned Get_ID () const
 
unsigned int Get_Mip_Level_Count (void) const
 
int Get_Width () const
 
int Get_Height () const
 
void Set_Inactivation_Time (unsigned time)
 
int Get_Inactivation_Time () const
 
unsigned int Get_Priority (void)
 Get priority.
 
unsigned int Set_Priority (unsigned int priority)
 Set priority.
 
virtual unsigned Get_Texture_Memory_Usage () const =0
 
bool Is_Initialized () const
 
bool Is_Lightmap () const
 
bool Is_Procedural () const
 
bool Is_Reducible () const
 
virtual void Init ()=0
 
void Invalidate ()
 Invalidate this texture.
 
IDirect3DBaseTexture8 * Peek_D3D_Base_Texture () const
 Returns a pointer to the d3d texture.
 
void Set_D3D_Base_Texture (IDirect3DBaseTexture8 *tex)
 Set the d3d texture pointer. Handles ref counts properly.
 
PoolType Get_Pool () const
 
bool Is_Missing_Texture ()
 Is missing texture.
 
bool Is_Dirty ()
 
void Set_Dirty ()
 
void Clean ()
 
void Set_HSV_Shift (const Vector3 &hsv_shift)
 
const Vector3Get_HSV_Shift ()
 
bool Is_Compression_Allowed () const
 
unsigned Get_Reduction () const
 Get reduction mip levels.
 
virtual void Apply_New_Surface (IDirect3DBaseTexture8 *tex, bool initialized, bool disable_auto_invalidation=false)=0
 
virtual void Apply (unsigned int stage)=0
 
virtual TextureClassAs_TextureClass ()
 
virtual CubeTextureClassAs_CubeTextureClass ()
 
virtual VolumeTextureClassAs_VolumeTextureClass ()
 
IDirect3DTexture8 * Peek_D3D_Texture () const
 
IDirect3DVolumeTexture8 * Peek_D3D_VolumeTexture () const
 
IDirect3DCubeTexture8 * Peek_D3D_CubeTexture () const
 
- Public Member Functions inherited from RefCountClass
 RefCountClass (void)
 
 RefCountClass (const RefCountClass &)
 
void Add_Ref (void) const
 
WWINLINE void Release_Ref (void) const
 
int Num_Refs (void) const
 
virtual void Delete_This (void)
 

Static Public Member Functions

static int _Get_Total_Locked_Surface_Size ()
 Get total locked surface size.
 
static int _Get_Total_Texture_Size ()
 Get total texture size.
 
static int _Get_Total_Lightmap_Texture_Size ()
 Get total lightmap texture size.
 
static int _Get_Total_Procedural_Texture_Size ()
 Get total procedural texture size.
 
static int _Get_Total_Locked_Surface_Count ()
 Get total locked surface count.
 
static int _Get_Total_Texture_Count ()
 Get total texture count.
 
static int _Get_Total_Lightmap_Texture_Count ()
 Get total light map texture count.
 
static int _Get_Total_Procedural_Texture_Count ()
 Get total procedural texture count.
 
static void Invalidate_Old_Unused_Textures (unsigned inactive_time_override)
 Invalidate old unused textures.
 
static void Apply_Null (unsigned int stage)
 Apply NULL texture state.
 
- Static Public Member Functions inherited from RefCountClass
static int Total_Refs (void)
 
static RefCountClassAdd_Active_Ref (RefCountClass *obj)
 
static RefCountClassSet_Ref_Owner (RefCountClass *obj, char *file, int line)
 
static void Remove_Active_Ref (RefCountClass *obj)
 
static bool Validate_Active_Ref (RefCountClass *obj)
 

Public Attributes

MipCountType MipLevelCount
 
- Public Attributes inherited from RefCountClass
RefCountNodeClass ActiveRefNode
 
ActiveRefStruct ActiveRefInfo
 

Protected Member Functions

void Load_Locked_Surface ()
 Load locked surface.
 
void Poke_Texture (IDirect3DBaseTexture8 *tex)
 
- Protected Member Functions inherited from RefCountClass
virtual ~RefCountClass (void)
 

Protected Attributes

bool Initialized
 
bool IsLightmap
 
bool IsCompressionAllowed
 
bool IsProcedural
 
bool IsReducible
 
unsigned InactivationTime
 
unsigned ExtendedInactivationTime
 
unsigned LastInactivationSyncTime
 
unsigned LastAccessed
 
Vector3 HSVShift
 
int Width
 
int Height
 

Friends

class TextureLoader
 
class LoaderThreadClass
 
class DX8TextureTrackerClass
 
class DX8ZTextureTrackerClass
 
class TextureLoadTaskClass
 
class CubeTextureLoadTaskClass
 
class VolumeTextureLoadTaskClass
 

Additional Inherited Members

- Static Public Attributes inherited from RefCountClass
static RefCountListClass ActiveRefList
 

Detailed Description

Definition at line 71 of file texture.h.

Member Enumeration Documentation

◆ PoolType

Enumerator
POOL_DEFAULT 
POOL_MANAGED 
POOL_SYSTEMMEM 

Definition at line 80 of file texture.h.

◆ TexAssetType

Enumerator
TEX_REGULAR 
TEX_CUBEMAP 
TEX_VOLUME 

Definition at line 87 of file texture.h.

Constructor & Destructor Documentation

◆ TextureBaseClass()

TextureBaseClass::TextureBaseClass ( unsigned width,
unsigned height,
MipCountType mip_level_count = MIP_LEVELS_ALL,
PoolType pool = POOL_MANAGED,
bool rendertarget = false,
bool reducible = true )

KM General base constructor for texture classes

Definition at line 81 of file texture.cpp.

◆ ~TextureBaseClass()

TextureBaseClass::~TextureBaseClass ( void )
virtual

Base texture class destructor.

KJM

Definition at line 119 of file texture.cpp.

Member Function Documentation

◆ _Get_Total_Lightmap_Texture_Count()

int TextureBaseClass::_Get_Total_Lightmap_Texture_Count ( )
static

Get total light map texture count.

Definition at line 531 of file texture.cpp.

◆ _Get_Total_Lightmap_Texture_Size()

int TextureBaseClass::_Get_Total_Lightmap_Texture_Size ( )
static

Get total lightmap texture size.

Definition at line 465 of file texture.cpp.

◆ _Get_Total_Locked_Surface_Count()

int TextureBaseClass::_Get_Total_Locked_Surface_Count ( )
static

Get total locked surface count.

Definition at line 574 of file texture.cpp.

◆ _Get_Total_Locked_Surface_Size()

int TextureBaseClass::_Get_Total_Locked_Surface_Size ( )
static

Get total locked surface size.

KM

Definition at line 421 of file texture.cpp.

◆ _Get_Total_Procedural_Texture_Count()

int TextureBaseClass::_Get_Total_Procedural_Texture_Count ( )
static

Get total procedural texture count.

Definition at line 552 of file texture.cpp.

◆ _Get_Total_Procedural_Texture_Size()

int TextureBaseClass::_Get_Total_Procedural_Texture_Size ( )
static

Get total procedural texture size.

Definition at line 488 of file texture.cpp.

◆ _Get_Total_Texture_Count()

int TextureBaseClass::_Get_Total_Texture_Count ( )
static

Get total texture count.

Definition at line 510 of file texture.cpp.

◆ _Get_Total_Texture_Size()

int TextureBaseClass::_Get_Total_Texture_Size ( )
static

Get total texture size.

KM

Definition at line 443 of file texture.cpp.

◆ Apply()

virtual void TextureBaseClass::Apply ( unsigned int stage)
pure virtual

◆ Apply_New_Surface()

virtual void TextureBaseClass::Apply_New_Surface ( IDirect3DBaseTexture8 * tex,
bool initialized,
bool disable_auto_invalidation = false )
pure virtual

◆ Apply_Null()

void TextureBaseClass::Apply_Null ( unsigned int stage)
static

Apply NULL texture state.

Definition at line 400 of file texture.cpp.

◆ As_CubeTextureClass()

virtual CubeTextureClass * TextureBaseClass::As_CubeTextureClass ( )
inlinevirtual

Reimplemented in CubeTextureClass.

Definition at line 202 of file texture.h.

◆ As_TextureClass()

virtual TextureClass * TextureBaseClass::As_TextureClass ( )
inlinevirtual

Reimplemented in TextureClass.

Definition at line 201 of file texture.h.

◆ As_VolumeTextureClass()

virtual VolumeTextureClass * TextureBaseClass::As_VolumeTextureClass ( )
inlinevirtual

Reimplemented in VolumeTextureClass.

Definition at line 203 of file texture.h.

◆ Clean()

void TextureBaseClass::Clean ( )
inline

Definition at line 175 of file texture.h.

◆ Get_Asset_Type()

virtual TexAssetType TextureBaseClass::Get_Asset_Type ( ) const
pure virtual

◆ Get_Full_Path()

const StringClass & TextureBaseClass::Get_Full_Path ( void ) const
inline

Definition at line 113 of file texture.h.

◆ Get_Height()

int TextureBaseClass::Get_Height ( ) const
inline

Definition at line 128 of file texture.h.

◆ Get_HSV_Shift()

const Vector3 & TextureBaseClass::Get_HSV_Shift ( )
inline

Definition at line 178 of file texture.h.

◆ Get_ID()

unsigned TextureBaseClass::Get_ID ( ) const
inline

Definition at line 115 of file texture.h.

◆ Get_Inactivation_Time()

int TextureBaseClass::Get_Inactivation_Time ( ) const
inline

Definition at line 136 of file texture.h.

◆ Get_Mip_Level_Count()

unsigned int TextureBaseClass::Get_Mip_Level_Count ( void ) const
inline

Definition at line 118 of file texture.h.

◆ Get_Pool()

PoolType TextureBaseClass::Get_Pool ( ) const
inline

Definition at line 168 of file texture.h.

◆ Get_Priority()

unsigned int TextureBaseClass::Get_Priority ( void )

Get priority.

Definition at line 335 of file texture.cpp.

◆ Get_Reduction()

unsigned TextureBaseClass::Get_Reduction ( ) const

Get reduction mip levels.

Definition at line 375 of file texture.cpp.

◆ Get_Texture_Memory_Usage()

virtual unsigned TextureBaseClass::Get_Texture_Memory_Usage ( ) const
pure virtual

Implemented in TextureClass, and ZTextureClass.

◆ Get_Texture_Name()

const StringClass & TextureBaseClass::Get_Texture_Name ( void ) const
inline

Definition at line 112 of file texture.h.

◆ Get_Width()

int TextureBaseClass::Get_Width ( ) const
inline

Definition at line 124 of file texture.h.

◆ Init()

virtual void TextureBaseClass::Init ( )
pure virtual

Implemented in TextureClass, and ZTextureClass.

◆ Invalidate()

void TextureBaseClass::Invalidate ( )

Invalidate this texture.

Definition at line 194 of file texture.cpp.

◆ Invalidate_Old_Unused_Textures()

void TextureBaseClass::Invalidate_Old_Unused_Textures ( unsigned inactive_time_override)
static

Invalidate old unused textures.

Definition at line 142 of file texture.cpp.

◆ Is_Compression_Allowed()

bool TextureBaseClass::Is_Compression_Allowed ( ) const
inline

Definition at line 180 of file texture.h.

◆ Is_Dirty()

bool TextureBaseClass::Is_Dirty ( )
inline

Definition at line 173 of file texture.h.

◆ Is_Initialized()

bool TextureBaseClass::Is_Initialized ( ) const
inline

Definition at line 145 of file texture.h.

◆ Is_Lightmap()

bool TextureBaseClass::Is_Lightmap ( ) const
inline

Definition at line 146 of file texture.h.

◆ Is_Missing_Texture()

bool TextureBaseClass::Is_Missing_Texture ( )

Is missing texture.

Definition at line 302 of file texture.cpp.

◆ Is_Procedural()

bool TextureBaseClass::Is_Procedural ( ) const
inline

Definition at line 147 of file texture.h.

◆ Is_Reducible()

bool TextureBaseClass::Is_Reducible ( ) const
inline

Definition at line 148 of file texture.h.

◆ Load_Locked_Surface()

void TextureBaseClass::Load_Locked_Surface ( )
protected

Load locked surface.

Definition at line 288 of file texture.cpp.

◆ Peek_D3D_Base_Texture()

IDirect3DBaseTexture8 * TextureBaseClass::Peek_D3D_Base_Texture ( ) const

Returns a pointer to the d3d texture.

Definition at line 258 of file texture.cpp.

◆ Peek_D3D_CubeTexture()

IDirect3DCubeTexture8 * TextureBaseClass::Peek_D3D_CubeTexture ( ) const
inline

Definition at line 207 of file texture.h.

◆ Peek_D3D_Texture()

IDirect3DTexture8 * TextureBaseClass::Peek_D3D_Texture ( ) const
inline

Definition at line 205 of file texture.h.

◆ Peek_D3D_VolumeTexture()

IDirect3DVolumeTexture8 * TextureBaseClass::Peek_D3D_VolumeTexture ( ) const
inline

Definition at line 206 of file texture.h.

◆ Poke_Texture()

void TextureBaseClass::Poke_Texture ( IDirect3DBaseTexture8 * tex)
inlineprotected

Definition at line 212 of file texture.h.

◆ Set_D3D_Base_Texture()

void TextureBaseClass::Set_D3D_Base_Texture ( IDirect3DBaseTexture8 * tex)

Set the d3d texture pointer. Handles ref counts properly.

Definition at line 268 of file texture.cpp.

◆ Set_Dirty()

void TextureBaseClass::Set_Dirty ( )
inline

Definition at line 174 of file texture.h.

◆ Set_Full_Path()

void TextureBaseClass::Set_Full_Path ( const char * path)
inline

Definition at line 111 of file texture.h.

◆ Set_HSV_Shift()

void TextureBaseClass::Set_HSV_Shift ( const Vector3 & hsv_shift)

Definition at line 411 of file texture.cpp.

◆ Set_Inactivation_Time()

void TextureBaseClass::Set_Inactivation_Time ( unsigned time)
inline

Definition at line 135 of file texture.h.

◆ Set_Priority()

unsigned int TextureBaseClass::Set_Priority ( unsigned int priority)

Set priority.

Definition at line 355 of file texture.cpp.

◆ Set_Texture_Name()

void TextureBaseClass::Set_Texture_Name ( const char * name)

Set texture name.

Definition at line 323 of file texture.cpp.

Friends And Related Symbol Documentation

◆ CubeTextureLoadTaskClass

friend class CubeTextureLoadTaskClass
friend

Definition at line 254 of file texture.h.

◆ DX8TextureTrackerClass

friend class DX8TextureTrackerClass
friend

Definition at line 75 of file texture.h.

◆ DX8ZTextureTrackerClass

friend class DX8ZTextureTrackerClass
friend

Definition at line 76 of file texture.h.

◆ LoaderThreadClass

friend class LoaderThreadClass
friend

Definition at line 74 of file texture.h.

◆ TextureLoader

friend class TextureLoader
friend

Definition at line 73 of file texture.h.

◆ TextureLoadTaskClass

friend class TextureLoadTaskClass
friend

Definition at line 253 of file texture.h.

◆ VolumeTextureLoadTaskClass

friend class VolumeTextureLoadTaskClass
friend

Definition at line 255 of file texture.h.

Member Data Documentation

◆ ExtendedInactivationTime

unsigned TextureBaseClass::ExtendedInactivationTime
protected

Definition at line 224 of file texture.h.

◆ Height

int TextureBaseClass::Height
protected

Definition at line 234 of file texture.h.

◆ HSVShift

Vector3 TextureBaseClass::HSVShift
protected

Definition at line 231 of file texture.h.

◆ InactivationTime

unsigned TextureBaseClass::InactivationTime
protected

Definition at line 223 of file texture.h.

◆ Initialized

bool TextureBaseClass::Initialized
protected

Definition at line 214 of file texture.h.

◆ IsCompressionAllowed

bool TextureBaseClass::IsCompressionAllowed
protected

Definition at line 218 of file texture.h.

◆ IsLightmap

bool TextureBaseClass::IsLightmap
protected

Definition at line 217 of file texture.h.

◆ IsProcedural

bool TextureBaseClass::IsProcedural
protected

Definition at line 219 of file texture.h.

◆ IsReducible

bool TextureBaseClass::IsReducible
protected

Definition at line 220 of file texture.h.

◆ LastAccessed

unsigned TextureBaseClass::LastAccessed
mutableprotected

Definition at line 226 of file texture.h.

◆ LastInactivationSyncTime

unsigned TextureBaseClass::LastInactivationSyncTime
protected

Definition at line 225 of file texture.h.

◆ MipLevelCount

MipCountType TextureBaseClass::MipLevelCount

Definition at line 187 of file texture.h.

◆ Width

int TextureBaseClass::Width
protected

Definition at line 233 of file texture.h.


The documentation for this class was generated from the following files: