VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
makVrv::DtGlTextureMemoryTracker Class Reference

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
 
DtGlTextureMemoryTrackeroperator= (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
 

Constructor & Destructor Documentation

makVrv::DtGlTextureMemoryTracker::DtGlTextureMemoryTracker ( )

constructor

virtual makVrv::DtGlTextureMemoryTracker::~DtGlTextureMemoryTracker ( )
virtual

destructor

makVrv::DtGlTextureMemoryTracker::DtGlTextureMemoryTracker ( const DtGlTextureMemoryTracker )
delete

not allowed

Member Function Documentation

DtGlTextureMemoryTracker& makVrv::DtGlTextureMemoryTracker::operator= ( const DtGlTextureMemoryTracker )
delete

not allowed

virtual void makVrv::DtGlTextureMemoryTracker::textureSizeChanged ( unsigned int  textureId)
virtual

call when texture size changed

virtual void makVrv::DtGlTextureMemoryTracker::textureDeleted ( unsigned int  textureId)
virtual

call when texture is being deleted

virtual void makVrv::DtGlTextureMemoryTracker::textureHandleResidencyChanged ( unsigned int  textureId,
bool  residentOrNotResident 
)
virtual

call when texture residency changed

virtual const DtGlTrackedTextureProperties& makVrv::DtGlTextureMemoryTracker::trackedProperties ( void  ) const
virtual

accessor

virtual void makVrv::DtGlTextureMemoryTracker::printStats ( std::ostream &  outputStream) const
virtual

print tracked textures' properties

virtual const std::unordered_map<unsigned int, int>& makVrv::DtGlTextureMemoryTracker::textures ( void  ) const
virtual

get the tracked textures

static void makVrv::DtGlTextureMemoryTracker::addTextureOfInterest ( const std::string &  name)
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)

Member Data Documentation

std::unordered_map<unsigned int, int> makVrv::DtGlTextureMemoryTracker::myTrackedTextures
protected
DtGlTrackedTextureProperties makVrv::DtGlTextureMemoryTracker::myProperties
protected
std::unordered_set<std::string> makVrv::DtGlTextureMemoryTracker::theTexturesOfInterest
staticprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)