Torque3D Documentation / _generateds / GFXTextureProfile

GFXTextureProfile

Engine/source/gfx/gfxTextureProfile.h

More...

Public Types

enum
Compression {
  NONE 
  DXT1 
  DXT2 
  DXT3 
  DXT4 
  DXT5 
}
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)
  Pooled = BIT(9)
  NoDiscard = BIT(10)
  NoModify = BIT(11)
}
enum
Types {
  DiffuseMap 
  NormalMap 
  AlphaMap 
  LuminanceMap 
}

Private Types

enum
Constants {
  TypeBits = 2
  FlagBits = 11
  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!

Private Attributes

Amount of storage currently allocated under this profile.

Count of textures of this profile type allocated.

Amount of texelspace currently allocated under this profile.

Total number of bytes allocated under this profile.

Total number of texels allocated under this profile.

Total number of textures allocated under this profile.

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

Name of this profile...

Keep a list of all the profiles.

Stores a munged version of the profile data.

The texture profile stats.

Private Static Attributes

The number of profiles in the system.

Public Functions

GFXTextureProfile(const String & name, Types type, U32 flags, Compression compression)
bool
bool
bool

Returns the next profile in the list.

Returns the allocation stats for this texture profile.

bool
bool
bool
bool
bool

Public Static Functions

Collects the total stats for all the profiles which include any of the flag bits.

Returns the head of the profile list.

Returns the total profile count in the list.

Detailed Description

Public Types

Compression

Enumerator

NONE
DXT1
DXT2
DXT3
DXT4
DXT5
Flags

Enumerator

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.

Pooled = BIT(9)

Track and pool textures of this type for reuse.

  You should use this profile flag sparingly.  Odd
  sized textures and spikes in allocation can cause
  the pool to contain unused textures which will remain
  in memory until a flush occurs.

NoDiscard = BIT(10)

A hint that the device is not allowed to discard the content of a target texture after presentation or deactivated.

This is mainly a depth buffer optimization.

NoModify = BIT(11)

Texture is managed by another process, thus should not be modified.

Types

Enumerator

DiffuseMap
NormalMap
AlphaMap
LuminanceMap

Private Types

Constants

Enumerator

TypeBits = 2
FlagBits = 11
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!

Private Attributes

U32 mActiveBytes 

Amount of storage currently allocated under this profile.

U32 mActiveCount 

Count of textures of this profile type allocated.

U32 mActiveTexels 

Amount of texelspace currently allocated under this profile.

U32 mAllocatedBytes 

Total number of bytes allocated under this profile.

U32 mAllocatedTexels 

Total number of texels allocated under this profile.

U32 mAllocatedTextures 

Total number of textures allocated under this profile.

U32 mDownscale 

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

String mName 

Name of this profile...

GFXTextureProfile * mNext 

Keep a list of all the profiles.

U32 mProfile 

Stores a munged version of the profile data.

GFXTextureProfileStats mStats 

The texture profile stats.

Private Static Attributes

GFXTextureProfile * smHead 
U32 smProfileCount 

The number of profiles in the system.

Public Functions

GFXTextureProfile(const String & name, Types type, U32 flags, Compression compression)

canDiscard()

canDownscale()

canModify()

decActiveCopies()

doStoreBitmap()

getCompression()

getDownscale()

getName()

getNext()

Returns the next profile in the list.

getStats()

Returns the allocation stats for this texture profile.

getType()

incActiveCopies()

isDynamic()

isPooled()

isRenderTarget()

isSystemMemory()

isZTarget()

noMip()

setDownscale(const U32 shift)

testFlag(Flags flag)

Public Static Functions

collectStats(Flags flags, GFXTextureProfileStats * stats)

Collects the total stats for all the profiles which include any of the flag bits.

find(const String & name)

getHead()

Returns the head of the profile list.

getProfileCount()

Returns the total profile count in the list.

init()

updateStatsForCreation(GFXTextureObject * t)

updateStatsForDeletion(GFXTextureObject * t)