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

Manager class that handles texture objects and texture residency, as contexts get created and destroyed through the life time of the application.

Public Member Functions

virtual ~DtIndirectTextureResidencyManager ()
 
virtual bool inTextureToGCMap (const osg::GraphicsContext *graphicsContext, unsigned int textureObject) const
 
virtual bool addTextureToGCMapIfNecessary (const osg::GraphicsContext *graphicsContext, unsigned int textureObject) const
 
virtual void makeTexturesResidentIfNeeded (const osg::GraphicsContext *graphicsContext) const
 
virtual void releaseGLObjects (osg::State *state) const
 
virtual void releaseGLObjects (const std::set< unsigned int > &textureObjectSetToUnload) const
 
virtual void slot_windowToBeDestroyed (DtWindow *window)
 
virtual bool isInAnotherContext (unsigned int textureId, const osg::GraphicsContext *graphicsContext) const
 

Public Attributes

friend DtIndirectTextureResidencyManagerCreator
 

Protected Types

typedef std::set< unsigned intSetNonSharedContextIds
 
typedef std::map< unsigned int,
SetNonSharedContextIds
MapContextIdsToNonSharedContextIds
 
typedef std::set< unsigned intTexturesSet
 
typedef std::unordered_map
< const osg::GraphicsContext
*, TexturesSet
MapContextIdsToTexturesSet
 

Protected Member Functions

 DtIndirectTextureResidencyManager (DtDe &de)
 
virtual void addTextureToGCMap (const osg::GraphicsContext *graphicsContext, unsigned int textureObject) const
 
virtual void collectNewTexturesAcrosssNonSharedContextIds (const osg::GraphicsContext *graphicsContext, unsigned int textureObject) const
 
virtual void makeNewTexturesAcrosssNonSharedContextIdsResident (const osg::GraphicsContext *graphicsContext) const
 

Protected Attributes

MapContextIdsToNonSharedContextIds myMutableMapContextIdsToNonSharedContextIds
 
OpenThreads::Mutex myMutableTextureResidencyMutex
 
MapContextIdsToTexturesSet myMutableMapNonSharedContextIdsToNewTexturesSet
 
MapContextIdsToTexturesSet myMutableMapGraphicsContextToTexturesSet
 
TexturesSet myMutableAllSeenTextures
 
DtGlDeleteObjectManagermyGlDeleteObjectManager
 
DtSignalConnectionManager myConnections
 
DtIndirectGlTextureResidencyManagermyGlTextureResidencyManager
 
DtDemyDe
 

Private Member Functions

 DtIndirectTextureResidencyManager ()=delete
 
 DtIndirectTextureResidencyManager (DtIndirectTextureResidencyManager &)=delete
 
DtIndirectTextureResidencyManageroperator= (DtIndirectTextureResidencyManager &)=delete
 

Member Typedef Documentation

typedef std::unordered_map<const osg::GraphicsContext*, TexturesSet> makVrv::DtIndirectTextureResidencyManager::MapContextIdsToTexturesSet
protected

Constructor & Destructor Documentation

virtual makVrv::DtIndirectTextureResidencyManager::~DtIndirectTextureResidencyManager ( )
virtual
makVrv::DtIndirectTextureResidencyManager::DtIndirectTextureResidencyManager ( DtDe de)
protected
makVrv::DtIndirectTextureResidencyManager::DtIndirectTextureResidencyManager ( )
privatedelete

not allowed

makVrv::DtIndirectTextureResidencyManager::DtIndirectTextureResidencyManager ( DtIndirectTextureResidencyManager )
privatedelete

not allowed

Member Function Documentation

DtIndirectTextureResidencyManager& makVrv::DtIndirectTextureResidencyManager::operator= ( DtIndirectTextureResidencyManager )
privatedelete

not allowed

virtual bool makVrv::DtIndirectTextureResidencyManager::inTextureToGCMap ( const osg::GraphicsContext *  graphicsContext,
unsigned int  textureObject 
) const
virtual

