![]() |
VR-Forces 4.8 Class Documentation
|
Indirect geometry can have multiple models and their corresponding ids registered in it, via multiple threads. More...

Classes | |
| class | RegisterModelOp |
Public Member Functions | |
| virtual void | setName (const std::string &name) |
| virtual void | queueUpRegisterModel (int modelId, osg::ref_ptr< const osg::Node > model, const std::string &modelFileName, bool cullFaceEnabled=false, const DtIndirectPolygonOffset &polygonOffset=DtIndirectPolygonOffset(0.0f, 0.0f)) |
| virtual void | processRegisterModelQueue (DtOsgRenderer *renderer) |
| Should be called in the cull and processes any queued up models that are registered,. More... | |
| virtual bool | beingProcessed () |
| accessor for if this is getting processed in a background thread. More... | |
| virtual unsigned int | rebuildIfNeeded (osg::RenderInfo &renderInfo, unsigned int currentFrameNum) |
| invoked via the main thread by one (or multiple indirect geometries) More... | |
| virtual unsigned int | numModelsInQueue () |
| gets the number of models in the queue to be registered More... | |
| virtual int | numModels (void) const |
| number of models registered here More... | |
| virtual int | modelId (int index) const |
| the actual model id of the model with index More... | |
| virtual bool | isModelDownloaded (int modelId) const |
| if the model has been copied to the video card. More... | |
| virtual DtAggregateModelInfo * | modelInfoForModelID (int modelId) const |
| all the info for the model More... | |
| virtual int | numGeometriesForModelID (int modelId) const |
| the number of geometries for the model More... | |
| virtual const DtIndirectTextureCollectionPolicy & | textureCollectionPolicy (void) const |
| Access the texture collection policy. More... | |
| virtual DtIndirectTextureProcessor & | textureProcessor () |
| Access the texture processor. More... | |
| virtual const DtIndirectEffectTexturesTemplate & | effectTexturesState (void) const |
| Get the cumulative effect textures state for all the models/geometries that this registrar has registered. More... | |
| virtual DtIndirectGeometryStateManager & | stateContainer (void) const |
| access the states' container More... | |
| virtual GLenum | indicesType (void) const |
| the indices' type (unsigned short or unsigned int, usually unsigned int) More... | |
| virtual void | releaseGLObjects (osg::State *state) const |
| release the openGL objects that have been created by this registrar state is unused but there to maintain the same style as all the other releaseGLObject calls in osg and vantage state can be NULL and it will still cleanup correctly. More... | |
| virtual bool | registeredModelsDirty () |
| are the models in this registrar dirty marked true when a model has been added to the queue to be added More... | |
| virtual void | drainModelQueue (DtOsgRenderer *renderer) |
| loads all the data in myQueueRegisterModelOps will copy data asynchronously More... | |
| virtual DtAggregatedGeometry * | aggregatedGeometry () |
| gets the underlying geometry that this registrar adds data to More... | |
| virtual void | setPagerHandlesModelLoading (bool value) |
| needed if this is the 1st lod loading in the main thread then set to false. More... | |
| virtual bool | pagerHandlesModelLoading () |
| virtual boost::mutex & | addingModelsMutex () |
| protects the addition of models More... | |
| virtual void | bindBuffers () |
| Used internally by DtIndirectGeometry to bind the Vertex/Index/Texture Buffers corresponding to the registrar. More... | |
| virtual void | unbindBuffers () |
Protected Types | |
| typedef tbb::concurrent_queue < RegisterModelOp > | QueueRegisterModelOps |
Protected Member Functions | |
| DtIndirectGeometryRegistrar (DtDe &de, const DtIndirectTextureCollectionPolicy &textureCollectionPolicy, DtAggregatedGeometryCreator &aggregatedGeometryCreator, DtIndirectGeometryAggregatorCreator &indirectGeometryAggregatorCreator, DtCoreGlBufferCreator &coreGlBufferCreator) | |
| CTOR with de is used with the creator for DtIndirectGeometryRegistrar. More... | |
| virtual | ~DtIndirectGeometryRegistrar () |
| DTOR. More... | |
| virtual void | registerModel (int modelId, osg::ref_ptr< const osg::Node > model, const std::string &modelFileName, bool cullFaceEnabled=true, const DtIndirectPolygonOffset &polygonOffset=DtIndirectPolygonOffset(0.0f, 0.0f)) |
| actually register it in the main thread called from rebuildIfNeeded, which is in turn called from main thread More... | |
| virtual bool | allTexturesReady (const int modelId, unsigned int contextID) const |
| Textures are not loaded directly, but indirectly (and possibly incrementally) by osg. More... | |
Protected Attributes | |
| DtAggregatedGeometry * | myAggregatedGeometry |
| DtIndirectEffectTexturesTemplate | myEffectTexturesState |
| bool | myPagerHandlesModelLoading |
| QueueRegisterModelOps | myQueueRegisterModelOps |
| const DtIndirectTextureCollectionPolicy * | myTextureCollectionPolicy |
| osg::ref_ptr < DtIndirectTextureProcessor > | myTextureProcessor |
| bool | myRegisteredModelsDirty |
| unsigned int | myLastRebuiltFrameNum |
| DtIndirectGeometryAggregator * | myAggregator |
| tbb::atomic< bool > | myBeingProcessed |
| boost::mutex | myAddingModelsMutex |
| DtIndirectGeometryStateManager | myMutableStateContainer |
| mutable since it is needed to be used in drawImplementaion for the indirect geometry not private so it can be used by derived classes More... | |
| DtDe & | myDe |
| DtDe reference. More... | |
| DtOsgShaderManager & | myShaderManager |
Private Member Functions | |
| DtIndirectGeometryRegistrar () | |
| Default Constructor not implemented. More... | |
| DtIndirectGeometryRegistrar (const DtIndirectGeometryRegistrar &other) | |
| Copy Constructor not implemented – Copy Not Allowed. More... | |
| DtIndirectGeometryRegistrar (const DtIndirectGeometryRegistrar &lhs, const osg::CopyOp ©op) | |
| Copy Constructor not implemented – Copy Not Allowed. More... | |
| DtIndirectGeometryRegistrar & | operator= (const DtIndirectGeometryRegistrar &other) |
| Assignment Operator Not implemented – Assignment Not Allowed. More... | |
Friends | |
| class | DtIndirectGeometryRegistrarCreator |
| friend class creator so that DtIndirectGeometryRegistrar can only be created by the creator More... | |
Indirect geometry can have multiple models and their corresponding ids registered in it, via multiple threads.
When this happens, the geometry specs/bindless textures need to be updated/maintained in a form that DtIndirectGeometry can use and consume to further upload pertinent information to the GPU. This class manages the registration and the rebuild of the interim GPU data needed The registrar rebuild can be triggered by one (or more) DtIndirectGeometry'ies (when they get drawn). This is done when they are drawn because a context is present at that point (because we are generating GPU data here). The general use case of a 'registrar' is that the DtIndirectGeometryLayerManager creates a single registrar for a layer. This enables several DtIndirectGeometry instances within the layer to efficiently share the same registrar (and hence share the models/textures) CDB is a slightly different use case. In the case of Geo Typical layers, the use case is the same as the general use case. In the case of Geo Specific layers, it merits a single indirect geometry to be associated with a single registrar. This is wholly on account of the nature of the CDB data base itself Generally speaking, geospecific tiles (and hence indirect rendering geometries), hardly ever share models/textures, so creating a common registrar per layer is hugely wasteful as well as slow (given how IndirectRendering works). So one is created per tile/indirect geometry and this mapping maintained by the cdb pager Indirect Rendering works best when multiple models can be combined into a single Vertex Buffer, Index Buffer and the textures are in an array of bindless texture addresses. This allows us to fold what would be multiple binds of vertex buffers, index buffers & texture binds per instance, per model into a single indirect draw call for a tile The registrar allows us to register such models that the instances within the DtIndirectGeometry contain We have generalized the concept of a 'model' for this purpose. A 'model' is a top level node (coming from say reading an flt file) An lod is of a model is also a top level node (coming from say reading an flt file) For example, f the original file has 3 lods, then we need to 3 lods of that single model with the top level nodes for those 3 lods Several such models can be registered here
|
protected |
|
protected |
CTOR with de is used with the creator for DtIndirectGeometryRegistrar.
|
protectedvirtual |
DTOR.
|
private |
Default Constructor not implemented.
|
private |
Copy Constructor not implemented – Copy Not Allowed.
|
private |
Copy Constructor not implemented – Copy Not Allowed.
|
inlineprivate |
Assignment Operator Not implemented – Assignment Not Allowed.
|
virtual |
|
virtual |
|
virtual |
Should be called in the cull and processes any queued up models that are registered,.
can also be called in a background thread
|
virtual |
accessor for if this is getting processed in a background thread.
|
virtual |
invoked via the main thread by one (or multiple indirect geometries)
gets the number of models in the queue to be registered
|
virtual |
number of models registered here
the actual model id of the model with index
if the model has been copied to the video card.
|
virtual |
all the info for the model
|
virtual |
the number of geometries for the model
|
virtual |
Used internally by DtIndirectGeometry to bind the Vertex/Index/Texture Buffers corresponding to the registrar.
The DtIndirectGeometry needs this for rendering because its instances refer to (a subset) of the models registered here
|
virtual |
|
virtual |
Access the texture collection policy.
|
virtual |
Access the texture processor.
|
virtual |
Get the cumulative effect textures state for all the models/geometries that this registrar has registered.
|
virtual |
access the states' container
|
virtual |
the indices' type (unsigned short or unsigned int, usually unsigned int)
|
virtual |
release the openGL objects that have been created by this registrar state is unused but there to maintain the same style as all the other releaseGLObject calls in osg and vantage state can be NULL and it will still cleanup correctly.
|
virtual |
are the models in this registrar dirty marked true when a model has been added to the queue to be added
|
virtual |
loads all the data in myQueueRegisterModelOps will copy data asynchronously
|
virtual |
gets the underlying geometry that this registrar adds data to
|
virtual |
needed if this is the 1st lod loading in the main thread then set to false.
|
virtual |
|
virtual |
protects the addition of models
|
protectedvirtual |
actually register it in the main thread called from rebuildIfNeeded, which is in turn called from main thread
|
protectedvirtual |
Textures are not loaded directly, but indirectly (and possibly incrementally) by osg.
This call indicates whether all of them for a given model/context have in fact been correctly loaded for a given model id
|
friend |
friend class creator so that DtIndirectGeometryRegistrar can only be created by the creator
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
mutable since it is needed to be used in drawImplementaion for the indirect geometry not private so it can be used by derived classes
|
protected |