![]() |
VR-Forces 5.0.2 Developer's Guide
|
class to track memory for textures: -Call textureSizeChanged when the texture size changes, with the gl texture id as parameter
-Call textureDeleted when the texture is being deleted, with the gl texture id as parameter
There is no call for when texture is created, because its just a name creation call textureSizeChanged works instead (after the texture object is completed), because if there's no internal entry , one is made.
The trackedProperties() gives the cumulative usage/size of the tracked textures
Public Member Functions | |
| DtGlTextureMemoryTracker () | |
| virtual | ~DtGlTextureMemoryTracker () |
| DtGlTextureMemoryTracker (const DtGlTextureMemoryTracker &)=delete | |
| DtGlTextureMemoryTracker & | operator= (const DtGlTextureMemoryTracker &)=delete |
| virtual void | textureSizeChanged (unsigned int textureId) |
| virtual void | textureDeleted (unsigned int textureId) |
| virtual const DtGlTrackedTextureProperties & | trackedProperties (void) const |
| virtual void | printStats (std::ostream &outputStream) const |
Protected Attributes | |
| std::unordered_map< unsigned int, int > | myTrackedTextures |
| DtGlTrackedTextureProperties | myProperties |
| makVrv::DtGlTextureMemoryTracker::DtGlTextureMemoryTracker | ( | ) |
constructor
|
virtual |
destructor
|
delete |
not allowed
|
delete |
not allowed
call when texture size changed
call when texture is being deleted
|
virtual |
accessor
|
virtual |
print tracked textures' properties
|
protected |