VR-Forces 4.10 Class Documentation
 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. More...

Public Member Functions

virtual ~DtIndirectTextureResidencyManager ()
 
virtual bool inTextureToGCMap (const osg::GraphicsContext *graphicsContext, osg::Texture::TextureObject *textureObject) const
 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. More...
 
virtual void addTextureToGCMapIfNecessary (const osg::RenderInfo &renderInfo, osg::Texture::TextureObject *textureObject) const
 Add a texture object to our list of texture objects by graphics context, only if needed. More...
 
virtual void makeTexturesResidentIfNeeded (const osg::RenderInfo &renderInfo) const
 makes textures ready for bindless. More...
 
virtual void releaseGLObjects (osg::State *state) const
 release internal gl data. More...
 
virtual void slot_windowToBeDestroyed (DtWindow *window)
 handle window closing (context destroyed) More...
 

Public Attributes

friend DtIndirectTextureResidencyManagerCreator
 only creator can create More...
 

Protected Types

typedef std::set< unsigned intSetNonSharedContextIds
 
typedef std::map< unsigned int,
SetNonSharedContextIds
MapContextIdsToNonSharedContextIds
 
typedef std::set< osg::ref_ptr
< osg::Texture::TextureObject > > 
TexturesSet
 
typedef std::unordered_map
< const osg::GraphicsContext
*, TexturesSet
MapNonSharedContextIdsToNewTexturesArray
 
typedef std::map< const
osg::GraphicsContext
*, TexturesSet
MapGCToTexSet
 

Protected Member Functions

 DtIndirectTextureResidencyManager (DtDe &de)
 
virtual void addTextureToGCMap (const osg::GraphicsContext *graphicsContext, osg::Texture::TextureObject *textureObject) const
 internal. Add a texture object to our list of texture objects by graphics context More...
 
virtual void collectNewTexturesAcrosssNonSharedContextIds (const osg::GraphicsContext *graphicsContext, osg::Texture::TextureObject *textureObject) const
 internal. collect any (new) textures we haven't seen yet for this graphics context (for non shared context ids) More...
 
virtual void makeNewTexturesAcrosssNonSharedContextIdsResident (const osg::GraphicsContext *graphicsContext) const
 internal. collect any (new) textures we haven't seen yet for this graphics context (for non shared context ids), and make them resident More...
 

Protected Attributes

MapContextIdsToNonSharedContextIds myMutableMapContextIdsToNonSharedContextIds
 
OpenThreads::Mutex myMutableTextureResidencyMutex
 
MapNonSharedContextIdsToNewTexturesArray myMutableMapNonSharedContextIdsToNewTexturesSet
 The next textures that have been seen in this context. More...
 
MapGCToTexSet myMutableMapGraphicsContextToTexturesSet
 Which textures have we seen in what contexts. More...
 
TexturesSet myMutableAllSeenTextures
 Texture ids for all textures that we have seen so far in all contexts. More...
 
DtGLDeleteObjectManagermyGlDeleteObjectManager
 hold an instance to the delete manager More...
 
DtSignalConnectionManager myConnections
 for handling window destroyed event More...
 
DtDemyDe
 

Private Member Functions

 DtIndirectTextureResidencyManager ()=delete
 not allowed More...
 
 DtIndirectTextureResidencyManager (DtIndirectTextureResidencyManager &)=delete
 not allowed More...
 
DtIndirectTextureResidencyManageroperator= (DtIndirectTextureResidencyManager &)=delete
 not allowed More...
 

Detailed Description

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

Member Typedef Documentation

typedef std::set<osg::ref_ptr<osg::Texture::TextureObject> > makVrv::DtIndirectTextureResidencyManager::TexturesSet
protected
typedef std::unordered_map<const osg::GraphicsContext*, TexturesSet> makVrv::DtIndirectTextureResidencyManager::MapNonSharedContextIdsToNewTexturesArray
protected
typedef std::map<const osg::GraphicsContext*, TexturesSet> makVrv::DtIndirectTextureResidencyManager::MapGCToTexSet
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,
osg::Texture::TextureObject *  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 void makVrv::DtIndirectTextureResidencyManager::addTextureToGCMapIfNecessary ( const osg::RenderInfo &  renderInfo,
osg::Texture::TextureObject *  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::RenderInfo &  renderInfo) 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::slot_windowToBeDestroyed ( DtWindow window)
virtual

handle window closing (context destroyed)

virtual void makVrv::DtIndirectTextureResidencyManager::addTextureToGCMap ( const osg::GraphicsContext *  graphicsContext,
osg::Texture::TextureObject *  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,
osg::Texture::TextureObject *  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
MapNonSharedContextIdsToNewTexturesArray makVrv::DtIndirectTextureResidencyManager::myMutableMapNonSharedContextIdsToNewTexturesSet
mutableprotected

The next textures that have been seen in this context.

MapGCToTexSet 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

DtDe& makVrv::DtIndirectTextureResidencyManager::myDe
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)