GFXTextureProfile Class Reference

#include <gfxTextureProfile.h>

List of all members.

Public Types

 DiffuseMap
 NormalMap
 AlphaMap
 LuminanceMap
 PreserveSize = BIT(0)
 Never shrink this bitmap in low VRAM situations.
 NoMipmap = BIT(1)
 Do not generate mipmap chain for this texture.
 SystemMemory = BIT(2)
 System memory texture - isn't uploaded to card - useful as target for copying surface data out of video ram.
 RenderTarget = BIT(3)
 This texture will be used as a render target.
 Dynamic = BIT(4)
 This texture may be refreshed. (Precludes Static).
 Static = BIT(5)
 This texture will never be modified once loaded. (Precludes Dynamic).
 NoPadding = BIT(6)
 Do not pad this texture if it's non pow2.
 KeepBitmap = BIT(7)
 Always keep a copy of this texture's bitmap. (Potentially in addition to the API managed copy?).
 ZTarget = BIT(8)
 This texture will be used as a Z target.
 None
 DXT1
 DXT2
 DXT3
 DXT4
 DXT5
enum  Types {
  DiffuseMap,
  NormalMap,
  AlphaMap,
  LuminanceMap
}
enum  Flags {
  PreserveSize = BIT(0),
  NoMipmap = BIT(1),
  SystemMemory = BIT(2),
  RenderTarget = BIT(3),
  Dynamic = BIT(4),
  Static = BIT(5),
  NoPadding = BIT(6),
  KeepBitmap = BIT(7),
  ZTarget = BIT(8)
}
enum  Compression {
  None,
  DXT1,
  DXT2,
  DXT3,
  DXT4,
  DXT5
}

Public Member Functions

 GFXTextureProfile (const String &name, Types type, U32 flags, Compression compression=None)
String getName () const
Types getType () const
const Compression getCompression () const
bool testFlag (Flags flag) const
const U32 getDownscale () const
void setDownscale (const U32 shift)
void incActiveCopies ()
void decActiveCopies ()
bool doStoreBitmap () const
bool canDownscale () const
bool isDynamic () const
bool isRenderTarget () const
bool isZTarget () const
bool isSystemMemory () const
bool noMip () const

Static Public Member Functions

static void init ()
static GFXTextureProfilefind (const String &name)
static void updateStatsForCreation (GFXTextureObject *t)
static void updateStatsForDeletion (GFXTextureObject *t)

Private Types

 TypeBits = 2
 FlagBits = 9
 CompressionBits = 3
enum  Constants {
  TypeBits = 2,
  FlagBits = 9,
  CompressionBits = 3
}
 These constants control the packing for the profile; if you add flags, types, or compression info then make sure these are giving enough bits! More...

Private Attributes

String mName
 Name of this profile...
U32 mDownscale
 Amount to shift textures of this type down, if any.
U32 mProfile
 Stores a munged version of the profile data.
U32 mActiveCount
 Count of textures of this profile type allocated.
U32 mActiveTexels
 Amount of texelspace currently allocated under this profile.
U32 mActiveBytes
 Amount of storage currently allocated under this profile.
U32 mAllocatedTextures
 Total number of textures allocated under this profile.
U32 mAllocatedTexels
 Total number of texels allocated under this profile.
U32 mAllocatedBytes
 Total number of bytes allocated under this profile.
GFXTextureProfilemNext
 Keep a list of all the profiles.

Static Private Attributes

static GFXTextureProfilemHead


Member Enumeration Documentation

Enumerator:
DiffuseMap 
NormalMap 
AlphaMap 
LuminanceMap 

Enumerator:
PreserveSize  Never shrink this bitmap in low VRAM situations.
NoMipmap  Do not generate mipmap chain for this texture.
SystemMemory  System memory texture - isn't uploaded to card - useful as target for copying surface data out of video ram.
RenderTarget  This texture will be used as a render target.
Dynamic  This texture may be refreshed. (Precludes Static).
Static  This texture will never be modified once loaded. (Precludes Dynamic).
NoPadding  Do not pad this texture if it's non pow2.
KeepBitmap  Always keep a copy of this texture's bitmap. (Potentially in addition to the API managed copy?).
ZTarget  This texture will be used as a Z target.

Enumerator:
None 
DXT1 
DXT2 
DXT3 
DXT4 
DXT5 

These constants control the packing for the profile; if you add flags, types, or compression info then make sure these are giving enough bits!

Enumerator:
TypeBits 
FlagBits 
CompressionBits 


Constructor & Destructor Documentation

GFXTextureProfile::GFXTextureProfile ( const String name,
Types  type,
U32  flags,
Compression  compression = None 
)


Member Function Documentation

String GFXTextureProfile::getName (  )  const [inline]

Types GFXTextureProfile::getType (  )  const [inline]

const Compression GFXTextureProfile::getCompression (  )  const [inline]

bool GFXTextureProfile::testFlag ( Flags  flag  )  const [inline]

const U32 GFXTextureProfile::getDownscale (  )  const [inline]

void GFXTextureProfile::setDownscale ( const U32  shift  )  [inline]

void GFXTextureProfile::incActiveCopies (  )  [inline]

void GFXTextureProfile::decActiveCopies (  )  [inline]

static void GFXTextureProfile::init (  )  [static]

static GFXTextureProfile* GFXTextureProfile::find ( const String name  )  [static]

static void GFXTextureProfile::updateStatsForCreation ( GFXTextureObject t  )  [static]

static void GFXTextureProfile::updateStatsForDeletion ( GFXTextureObject t  )  [static]

bool GFXTextureProfile::doStoreBitmap (  )  const [inline]

bool GFXTextureProfile::canDownscale (  )  const [inline]

bool GFXTextureProfile::isDynamic (  )  const [inline]

bool GFXTextureProfile::isRenderTarget (  )  const [inline]

bool GFXTextureProfile::isZTarget (  )  const [inline]

bool GFXTextureProfile::isSystemMemory (  )  const [inline]

bool GFXTextureProfile::noMip (  )  const [inline]


Member Data Documentation

Name of this profile...

Amount to shift textures of this type down, if any.

Stores a munged version of the profile data.

Count of textures of this profile type allocated.

Amount of texelspace currently allocated under this profile.

Amount of storage currently allocated under this profile.

Total number of textures allocated under this profile.

Total number of texels allocated under this profile.

Total number of bytes allocated under this profile.

Keep a list of all the profiles.