![]() |
VR-Forces 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 void | textureHandleResidencyChanged (unsigned int textureId, bool residentOrNotResident) |
| virtual const DtGlTrackedTextureProperties & | trackedProperties (void) const |
| virtual void | printStats (std::ostream &outputStream) const |
| virtual const std::unordered_map< unsigned int, int > & | textures (void) const |
Static Public Member Functions | |
| static void | addTextureOfInterest (const std::string &name) |
Protected Attributes | |
| std::unordered_map< unsigned int, int > | myTrackedTextures |
| DtGlTrackedTextureProperties | myProperties |
Static Protected Attributes | |
| static std::unordered_set < std::string > | theTexturesOfInterest |
| makVrv::DtGlTextureMemoryTracker::DtGlTextureMemoryTracker | ( | ) |
constructor
|
virtual |
destructor
|
delete |
not allowed
|
delete |
not allowed
call when texture size changed
call when texture is being deleted
|
virtual |
call when texture residency changed
|
virtual |
accessor
|
virtual |
print tracked textures' properties
|
virtual |
get the tracked textures
|
static |
call if you want to give a texture to track (file name, without path) This will track the texture through the life time of the app (create/handle residency/destruction)
|
protected |
|
staticprotected |