GFXTextureProfile
Engine/source/gfx/gfxTextureProfile.h
Public Types
Compression { NONE BC1 BC2 BC3 BC4 BC5 }
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) SRGB = BIT(9) Pooled = BIT(10) NoDiscard = BIT(11) NoModify = BIT(11) }
Types { DiffuseMap NormalMap AlphaMap LuminanceMap }
Private Types
Constants { TypeBits = 2 FlagBits = 12 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.
Keep a list of all the profiles.
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
compareFlags(const GFXTextureProfile & in_Cmp)
bool
getNext()
Returns the next profile in the list.
getStats()
Returns the allocation stats for this texture profile.
bool
bool
isPooled()
bool
bool
isSRGB()
bool
bool
bool
noMip()
bool
operator!=(const GFXTextureProfile & in_Cmp)
bool
operator==(const GFXTextureProfile & in_Cmp)
setDownscale(const U32 shift)
Public Static Functions
collectStats(Flags flags, GFXTextureProfileStats * stats)
Collects the total stats for all the profiles which include any of the flag bits.
getHead()
Returns the head of the profile list.
Returns the total profile count in the list.
Detailed Description
Public Types
Compression
Enumerator
- NONE
- BC1
- BC2
- BC3
- BC4
- BC5
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.
- SRGB = BIT(9)
sRGB texture
- Pooled = BIT(10)
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(11)
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)
Types
Enumerator
- DiffuseMap
- NormalMap
- AlphaMap
- LuminanceMap
Private Types
Constants
Enumerator
- TypeBits = 2
- FlagBits = 12
- 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()
compareFlags(const GFXTextureProfile & in_Cmp)
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()
isSRGB()
isSystemMemory()
isZTarget()
noMip()
operator!=(const GFXTextureProfile & in_Cmp)
operator==(const GFXTextureProfile & in_Cmp)
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)