![]() |
VR-Forces 4.8 Class Documentation
|
This class inherits from osg::Drawable, which allows us to hook into our indirect engine to render using indirect rendering. More...

Public Member Functions | |
| DtIndirectGeometry (bool terrainPatch, const DtIndirectFadeParameters &fadeParameters) | |
| CTOR. More... | |
| virtual void | setName (const std::string &name) |
| set the name for the base class and the main thread job More... | |
| virtual void | setRegistrar (DtIndirectGeometryRegistrar *registrar) |
| set the registrar More... | |
| virtual DtIndirectGeometryRegistrar * | registrar () |
| provide access to this indirect geometries indirect registrar More... | |
| virtual void | setCullShaderConfig (const DtCullShaderConfig &cullShaderConfig) |
| set the compute shader config More... | |
| virtual const char * | className () const |
| get the classes name in a char pointer. Used by OSG to identify objects of this class More... | |
| virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
| inherited from osg::drawable will do the culling/lod'ing of the instances (via compute shaders) , and subsequent rendering of the instances More... | |
| virtual unsigned int | rebuildRegistrar (osg::RenderInfo &renderInfo) const |
| draw imp helper function returns myLastRebuiltFrameNum More... | |
| virtual void | addInstance (const DtIndirectGeometryInstance &instance) |
| Add an 'instance' of a model which has lod, transform, switch and node path information used by vrvOsg to add instances from paging databases and terrain patches. More... | |
| virtual void | addInstance (int modelId, const osg::Matrixd &xForm) |
| Add a simple instance of a model which only has lod and transform information used by CDB to add it's instances along with any other osgEarth features. More... | |
| virtual void | removeAllInstances (void) |
| Remove all the instances. More... | |
| virtual void | accept (osg::NodeVisitor &nv) |
| overridden: because we do certain processing (state set modification, etc) that needs to happen outside of the draw pass. More... | |
| virtual void | setParent (const osg::Group *parent) |
| Typically a feature tile node/cdb group node. More... | |
| virtual void | setDebugDrawString (const std::string &drawString) |
| Arbitrary string to 'tag' this geometry will print out this string if the drawImplemention is called and debugging is enabled. More... | |
| virtual void | setRegistrarInvalid (void) |
| Indicate to us that our registrar is now invalid registrars are externally held, and the DtIndirectGeometry needs to know this because it may be deleted much after the registrar has been deleted, and possibly internally to osg. More... | |
| virtual void | releaseGLObjects (osg::State *state) const |
| release all gl objects used by this indirect geometry More... | |
| virtual void | accept (osg::PrimitiveFunctor &functor) const |
| override of Drawable function which allows the osg Statistics to work for Indirect Geometry More... | |
| void | setupIndirect (DtDe &de) |
| Makes sure Indirect Geometry it ready to go, only callable from main thread. More... | |
| virtual void | setLocalOriginTransform (const osg::Matrixd &localOriginTransform) |
| set the matrix used to adjust the local origin of this indirect geometry this is used to fix precision issue that arise from having large numbers in the vertex buffers or in the instance transforms More... | |
| virtual osg::Matrixd & | localOriginTransform () |
| get the matrix used to adjust the local origin of this indirect geometry this is used to fix precision issue that arise from having large numbers in the vertex buffers or in the instance transforms More... | |
| virtual bool | actuallyAddQueuedUpInstances (void) |
| adds all instances that have been queued up by calling addInstanceActual with them as the parameter More... | |
| virtual void | launchMainThreadJobAndWait (DtDe &de, DtOsgRenderer &renderer) |
| finish initialization of geometry More... | |
| virtual boost::condition_variable & | waitCondition () |
| returns a wait condition for use as a sync point between class and main thread job More... | |
| virtual void | updateGpuInstanceBuffers (osg::RenderInfo &renderInfo) |
| helper function for job to call the culling and lod updater More... | |
| virtual const osg::Geode * | parentGeode (void) const |
| internal. More... | |
| virtual osg::Geode * | parentGeode (void) |
Protected Types | |
| typedef osg::ref_ptr < osgEarth::VirtualProgram > | VirtualProgramRef |
| typedef std::map< std::string, VirtualProgramRef > | StringVpMap |
Protected Member Functions | |
| virtual | ~DtIndirectGeometry () |
| purposely protected More... | |
| virtual bool | addInstanceActual (const DtIndirectGeometryInstance &instance) |
| actually add the instances that were queued up via possibly multiple threads this happens as part of the culling call More... | |
| virtual void | setupShadersIfNecessary (DtDe &de) |
| to initialize the shader files cache, because DtIndirectGeometry doesn't have direct access to DtDe yet (it could; but that would break the cdb plugin) lock myInternalsMutex before calling More... | |
| virtual void | setupDebugUniforms (DtDe &de) |
| setup the uniforms needed to visualize debug information for indirect geometry lock myInternalsMutex before calling More... | |
| virtual void | installIndirectRenderingProgram (DtOsgShaderFilesCache *shaderFilesCache, const std::string &shaderFolderPath, osg::StateSet *ss, DtDe &de) const |
| install the shaders needed to render using indirect rendering More... | |
| virtual void | installDefaultMaterial (osg::StateSet *ss) |
| install a default material on ourselves, so that there's no state leakage with regards ubos/osg::material because we are using materials encoded into an ssbo for indirect rendering More... | |
| virtual void | slot_reloadShaders () |
| slot for handling when the shaders are reloaded More... | |
| virtual void | updateIndicesCount (const DtAggregateModelInfo &modelInfo) |
| internal method to update num of triangles that this geometry will render in the worst case (all lods across all models across all instances) More... | |
| virtual void | createCullingAndLodIfNecessary (DtDe &de) |
| create the culling and lod for this indirect geometry lock myInternalsMutex before calling More... | |
| virtual void | createManagersIfNecessary (DtDe &de) |
| create the switch manager and the lod manager for this indirect geometry if it has not yet been created. More... | |
| virtual void | drawFromCommandBuffer (osg::RenderInfo &renderInfo) const |
| virtual void | reloadShadersIfNecessary (void) const |
| reload shaders for if necessary More... | |
| virtual GLuint | getOrCreateAndRecordVAO (osg::State *state) const |
| internal methods to create and 'record' a vertex array object (VAO) using VAO enables us to combine multiple buffer binds into a single 'command' via 'recording' the VAO More... | |
| virtual void | recordVAO (GLuint vao) const |
Static Protected Member Functions | |
| static osgEarth::VirtualProgram * | findCachedVirtualProgram (const std::string &vp_hash) |
| quick caching of virtual programs to avoid parsing them constantly More... | |
| static void | cacheVirtualProgram (const std::string &vp_hash, osgEarth::VirtualProgram *virtualProgram) |
| static void | clearVirtualProgramCache () |
Static Protected Attributes | |
| static StringVpMap | theVirtualProgramMap |
Private Member Functions | |
| DtIndirectGeometry (const DtIndirectGeometry &other) | |
| Copy Constructor not implemented – Copy Not Allowed. More... | |
| DtIndirectGeometry & | operator= (const DtIndirectGeometry &other) |
| Assignment Operator Not implemented � Assignment Not Allowed. More... | |
Friends | |
| class | DtIndirectGeometryInitMainThreadJob |
| needed to give access to wait conditions and mutexes. More... | |
This class inherits from osg::Drawable, which allows us to hook into our indirect engine to render using indirect rendering.
In the case of features, the DtIndirectGeometry is parented to the feature tile nodes and manages the indirect rendering of all the feature points in that tile For paging databases it manages the indirect rendering of a complete tile For terrain patches it manages the indirect rendering of the full patch
|
protected |
|
protected |
| makVrv::DtIndirectGeometry::DtIndirectGeometry | ( | bool | terrainPatch, |
| const DtIndirectFadeParameters & | fadeParameters | ||
| ) |
CTOR.
|
protectedvirtual |
purposely protected
|
private |
Copy Constructor not implemented – Copy Not Allowed.
|
private |
Assignment Operator Not implemented � Assignment Not Allowed.
|
virtual |
set the name for the base class and the main thread job
|
virtual |
set the registrar
| registrar | The indirect geometry registrar which will contain the 'specs' corresponding to models whose instances this DtIndirectGeometry rendered This is purposely separated out from DtIndirectGeometry, because several DtIndirectGeometry'ies may share the same models (for example cdb gt layers), in which case all DtIndirectGeometry'ies share the same registrar or use the 1 registrar per tile (as is the case with cdb gs layers) in which case one registrar is made per geometry(tile) |
|
virtual |
provide access to this indirect geometries indirect registrar
|
virtual |
set the compute shader config
|
virtual |
get the classes name in a char pointer. Used by OSG to identify objects of this class
|
virtual |
inherited from osg::drawable will do the culling/lod'ing of the instances (via compute shaders) , and subsequent rendering of the instances
|
virtual |
draw imp helper function returns myLastRebuiltFrameNum
|
virtual |
Add an 'instance' of a model which has lod, transform, switch and node path information used by vrvOsg to add instances from paging databases and terrain patches.
|
virtual |
Add a simple instance of a model which only has lod and transform information used by CDB to add it's instances along with any other osgEarth features.
|
virtual |
Remove all the instances.
|
virtual |
overridden: because we do certain processing (state set modification, etc) that needs to happen outside of the draw pass.
So, we check for and do this in the cull visitor pass
|
virtual |
Typically a feature tile node/cdb group node.
|
virtual |
Arbitrary string to 'tag' this geometry will print out this string if the drawImplemention is called and debugging is enabled.
|
virtual |
Indicate to us that our registrar is now invalid registrars are externally held, and the DtIndirectGeometry needs to know this because it may be deleted much after the registrar has been deleted, and possibly internally to osg.
|
virtual |
release all gl objects used by this indirect geometry
|
virtual |
override of Drawable function which allows the osg Statistics to work for Indirect Geometry
| void makVrv::DtIndirectGeometry::setupIndirect | ( | DtDe & | de | ) |
Makes sure Indirect Geometry it ready to go, only callable from main thread.
|
virtual |
internal.
Access the parent geode for this indirect geometry
|
virtual |
|
virtual |
set the matrix used to adjust the local origin of this indirect geometry this is used to fix precision issue that arise from having large numbers in the vertex buffers or in the instance transforms
|
virtual |
get the matrix used to adjust the local origin of this indirect geometry this is used to fix precision issue that arise from having large numbers in the vertex buffers or in the instance transforms
|
virtual |
adds all instances that have been queued up by calling addInstanceActual with them as the parameter
|
virtual |
finish initialization of geometry
|
virtual |
returns a wait condition for use as a sync point between class and main thread job
|
virtual |
helper function for job to call the culling and lod updater
|
protectedvirtual |
actually add the instances that were queued up via possibly multiple threads this happens as part of the culling call
|
protectedvirtual |
internal methods to create and 'record' a vertex array object (VAO) using VAO enables us to combine multiple buffer binds into a single 'command' via 'recording' the VAO
|
protectedvirtual |
|
protectedvirtual |
to initialize the shader files cache, because DtIndirectGeometry doesn't have direct access to DtDe yet (it could; but that would break the cdb plugin) lock myInternalsMutex before calling
|
protectedvirtual |
setup the uniforms needed to visualize debug information for indirect geometry lock myInternalsMutex before calling
|
protectedvirtual |
install the shaders needed to render using indirect rendering
|
protectedvirtual |
install a default material on ourselves, so that there's no state leakage with regards ubos/osg::material because we are using materials encoded into an ssbo for indirect rendering
|
protectedvirtual |
slot for handling when the shaders are reloaded
|
protectedvirtual |
internal method to update num of triangles that this geometry will render in the worst case (all lods across all models across all instances)
|
protectedvirtual |
create the culling and lod for this indirect geometry lock myInternalsMutex before calling
|
protectedvirtual |
create the switch manager and the lod manager for this indirect geometry if it has not yet been created.
lock myInternalsMutex before calling
|
protectedvirtual |
|
protectedvirtual |
reload shaders for if necessary
|
staticprotected |
quick caching of virtual programs to avoid parsing them constantly
|
staticprotected |
|
staticprotected |
|
friend |
needed to give access to wait conditions and mutexes.
|
protected |
pointer to the (external) registrar
|
protected |
addInstance may be called from multiple threads. Hence, concurrent queue
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the accumulated effect textures' state which represents the superset of all effect textures cumulatively used by the models of the instances of this Indirect geometry
|
protected |
|
protected |
|
protected |
|
protected |
number of indices across all unique models across instances
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
container for all the instances registered here
|
mutableprotected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
mutableprotected |
FIXME should be a static but currently the cull shader is per indirect.
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |