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 Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtGlTextureResidencyManager Class Reference

helper class to handle texture residency

Public Types

typedef std::map< unsigned int,
int
TexIDToCount
 
typedef std::map< void
*, TexIDToCount
ContextToTexID
 

Public Member Functions

 DtGlTextureResidencyManager ()
 
virtual ~DtGlTextureResidencyManager ()
 
 DtGlTextureResidencyManager (const DtGlTextureResidencyManager &)=delete
 
DtGlTextureResidencyManageroperator= (const DtGlTextureResidencyManager &)=delete
 
virtual void makeResidentIfNecessary (void *gContext, GLuint textureID)
 
virtual bool makeNonResidentIfNecessary (void *gContext, GLuint textureID, bool canDelete)
 
virtual GLuint64 gpuTextureAddress (GLuint textureID) const
 
virtual bool isTexture (GLuint textureID) const
 
virtual
DtGlTextureResidentMemoryTracker
tracker () const
 

Protected Member Functions

virtual
DtGlTextureResidentMemoryTracker
getOrCreateTracker (void *graphicsContext)
 

Protected Attributes

ContextToTexID myTextureCountByContext
 
TexIDToCount myTextureIdToRefCountAcrossContexts
 
std::unordered_map< void
*, DtGlTextureResidentMemoryTracker * > 
myContextsToTrackers
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtGlTextureResidencyManager::DtGlTextureResidencyManager ( )

constructor

virtual makVrv::DtGlTextureResidencyManager::~DtGlTextureResidencyManager ( )
virtual

destructor

makVrv::DtGlTextureResidencyManager::DtGlTextureResidencyManager ( const DtGlTextureResidencyManager )
delete

not allowed

Member Function Documentation

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

not allowed

virtual void makVrv::DtGlTextureResidencyManager::makeResidentIfNecessary ( void *  gContext,
GLuint  textureID 
)
virtual

Check if a texture is resident in a given context. If not, make it resident.

virtual bool makVrv::DtGlTextureResidencyManager::makeNonResidentIfNecessary ( void *  gContext,
GLuint  textureID,
bool  canDelete 
)
virtual

Make a texture non-resident in GPU memory If canDelete=true, the function will try to delete the texture and return true if it succeeded in deleting the texture.

virtual GLuint64 makVrv::DtGlTextureResidencyManager::gpuTextureAddress ( GLuint  textureID) const
virtual

Get the Gpu address of a texture.

virtual bool makVrv::DtGlTextureResidencyManager::isTexture ( GLuint  textureID) const
virtual

check if the texture is in fact an OpenGL texture

virtual DtGlTextureResidentMemoryTracker* makVrv::DtGlTextureResidencyManager::tracker ( ) const
virtual

get a tracker since residency is per gc, there's a tracker per gc just get the first tracker in our map

virtual DtGlTextureResidentMemoryTracker* makVrv::DtGlTextureResidencyManager::getOrCreateTracker ( void *  graphicsContext)
protectedvirtual

get or create the tracker.

Member Data Documentation

ContextToTexID makVrv::DtGlTextureResidencyManager::myTextureCountByContext
protected
TexIDToCount makVrv::DtGlTextureResidencyManager::myTextureIdToRefCountAcrossContexts
protected
std::unordered_map<void*, DtGlTextureResidentMemoryTracker*> makVrv::DtGlTextureResidencyManager::myContextsToTrackers
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)