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

Manager to delete GLBuffer in the main thread.

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

Public Types

typedef DtLockedBufferedQueue
< unsigned int
TexturesArray
 
typedef std::map
< osg::observer_ptr< const
osg::GraphicsContext >
, TexturesArray * > 
MapGCToTexArray
 
typedef DtLockedBufferedQueue
< DtGlVaoAndContext
VAOArray
 
typedef std::map
< osg::observer_ptr< const
osg::GraphicsContext >
, VAOArray * > 
MapContextsToVAOArray
 
typedef DtLockedBufferedQueue
< DtGlFboAndContext
FBOArray
 
typedef std::map
< osg::observer_ptr< const
osg::GraphicsContext >
, FBOArray * > 
MapContextsToFBOArray
 

Public Member Functions

virtual ~DtGlDeleteObjectManager ()
 
virtual void addHandleToDelete (unsigned int handle)
 
virtual void addTextureIdToDelete (const osg::GraphicsContext *gContext, unsigned int textureObject)
 
virtual void addVertexArrayObjectToDelete (const osg::GraphicsContext *gContext, const DtGlVaoAndContext &vao)
 
virtual void addFrameBufferObjectToDelete (const osg::GraphicsContext *gContext, const DtGlFboAndContext &fbo)
 
virtual void addFrameBufferObjectToDelete (osg::observer_ptr< const osg::GraphicsContext > &gContext, const DtGlFboAndContext &fbo)
 
virtual void flush (const osg::GraphicsContext *gc, bool allowTextureDelete=true)
 
virtual void flushInvalidGcs (void)
 
virtual void slot_displayToBeDestroyed (const std::string &displayName, DtDe *de)
 
virtual void clearData ()
 
virtual void windowDestroyAddTextureIdToDelete (unsigned int textureObject)
 
virtual void windowDestroyAddTextureIdToKeep (unsigned int textureObject)
 
virtual void windowDestroyFlushTextureIdsToDelete (const osg::GraphicsContext *gContext)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtGlDeleteObjectManagerinstance (DtDe &de)
 

Protected Member Functions

 DtGlDeleteObjectManager (DtDe &de)
 
virtual void flushTexturesArray (std::vector< unsigned int > *texArr, const osg::GraphicsContext *gc, bool allowTextureDelete)
 
virtual void deleteBuffers (void)
 
virtual void deleteTextures (const osg::GraphicsContext *gc, bool allowTextureDelete)
 
virtual void deleteVAOs (const osg::GraphicsContext *gc)
 
virtual void deleteFBOs (const osg::GraphicsContext *gc)
 
virtual void flushVAOsForInvalidGcs (void)
 
virtual void flushFBOsForInvalidGcs (void)
 

Static Protected Member Functions

static void registerInstance (DtGlDeleteObjectManager *mgr, DtDe &de)
 
static DtGlDeleteObjectManagerfindInstance (DtDe &de)
 

Protected Attributes

DtLockedBufferedQueue
< unsigned int
myGlBufferToDeleteList
 
MapGCToTexArray myGraphicsContextToTexturesArray
 
MapContextsToVAOArray myGraphicsContextToVAOArray
 
MapContextsToFBOArray myGraphicsContextToFBOArray
 
DtSignalConnectionManager myConnections
 
DtDemyDe
 
DtIndirectGlTextureResidencyManagermyGlTextureResidencyManager
 
std::set< unsigned intmyWindowDestroyTextures
 
std::set< unsigned intmyWindowKeepTextures
 

Member Typedef Documentation

typedef std::map< osg::observer_ptr<const osg::GraphicsContext>, TexturesArray* > makVrv::DtGlDeleteObjectManager::MapGCToTexArray
typedef std::map< osg::observer_ptr<const osg::GraphicsContext >, VAOArray*> makVrv::DtGlDeleteObjectManager::MapContextsToVAOArray
typedef std::map< osg::observer_ptr<const osg::GraphicsContext >, FBOArray*> makVrv::DtGlDeleteObjectManager::MapContextsToFBOArray

Constructor & Destructor Documentation

virtual makVrv::DtGlDeleteObjectManager::~DtGlDeleteObjectManager ( )
virtual

DTOR.

makVrv::DtGlDeleteObjectManager::DtGlDeleteObjectManager ( DtDe de)
protected

protected CTOR

Member Function Documentation

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

Access the singleton instance.

virtual void makVrv::DtGlDeleteObjectManager::addHandleToDelete ( unsigned int  handle)
virtual

Add a GLBuffer handle to delete in the main thread.

virtual void makVrv::DtGlDeleteObjectManager::addTextureIdToDelete ( const osg::GraphicsContext *  gContext,
unsigned int  textureObject 
)
virtual

Add a texture id to delete in the main thread.

virtual void makVrv::DtGlDeleteObjectManager::addVertexArrayObjectToDelete ( const osg::GraphicsContext *  gContext,
const DtGlVaoAndContext vao 
)
virtual