Check if we have already added a texture object to our list of textures object by graphics context if we have already added then return true.

virtual bool makVrv::DtIndirectTextureResidencyManager::addTextureToGCMapIfNecessary ( const osg::GraphicsContext *  graphicsContext,
unsigned int  textureObject 
) const
virtual

Add a texture object to our list of texture objects by graphics context, only if needed.

virtual void makVrv::DtIndirectTextureResidencyManager::makeTexturesResidentIfNeeded ( const osg::GraphicsContext *  graphicsContext) const
virtual

makes textures ready for bindless.

virtual void makVrv::DtIndirectTextureResidencyManager::releaseGLObjects ( osg::State *  state) const
virtual

release internal gl data.

virtual void makVrv::DtIndirectTextureResidencyManager::releaseGLObjects ( const std::set< unsigned int > &  textureObjectSetToUnload) const
virtual

unload given textures (e.g. that the models refer to) (called only for a texture processor for the gt models (for the layer/entity grid) for gs the textures get deleted via the deletion of the texture processor using the releaseGLObjects(osg::State* state) variant above

virtual void makVrv::DtIndirectTextureResidencyManager::slot_windowToBeDestroyed ( DtWindow window)
virtual

handle window closing (context destroyed)

virtual bool makVrv::DtIndirectTextureResidencyManager::isInAnotherContext ( unsigned int  textureId,
const osg::GraphicsContext *  graphicsContext 
) const
virtual

Checks to see if the given texture id is used in any other context besides the given one.

virtual void makVrv::DtIndirectTextureResidencyManager::addTextureToGCMap ( const osg::GraphicsContext *  graphicsContext,
unsigned int  textureObject 
) const
protectedvirtual

internal. Add a texture object to our list of texture objects by graphics context

virtual void makVrv::DtIndirectTextureResidencyManager::collectNewTexturesAcrosssNonSharedContextIds ( const osg::GraphicsContext *  graphicsContext,
unsigned int  textureObject 
) const
protectedvirtual

internal. collect any (new) textures we haven't seen yet for this graphics context (for non shared context ids)

virtual void makVrv::DtIndirectTextureResidencyManager::makeNewTexturesAcrosssNonSharedContextIdsResident ( const osg::GraphicsContext *  graphicsContext) const
protectedvirtual

internal. collect any (new) textures we haven't seen yet for this graphics context (for non shared context ids), and make them resident

Member Data Documentation

friend makVrv::DtIndirectTextureResidencyManager::DtIndirectTextureResidencyManagerCreator

only creator can create

MapContextIdsToNonSharedContextIds makVrv::DtIndirectTextureResidencyManager::myMutableMapContextIdsToNonSharedContextIds
mutableprotected
OpenThreads::Mutex makVrv::DtIndirectTextureResidencyManager::myMutableTextureResidencyMutex
mutableprotected
MapContextIdsToTexturesSet makVrv::DtIndirectTextureResidencyManager::myMutableMapNonSharedContextIdsToNewTexturesSet
mutableprotected

The next textures that have been seen in this context.

MapContextIdsToTexturesSet makVrv::DtIndirectTextureResidencyManager::myMutableMapGraphicsContextToTexturesSet
mutableprotected

Which textures have we seen in what contexts.

TexturesSet makVrv::DtIndirectTextureResidencyManager::myMutableAllSeenTextures
mutableprotected

Texture ids for all textures that we have seen so far in all contexts.

DtGlDeleteObjectManager& makVrv::DtIndirectTextureResidencyManager::myGlDeleteObjectManager
protected

hold an instance to the delete manager

DtSignalConnectionManager makVrv::DtIndirectTextureResidencyManager::myConnections
protected

for handling window destroyed event

DtIndirectGlTextureResidencyManager& makVrv::DtIndirectTextureResidencyManager::myGlTextureResidencyManager
protected
DtDe& makVrv::DtIndirectTextureResidencyManager::myDe
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)