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 Member Functions | Static Protected Member Functions | Protected Attributes
makVrv::DtIndirectGlTextureObjectTracker Class Reference

This class tracks all the texture objects created on the vrv side. It is primarily used for stats of textures being used by VRV/Indirect and also for debugging.

It also detects clashes between vrv <> osg textures (ie whether a texture with the same file path on disk was made by both vrv and osg). It does this via DtVrvToOsgTextureClashDetector.

Internally, it is just a pass through for an instance DtGlTextureMemoryTracker.

But we use this class as a wrapper, since DtGlTextureMemoryTracker is just an utility class that does not have a notion of DtDe, etc.

When a texture object is made and then its properties + data filled (considered 'immutable' in OpenGL parlance), DtIndirectGlTextureObjectTracker::textureSizeChanged is called via DtIndirectGlTextureObjectManager::getOrCreate. See that class for details. This allows this manager to register and track (if its a new texture) and update the texture size of this texture.

When a texture is about to be deleted, DtIndirectGlTextureObjectTracker::textureDeleted is called. This is called via DtIndirectTextureResidencyManager::runMakeNonResidentOnTexturesInNonResidentQueue. See that class for details. This allows this manager to unregister and untrack this texture.

During the lifetime of a texture, its texture handle residency can change in a given context. DtIndirectGlTextureObjectTracker::textureResidencyChanged is called in this instance. This allows the tracker to track the residency of the handles in various contexts.

Inheritance diagram for makVrv::DtIndirectGlTextureObjectTracker:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtIndirectGlTextureObjectTracker ()
 
 DtIndirectGlTextureObjectTracker ()=delete
 
DtIndirectGlTextureObjectTracker & operator= (const DtIndirectGlTextureObjectTracker &rhs)=delete
 
 DtIndirectGlTextureObjectTracker (const DtIndirectGlTextureObjectTracker &rhs)=delete
 
virtual void textureSizeChanged (unsigned int textureId)
 
virtual void textureDeleted (unsigned int textureId)
 
virtual void textureHandleResidencyChanged (unsigned int textureId, bool residentOrNotResident)
 
virtual const
DtGlTextureMemoryTracker * 
tracker (void) const
 
virtual void osgTextureSizeChanged (unsigned int textureId)
 
virtual void osgTextureDeleted (unsigned int textureId)
 
virtual unsigned int findVrvTexture (const std::string &textureFilePath) const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static
DtIndirectGlTextureObjectTracker & 
instance (DtDe &de)
 

Protected Member Functions

 DtIndirectGlTextureObjectTracker (DtDe &de)
 

Static Protected Member Functions

static void registerInstance (DtIndirectGlTextureObjectTracker *manager, DtDe &de)
 
static
DtIndirectGlTextureObjectTracker * 
findInstance (DtDe &de)
 

Protected Attributes

DtDe & myDe
 
DtGlTextureMemoryTracker * myVrvTracker
 
DtVrvToOsgTextureClashDetector * myVrvToOsgTextureClashDetector
 

Constructor & Destructor Documentation

virtual makVrv::DtIndirectGlTextureObjectTracker::~DtIndirectGlTextureObjectTracker ( )
virtual

destructor

makVrv::DtIndirectGlTextureObjectTracker::DtIndirectGlTextureObjectTracker ( )
delete

not allowed

makVrv::DtIndirectGlTextureObjectTracker::DtIndirectGlTextureObjectTracker ( const DtIndirectGlTextureObjectTracker &  rhs)
delete

not allowed

makVrv::DtIndirectGlTextureObjectTracker::DtIndirectGlTextureObjectTracker ( DtDe &  de)
protected

cannot create directly

Member Function Documentation

static DtIndirectGlTextureObjectTracker& makVrv::DtIndirectGlTextureObjectTracker::instance ( DtDe &  de)
static

Access the singleton instance.

DtIndirectGlTextureObjectTracker& makVrv::DtIndirectGlTextureObjectTracker::operator= ( const DtIndirectGlTextureObjectTracker &  rhs)
delete

not allowed

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

call when texture size changed

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

call when texture is being deleted

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

call when texture residency changed

virtual const DtGlTextureMemoryTracker* makVrv::DtIndirectGlTextureObjectTracker::tracker ( void  ) const
virtual

access the tracker

virtual void makVrv::DtIndirectGlTextureObjectTracker::osgTextureSizeChanged ( unsigned int  textureId)
virtual

call this when osg texture size changed

virtual void makVrv::DtIndirectGlTextureObjectTracker::osgTextureDeleted ( unsigned int  textureId)
virtual

call this when osg texture is being deleted

virtual unsigned int makVrv::DtIndirectGlTextureObjectTracker::findVrvTexture ( const std::string &  textureFilePath) const
virtual

find a vrv texture with this file path 0 if none found

static void makVrv::DtIndirectGlTextureObjectTracker::registerInstance ( DtIndirectGlTextureObjectTracker *  manager,
DtDe &  de 
)
staticprotected

register the manager

static DtIndirectGlTextureObjectTracker* makVrv::DtIndirectGlTextureObjectTracker::findInstance ( DtDe &  de)
staticprotected

register if the manager is registered

Member Data Documentation

DtDe& makVrv::DtIndirectGlTextureObjectTracker::myDe
protected
DtGlTextureMemoryTracker* makVrv::DtIndirectGlTextureObjectTracker::myVrvTracker
protected
DtVrvToOsgTextureClashDetector* makVrv::DtIndirectGlTextureObjectTracker::myVrvToOsgTextureClashDetector
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)