Add a vertex array object to delete in the main thread.

virtual void makVrv::DtGlDeleteObjectManager::addFrameBufferObjectToDelete ( const osg::GraphicsContext *  gContext,
const DtGlFboAndContext fbo 
)
virtual

Add a frame buffer object to delete in the main thread.

virtual void makVrv::DtGlDeleteObjectManager::addFrameBufferObjectToDelete ( osg::observer_ptr< const osg::GraphicsContext > &  gContext,
const DtGlFboAndContext fbo 
)
virtual
virtual void makVrv::DtGlDeleteObjectManager::flush ( const osg::GraphicsContext *  gc,
bool  allowTextureDelete = true 
)
virtual

delete all the handles. if allowTextureDelete is false, then the textures can be made non-resident, but not deleted. allowTextureDelete is false when a window is being shut down, but there are remaining windows.

virtual void makVrv::DtGlDeleteObjectManager::flushInvalidGcs ( void  )
virtual

delete all the handles across all contexts that are invalid

virtual void makVrv::DtGlDeleteObjectManager::slot_displayToBeDestroyed ( const std::string &  displayName,
DtDe de 
)
virtual
virtual void makVrv::DtGlDeleteObjectManager::clearData ( )
virtual

clear out maps and other data structures

virtual void makVrv::DtGlDeleteObjectManager::windowDestroyAddTextureIdToDelete ( unsigned int  textureObject)
virtual

Called during a window shudown to add a texture id to the delete list.

virtual void makVrv::DtGlDeleteObjectManager::windowDestroyAddTextureIdToKeep ( unsigned int  textureObject)
virtual

Called during a window shudown to add a texture id to the keep list.

virtual void makVrv::DtGlDeleteObjectManager::windowDestroyFlushTextureIdsToDelete ( const osg::GraphicsContext *  gContext)
virtual

Called during a window shut down to resolve the collected texture keep/delete list. The keep/delete list are generated from previous windowDestroyAddTextureIdToDelete and windowDestroyRemoveTextureIdToKeep calls. This adds all texture id's in the final resolved delete list to be deleted in the main thread.

static void makVrv::DtGlDeleteObjectManager::registerInstance ( DtGlDeleteObjectManager mgr,
DtDe de 
)
staticprotected

register the manager

static DtGlDeleteObjectManager* makVrv::DtGlDeleteObjectManager::findInstance ( DtDe de)
staticprotected

register if the manager is registered

virtual void makVrv::DtGlDeleteObjectManager::flushTexturesArray ( std::vector< unsigned int > *  texArr,
const osg::GraphicsContext *  gc,
bool  allowTextureDelete 
)
protectedvirtual

make textures non-resident if needed. if allowTextureDelete is true, then the texture handle can also be deleted if the texture is no longer needed from the myGlTextureResidencyManager

virtual void makVrv::DtGlDeleteObjectManager::deleteBuffers ( void  )
protectedvirtual
virtual void makVrv::DtGlDeleteObjectManager::deleteTextures ( const osg::GraphicsContext *  gc,
bool  allowTextureDelete 
)
protectedvirtual

make textures non-resident if needed. if allowTextureDelete is true, then the texture handle can also be deleted if the texture is no longer needed from the myGlTextureResidencyManagere

virtual void makVrv::DtGlDeleteObjectManager::deleteVAOs ( const osg::GraphicsContext *  gc)
protectedvirtual
virtual void makVrv::DtGlDeleteObjectManager::deleteFBOs ( const osg::GraphicsContext *  gc)
protectedvirtual
virtual void makVrv::DtGlDeleteObjectManager::flushVAOsForInvalidGcs ( void  )
protectedvirtual
virtual void makVrv::DtGlDeleteObjectManager::flushFBOsForInvalidGcs ( void  )
protectedvirtual

Member Data Documentation

DtLockedBufferedQueue<unsigned int> makVrv::DtGlDeleteObjectManager::myGlBufferToDeleteList
protected

list of handle to delete

MapGCToTexArray makVrv::DtGlDeleteObjectManager::myGraphicsContextToTexturesArray
protected

For keeping texture id's per context.

MapContextsToVAOArray makVrv::DtGlDeleteObjectManager::myGraphicsContextToVAOArray
protected

For keeping vertex array object id's per context.

MapContextsToFBOArray makVrv::DtGlDeleteObjectManager::myGraphicsContextToFBOArray
protected

For keeping vertex array object id's per context.

DtSignalConnectionManager makVrv::DtGlDeleteObjectManager::myConnections
protected

Any signals to process.

DtDe& makVrv::DtGlDeleteObjectManager::myDe
protected
DtIndirectGlTextureResidencyManager& makVrv::DtGlDeleteObjectManager::myGlTextureResidencyManager
protected
std::set<unsigned int> makVrv::DtGlDeleteObjectManager::myWindowDestroyTextures
protected
std::set<unsigned int> makVrv::DtGlDeleteObjectManager::myWindowKeepTextures
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)