VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | 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 const
DtGlTrackedTextureProperties
trackedProperties (void) const
 
virtual void printStats (std::ostream &outputStream) const
 

Protected Attributes

std::unordered_map< unsigned
int, int
myTrackedTextures
 
DtGlTrackedTextureProperties myProperties
 

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 const DtGlTrackedTextureProperties& makVrv::DtGlTextureMemoryTracker::trackedProperties ( void  ) const
virtual

accessor

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

print tracked textures' properties

Member Data Documentation

std::unordered_map<unsigned int, int> makVrv::DtGlTextureMemoryTracker::myTrackedTextures
protected
DtGlTrackedTextureProperties makVrv::DtGlTextureMemoryTracker::myProperties
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)