![]() |
VR-Forces Developer's Guide
|
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.
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 |
|
virtual |
destructor
|
delete |
not allowed
|
delete |
not allowed
|
protected |
cannot create directly
|
static |
Access the singleton instance.
|
delete |
not allowed
|
virtual |
call when texture size changed
|
virtual |
call when texture is being deleted
|
virtual |
call when texture residency changed
|
virtual |
access the tracker
|
virtual |
call this when osg texture size changed
|
virtual |
call this when osg texture is being deleted
|
virtual |
find a vrv texture with this file path 0 if none found
|
staticprotected |
register the manager
|
staticprotected |
register if the manager is registered
|
protected |
|
protected |
|
protected |