VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtIndirectTextureProcessor Class Reference
Inheritance diagram for makVrv::DtIndirectTextureProcessor:
Inheritance graph
[legend]

Classes

class  LoadingJob
 

Public Member Functions

virtual ~DtIndirectTextureProcessor ()
 destructor More...
 
virtual void launchTextureLoadsIfNecessary (DtOsgRenderer *renderer)
 called by cull thread and pager threads to starts the job in the main thread if there is anything to load More...
 
virtual void ts_addTexturesToLoad (int beforeTextureIndex, int afterTextureIndex, OsgTexturesArray &textures)
 adds textures myWorkMutex is used as a guard internally. More...
 
virtual void ts_addTextureToLoad (osg::Texture *texture)
 threadsafe function for adding a single osg texture to the list of textures to load. More...
 
virtual unsigned int streamTexturesToGpu (osg::RenderInfo &renderInfo)
 Called by jobs system job to actually send the texture data down. More...
 
virtual unsigned int texturesUpdatedFrameNum ()
 Clears a dirty bit that keeps track of if new textures were loaded. More...
 
virtual int numTexturesRemaining ()
 get the number of textures that are still needing to be loaded or in the process of loading. More...
 
virtual void releaseGLObjects (osg::State *state) const
 release internal gl data. More...
 
virtual void makeTexturesResidentIfNeeded (osg::RenderInfo &renderInfo) const
 makes texures ready for bindless. More...
 
virtual bool ts_setCompressionDisabledHint (osg::Image *image, bool val) const
 utility function for setting the uservalue on the image for disabling compression More...
 
virtual bool ts_compressionDisabledHint (osg::Image *image) const
 utility function for getting the uservalue on the image for disabling compression More...
 
virtual void stopWork ()
 stops the texture loading job More...
 
virtual int numTexturesToLoad ()
 helps figure out if there's still work to do More...
 
virtual int numTexturesLoading ()
 helps figure out if there's still work to do More...
 
virtual bool inJobQueue ()
 is texture processor still running in the main thread job system More...
 
virtual boost::condition_variable & waitCondition ()
 used as sync point between CDB background pagers and indirect system More...
 
virtual bool inTextureToGCMap (osg::GraphicsContext *gContext, osg::Texture::TextureObject *texObj) 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...
 

Public Attributes

friend DtIndirectTextureProcessorCreator
 The creator class needs to be a freind so it can create this class. More...
 

Protected Types

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

Protected Member Functions

 DtIndirectTextureProcessor (DtDe &de)
 CTOR. More...
 
virtual void addTexturesToLoad (const DtIndirectGeometryTextures *osgGeometryTextures)
 Add the DtIndirectGeometryTextures to the list of textures to load. Called by ts_addTexturesToLoad. More...
 
virtual void addTextureToLoad (osg::Texture *texture)
 adds an individual texture to the queue More...
 
virtual osg::Operation * createJob ()
 creates a job for the main thread to run More...
 
virtual void collectNewTexturesAcrosssNonSharedContextIds (const osg::RenderInfo &renderInfo, osg::Texture::TextureObject *ts) const
 
virtual void makeNewTexturesAcrosssNonSharedContextIdsResident (osg::GraphicsContext *gc) const
 
virtual void addTextureToGCMap (osg::GraphicsContext *gContext, osg::Texture::TextureObject *texObj) const
 Add a texture object to our list of texture objects by graphics context. More...
 
virtual void slot_windowToBeDestroyed (DtWindow *window)
 handle window closing (context destroyed) More...
 

Protected Attributes

SetTextures myMutableTexturesToLoad
 
SetTextures myMutableTexturesLoading
 
SetTextures myMutableTexturesLoaded
 
tbb::atomic< boolmyInJobQueue
 
unsigned int myTexturesUpdatedFrameNum
 
unsigned int myLastFrameNumber
 
DtMeifConverter myImageCompressor
 
bool myStopWork
 
OpenThreads::Mutex myWorkMutex
 
boost::condition_variable myWaitCondition
 
MapContextIdsToNonSharedContextIds myMutableMapContextIdsToNonSharedContextIds
 
OpenThreads::Mutex myMutableTextureResidencyMutex
 
MapGCToContextIds myMutableGCToContextIds
 For slot_windowToBeDestroyed, keep track of graphcs context and the OSG context id since some functions use context id, others graphics context pointer. More...
 
MapNonSharedContextIdsToNewTexturesArray myMutableMapNonSharedContextIdsToNewTexturesSet
 The nex 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...
 
DtGLDeleteObjectManagermyGLManager
 
DtSignalConnectionManager myConnections
 
DtDemyDe
 

Private Member Functions

 DtIndirectTextureProcessor (const DtIndirectTextureProcessor &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtIndirectTextureProcessoroperator= (const DtIndirectTextureProcessor &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Member Typedef Documentation

typedef std::set<osg::ref_ptr<osg::Texture> > makVrv::DtIndirectTextureProcessor::SetTextures
protected
typedef std::map<osg::GraphicsContext*, unsigned int> makVrv::DtIndirectTextureProcessor::MapGCToContextIds
protected
typedef std::set<osg::ref_ptr<osg::Texture::TextureObject> > makVrv::DtIndirectTextureProcessor::TexturesSet
protected
typedef std::map<osg::GraphicsContext*, TexturesSet> makVrv::DtIndirectTextureProcessor::MapGCToTexSet
protected

Constructor & Destructor Documentation

virtual makVrv::DtIndirectTextureProcessor::~DtIndirectTextureProcessor ( )
virtual

destructor

makVrv::DtIndirectTextureProcessor::DtIndirectTextureProcessor ( DtDe de)
protected

CTOR.

makVrv::DtIndirectTextureProcessor::DtIndirectTextureProcessor ( const DtIndirectTextureProcessor other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtIndirectTextureProcessor& makVrv::DtIndirectTextureProcessor::operator= ( const DtIndirectTextureProcessor other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtIndirectTextureProcessor::launchTextureLoadsIfNecessary ( DtOsgRenderer renderer)
virtual

called by cull thread and pager threads to starts the job in the main thread if there is anything to load

virtual void makVrv::DtIndirectTextureProcessor::ts_addTexturesToLoad ( int  beforeTextureIndex,
int  afterTextureIndex,
OsgTexturesArray textures 
)
virtual

adds textures myWorkMutex is used as a guard internally.

virtual void makVrv::DtIndirectTextureProcessor::ts_addTextureToLoad ( osg::Texture *  texture)
virtual

threadsafe function for adding a single osg texture to the list of textures to load.

virtual unsigned int makVrv::DtIndirectTextureProcessor::streamTexturesToGpu ( osg::RenderInfo &  renderInfo)
virtual

Called by jobs system job to actually send the texture data down.

virtual unsigned int makVrv::DtIndirectTextureProcessor::texturesUpdatedFrameNum ( )
virtual

Clears a dirty bit that keeps track of if new textures were loaded.

virtual int makVrv::DtIndirectTextureProcessor::numTexturesRemaining ( )
virtual

get the number of textures that are still needing to be loaded or in the process of loading.

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

release internal gl data.

virtual void makVrv::DtIndirectTextureProcessor::makeTexturesResidentIfNeeded ( osg::RenderInfo &  renderInfo) const
virtual

makes texures ready for bindless.

virtual bool makVrv::DtIndirectTextureProcessor::ts_setCompressionDisabledHint ( osg::Image *  image,
bool  val 
) const
virtual

utility function for setting the uservalue on the image for disabling compression

virtual bool makVrv::DtIndirectTextureProcessor::ts_compressionDisabledHint ( osg::Image *  image) const
virtual

utility function for getting the uservalue on the image for disabling compression

virtual void makVrv::DtIndirectTextureProcessor::stopWork ( )
virtual

stops the texture loading job

virtual int makVrv::DtIndirectTextureProcessor::numTexturesToLoad ( )
virtual

helps figure out if there's still work to do

virtual int makVrv::DtIndirectTextureProcessor::numTexturesLoading ( )
virtual

helps figure out if there's still work to do

virtual bool makVrv::DtIndirectTextureProcessor::inJobQueue ( )
virtual

is texture processor still running in the main thread job system

virtual boost::condition_variable& makVrv::DtIndirectTextureProcessor::waitCondition ( )
virtual

used as sync point between CDB background pagers and indirect system

virtual bool makVrv::DtIndirectTextureProcessor::inTextureToGCMap ( osg::GraphicsContext *  gContext,
osg::Texture::TextureObject *  texObj 
) 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::DtIndirectTextureProcessor::addTexturesToLoad ( const DtIndirectGeometryTextures osgGeometryTextures)
protectedvirtual

Add the DtIndirectGeometryTextures to the list of textures to load. Called by ts_addTexturesToLoad.

virtual void makVrv::DtIndirectTextureProcessor::addTextureToLoad ( osg::Texture *  texture)
protectedvirtual

adds an individual texture to the queue

virtual osg::Operation* makVrv::DtIndirectTextureProcessor::createJob ( )
protectedvirtual

creates a job for the main thread to run

virtual void makVrv::DtIndirectTextureProcessor::collectNewTexturesAcrosssNonSharedContextIds ( const osg::RenderInfo &  renderInfo,
osg::Texture::TextureObject *  ts 
) const
protectedvirtual
virtual void makVrv::DtIndirectTextureProcessor::makeNewTexturesAcrosssNonSharedContextIdsResident ( osg::GraphicsContext *  gc) const
protectedvirtual
virtual void makVrv::DtIndirectTextureProcessor::addTextureToGCMap ( osg::GraphicsContext *  gContext,
osg::Texture::TextureObject *  texObj 
) const
protectedvirtual

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

virtual void makVrv::DtIndirectTextureProcessor::slot_windowToBeDestroyed ( DtWindow window)
protectedvirtual

handle window closing (context destroyed)

Member Data Documentation

friend makVrv::DtIndirectTextureProcessor::DtIndirectTextureProcessorCreator

The creator class needs to be a freind so it can create this class.

SetTextures makVrv::DtIndirectTextureProcessor::myMutableTexturesToLoad
mutableprotected
SetTextures makVrv::DtIndirectTextureProcessor::myMutableTexturesLoading
mutableprotected
SetTextures makVrv::DtIndirectTextureProcessor::myMutableTexturesLoaded
mutableprotected
tbb::atomic<bool> makVrv::DtIndirectTextureProcessor::myInJobQueue
protected
unsigned int makVrv::DtIndirectTextureProcessor::myTexturesUpdatedFrameNum
mutableprotected
unsigned int makVrv::DtIndirectTextureProcessor::myLastFrameNumber
protected
DtMeifConverter makVrv::DtIndirectTextureProcessor::myImageCompressor
protected
bool makVrv::DtIndirectTextureProcessor::myStopWork
protected
OpenThreads::Mutex makVrv::DtIndirectTextureProcessor::myWorkMutex
mutableprotected
boost::condition_variable makVrv::DtIndirectTextureProcessor::myWaitCondition
protected
MapContextIdsToNonSharedContextIds makVrv::DtIndirectTextureProcessor::myMutableMapContextIdsToNonSharedContextIds
mutableprotected
OpenThreads::Mutex makVrv::DtIndirectTextureProcessor::myMutableTextureResidencyMutex
mutableprotected
MapGCToContextIds makVrv::DtIndirectTextureProcessor::myMutableGCToContextIds
mutableprotected

For slot_windowToBeDestroyed, keep track of graphcs context and the OSG context id since some functions use context id, others graphics context pointer.

MapNonSharedContextIdsToNewTexturesArray makVrv::DtIndirectTextureProcessor::myMutableMapNonSharedContextIdsToNewTexturesSet
mutableprotected

The nex textures that have been seen in this context.

MapGCToTexSet makVrv::DtIndirectTextureProcessor::myMutableMapGraphicsContextToTexturesSet
mutableprotected

Which textures have we seen in what contexts.

TexturesSet makVrv::DtIndirectTextureProcessor::myMutableAllSeenTextures
mutableprotected

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

DtGLDeleteObjectManager* makVrv::DtIndirectTextureProcessor::myGLManager
protected
DtSignalConnectionManager makVrv::DtIndirectTextureProcessor::myConnections
protected
DtDe& makVrv::DtIndirectTextureProcessor::myDe
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)