VR-Forces 4.10 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)
 thread safe function for adding a single osg texture to the list of textures to load. More...
 
virtual unsigned int streamTexturesToGpu (const osg::RenderInfo &renderInfo)
 Called by jobs system job to actually send the texture data down. More...
 
virtual unsigned int texturesUpdatedFrameNum () const
 gets the last frame that the textures were updated in More...
 
virtual int numTexturesRemaining () const
 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 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 () const
 helps figure out if there's still work to do returns the number of textures yet to load More...
 
virtual int numTexturesLoading () const
 helps figure out if there's still work to do returns the number of textures still loading More...
 
virtual bool texureFailed (osg::Texture *texture) const
 check to see if a particular texture falied to load. More...
 
virtual bool inJobQueue () const
 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 (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 makeTexturesResidentIfNeeded (const osg::RenderInfo &renderInfo) const
 makes textures ready for bindless. More...
 
virtual void setTextureLoadTimeSlicePeriod (float period)
 Set the time slice period/budget to load textures per tick (in seconds). More...
 
virtual float textureLoadTimeSlicePeriod (void) const
 

Public Attributes

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

Protected Types

typedef std::set< osg::ref_ptr
< osg::Texture > > 
SetTextures
 

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 printStats (void) const
 for debugging. More...
 

Protected Attributes

SetTextures myMutableTexturesToLoad
 
SetTextures myMutableTexturesLoading
 
SetTextures myMutableTexturesLoaded
 
SetTextures myMutableTexturesFailed
 
float myTextureLoadTimeSlicePeriod
 time slice period to load textures More...
 
tbb::atomic< boolmyInJobQueue
 
unsigned int myTexturesUpdatedFrameNum
 
unsigned int myLastFrameNumber
 
DtMeifConverter myImageCompressor
 
bool myStopWork
 
OpenThreads::Mutex myWorkMutex
 
boost::condition_variable myWaitCondition
 
DtIndirectTextureResidencyManagermyTextureResidencyManager
 handle residency, textures as contexts get created/destroyed More...
 
DtDemyDe
 

Private Member Functions

 DtIndirectTextureProcessor ()=delete
 cannot create without DtDe More...
 
 DtIndirectTextureProcessor (const DtIndirectTextureProcessor &other)=delete
 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

Constructor & Destructor Documentation

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

destructor

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

CTOR.

makVrv::DtIndirectTextureProcessor::DtIndirectTextureProcessor ( )
privatedelete

cannot create without DtDe

makVrv::DtIndirectTextureProcessor::DtIndirectTextureProcessor ( const DtIndirectTextureProcessor other)
privatedelete

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

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

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

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

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

gets the last frame that the textures were updated in

virtual int makVrv::DtIndirectTextureProcessor::numTexturesRemaining ( ) const
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 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 ( ) const
virtual

helps figure out if there's still work to do returns the number of textures yet to load

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

helps figure out if there's still work to do returns the number of textures still loading

virtual bool makVrv::DtIndirectTextureProcessor::texureFailed ( osg::Texture *  texture) const
virtual

check to see if a particular texture falied to load.

virtual bool makVrv::DtIndirectTextureProcessor::inJobQueue ( ) const
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 ( 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::DtIndirectTextureProcessor::makeTexturesResidentIfNeeded ( const osg::RenderInfo &  renderInfo) const
virtual

makes textures ready for bindless.

virtual void makVrv::DtIndirectTextureProcessor::setTextureLoadTimeSlicePeriod ( float  period)
virtual

Set the time slice period/budget to load textures per tick (in seconds).

Textures are loaded in incrementally in time slices. In a tick, if the time taken to load texture(s) exceeds the time slice period/budget, the remainder textures are loaded in the subsequent ticks (again in time slices). Default value is 2ms (0.002 seconds)

virtual float makVrv::DtIndirectTextureProcessor::textureLoadTimeSlicePeriod ( void  ) const
virtual
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::printStats ( void  ) const
protectedvirtual

for debugging.

print textures to load, loading loaded, failed

Member Data Documentation

friend makVrv::DtIndirectTextureProcessor::DtIndirectTextureProcessorCreator

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

SetTextures makVrv::DtIndirectTextureProcessor::myMutableTexturesToLoad
mutableprotected
SetTextures makVrv::DtIndirectTextureProcessor::myMutableTexturesLoading
mutableprotected
SetTextures makVrv::DtIndirectTextureProcessor::myMutableTexturesLoaded
mutableprotected
SetTextures makVrv::DtIndirectTextureProcessor::myMutableTexturesFailed
mutableprotected
float makVrv::DtIndirectTextureProcessor::myTextureLoadTimeSlicePeriod
protected

time slice period to load textures

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
DtIndirectTextureResidencyManager* makVrv::DtIndirectTextureProcessor::myTextureResidencyManager
protected

handle residency, textures as contexts get created/destroyed

DtDe& makVrv::DtIndirectTextureProcessor::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)