![]() |
VR-Forces 5.0.3 Developer's Guide
|
handles the lods for all the indirect geometry. sets up and runs a compute shader prepass for processing the lods contains a GPU buffer with the result which is used by the cull compute shader Own by DtIndirectGeometry 1:1

Classes | |
| struct | IndirectLodInfoInvalidator |
| struct | IndirectLodInfoRemovalPredicate |
Public Types | |
| typedef osg::observer_ptr < osg::Node > | NodeObserverPtr |
| typedef std::pair < NodeObserverPtr, IndirectLodInfo > | NodeLodInfoPair |
| typedef std::deque < IndirectLodInfo > | DequeIndirectLodInfos |
| typedef std::deque < NodeLodInfoPair > | DequeIndirectLodInfoPairs |
| typedef std::vector < DequeIndirectLodInfos > | DequeIndirectLodInfoArray |
| typedef DtReusableMemoryVector < IndirectLodInfo, IndirectLodInfoInvalidator, IndirectLodInfoRemovalPredicate > | VectorIndirectLodInfos |
Public Types inherited from makVrv::DtIndirectManager | |
| enum | ManagerTypes { BaseClass, LodManager, SwitchManager, DofManager, UvOffsetManager, PerInstanceDataManager } |
Public Member Functions | |
| virtual | ~DtIndirectLodManager () |
| virtual void | releaseGLObjects (osg::State *state) const |
| virtual void | addLodStacks (int perGeomInstanceIndex, int numGeoms, const DequeIndirectLodInfos &parentLodStack, const DequeIndirectLodInfoArray &lodStacks, const osg::Matrix &inverselocalOriginMatrix, int instanceId) |
| virtual void | removeLodStacks (int instanceId) |
| virtual void | processLods (const DtIndirectViewParameters &viewParameters, const DtGlBuffer *gpuDofTransformBuffer, const DtGlBuffer *gpuDofModelScaleBuffer, const DtGlBuffer *gpuInputPerGeomInstancesBuffer, const osg::Camera *currentCamera) |
| virtual const DtGlBuffer * | gpuLodVisibleBuffer (const osg::Camera *currentCamera) const |
| virtual void | reloadShaders () const |
| virtual void | printInfo () |
Public Member Functions inherited from makVrv::DtIndirectManager | |
| DtIndirectManager (DtDe &de, DtInstanceContainer &container) | |
| virtual | ~DtIndirectManager () |
Public Attributes | |
| friend | DtIndirectLodManagerCreator |
Protected Types | |
| typedef std::map < osg::observer_ptr< const osg::Camera >, DtGlBuffer * > | CameraToBufferMap |
| typedef std::vector < osg::observer_ptr< const osg::Camera > > | CameraVector |
Protected Member Functions | |
| DtIndirectLodManager (DtDe &de, DtInstanceContainer &container) | |
| virtual void | addLodStack (int perGeomInstanceIndex, int &indexIntoVectorIndirectLodInfos, const DequeIndirectLodInfos &parentLodStack, const DequeIndirectLodInfos &lodStack, const osg::Matrix &inverselocalOriginMatrix) |
| virtual void | updateLodBuffersIfNecessary () |
| virtual void | deleteBuffers (void) |
| virtual void | tearDownBuffers (void) const |
| virtual void | flushGpuLodVisibleBuffers () |
Protected Attributes | |
| VectorIndirectLodInfos | myIndirectLodInfos |
| DtGlBuffer * | myGpuLodInfoBuffer |
| CameraToBufferMap | myGpuLodVisibleBufferMap |
| CameraVector | myActiveCameras |
| bool | myMutableLodInfoDirty |
| DtIndirectLodProgram * | myMutableLodProgram |
| DtIndirectClearBufferProgram * | myMutableClearBufferProgram |
| unsigned int | myMaxPerGeomInstanceId |
| std::map< int, std::pair< int, int > > | myInstanceIdToPairIndices |
Protected Attributes inherited from makVrv::DtIndirectManager | |
| DtInstanceContainer & | myInstanceContainer |
| DtDe & | myDe |
Private Member Functions | |
| DtIndirectLodManager ()=delete | |
| DtIndirectLodManager (const DtIndirectLodManager &other)=delete | |
| DtIndirectLodManager & | operator= (const DtIndirectLodManager &other)=delete |
Additional Inherited Members | |
Static Public Member Functions inherited from makVrv::DtIndirectManager | |
| static int | managerType () |
| typedef osg::observer_ptr<osg::Node> makVrv::DtIndirectLodManager::NodeObserverPtr |
| typedef std::pair<NodeObserverPtr, IndirectLodInfo> makVrv::DtIndirectLodManager::NodeLodInfoPair |
| typedef std::deque<IndirectLodInfo> makVrv::DtIndirectLodManager::DequeIndirectLodInfos |
| typedef std::deque<NodeLodInfoPair> makVrv::DtIndirectLodManager::DequeIndirectLodInfoPairs |
| typedef std::vector<DequeIndirectLodInfos> makVrv::DtIndirectLodManager::DequeIndirectLodInfoArray |
| typedef DtReusableMemoryVector<IndirectLodInfo, IndirectLodInfoInvalidator, IndirectLodInfoRemovalPredicate> makVrv::DtIndirectLodManager::VectorIndirectLodInfos |
|
protected |
The buffer containing a bool for each instance to know if it should be drawn or not.
|
protected |
|
virtual |
DTOR.
|
protected |
CTOR. only creator can create.
|
privatedelete |
default constructor not implemented
|
privatedelete |
Copy Constructor not implemented – Copy Not Allowed.
|
privatedelete |
Assignment Operator Not implemented – Assignment Not Allowed.
|
virtual |
called when the context is deleted in order to clean up GPU data
|
virtual |
add a vector of lod stacks to the lod management system
|
virtual |
remove the lod stacks linked to this instanceId
|
virtual |
setup and run the lod compute shader which checks all lods against the camera position to see if their children should be visible
|
virtual |
get the buffer which has the output of the lod compute shader based on the current camera since we need to process multiple cameras between each draw.
|
virtual |
reload the compute shader shaders
|
virtual |
print out the info of what's contained in the buffer
|
protectedvirtual |
add a single stack to the lod info input buffer The parent stack lod centers are multiplied by the inverse local offset so they correctly gives the view position when multiplied by the model view matrix.
|
protectedvirtual |
send down any new lod infomation that has been recieved
|
protectedvirtual |
delete the gpu buffers
|
protectedvirtual |
cleanup the GPU buffers on the gpu side but leave the CPU objects
|
protectedvirtual |
check to see if any cameras are no longer valid and destroy their buffers if they are invalid.
| friend makVrv::DtIndirectLodManager::DtIndirectLodManagerCreator |
only creator can create
|
protected |
|
protected |
The buffer containing all the lod infos for all instances managed by this manager.
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
protected |