23 #include <osg/observer_ptr>
33 class DtIndirectViewParameters;
34 class DtIndirectLodProgram;
35 class DtInstanceContainer;
36 class DtIndirectClearBufferProgram;
60 #define CPU_SIDE_COMPILATION 1
61 #include <../data/shaders/indirect/LodInfoBuffer.h>
62 #undef CPU_SIDE_COMPILATION
74 void operator()(IndirectLodInfo& info);
82 bool operator()(
const IndirectLodInfo& info)
const;
111 virtual void releaseGLObjects(osg::State* state)
const;
117 virtual void removeLodStacks(
int instanceId);
124 ,
const DtGlBuffer* gpuInputPerGeomInstancesBuffer
125 ,
const osg::Camera* currentCamera);
129 virtual const DtGlBuffer* gpuLodVisibleBuffer(
const osg::Camera* currentCamera)
const;
132 virtual void reloadShaders()
const;
135 virtual void printInfo();
142 virtual void addLodStack(
int perGeomInstanceIndex,
int& indexIntoVectorIndirectLodInfos,
const DequeIndirectLodInfos& parentLodStack,
const DequeIndirectLodInfos& lodStack,
const osg::Matrix& inverselocalOriginMatrix);
145 virtual void updateLodBuffersIfNecessary();
148 virtual void deleteBuffers(
void);
151 virtual void tearDownBuffers(
void)
const;
155 virtual void flushGpuLodVisibleBuffers();
168 typedef std::vector<osg::observer_ptr<const osg::Camera> >
CameraVector;
initializer/invalidator for lod info
Definition: DtIndirectLodManager.h:71
VectorIndirectLodInfos myIndirectLodInfos
Definition: DtIndirectLodManager.h:159
parent manager class for all Indirect managers. Managers handle information about a specific feature ...
Definition: DtIndirectManager.h:26
const char * creatorTypeName< DtIndirectLodManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectLodManager.h:46
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtIndirectManager class.
DtVirtualBaseClassCreator< DtIndirectLodManager, DtInstanceContainer & > DtIndirectLodManagerCreator
creator
Definition: DtIndirectLodManager.h:39
DtIndirectLodProgram * myMutableLodProgram
Definition: DtIndirectLodManager.h:173
osg::observer_ptr< osg::Node > NodeObserverPtr
Definition: DtIndirectLodManager.h:64
CameraToBufferMap myGpuLodVisibleBufferMap
Definition: DtIndirectLodManager.h:166
handles the lods for all the indirect geometry. sets up and runs a compute shader prepass for process...
Definition: DtIndirectLodManager.h:53
std::vector< DequeIndirectLodInfos > DequeIndirectLodInfoArray
Definition: DtIndirectLodManager.h:68
bool myMutableLodInfoDirty
Definition: DtIndirectLodManager.h:171
CameraVector myActiveCameras
Definition: DtIndirectLodManager.h:169
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
singleton class that wraps indirect lod gpu shader.
Definition: DtIndirectLodProgram.h:72
unsigned int myMaxPerGeomInstanceId
Definition: DtIndirectLodManager.h:177
const int myStartPerGeomInstanceIndex
Definition: DtIndirectLodManager.h:84
std::vector< osg::observer_ptr< const osg::Camera > > CameraVector
Definition: DtIndirectLodManager.h:168
const int myEndPerGeomInstanceIndex
Definition: DtIndirectLodManager.h:85
DtGlBuffer * myGpuLodInfoBuffer
The buffer containing all the lod infos for all instances managed by this manager.
Definition: DtIndirectLodManager.h:162
friend DtIndirectLodManagerCreator
only creator can create
Definition: DtIndirectLodManager.h:92
removal predicate for lod infos (checks to see if the model ids match.
Definition: DtIndirectLodManager.h:78
A generic OpenGL buffer. This can be: -> a vertex buffer -> an index buffer -> a shader storage buffe...
Definition: DtGlBuffer.h:29
The class that is used to communicate the camera viewing parameters to the DtICullingAndLOD interface...
Definition: DtIndirectViewParameters.h:26
Contains makVrv::DtReusableMemoryVector class.
std::map< int, std::pair< int, int > > myInstanceIdToPairIndices
Definition: DtIndirectLodManager.h:179
This class clears buffers using compute shader Theoretically, there are performance gains to be achie...
Definition: DtIndirectClearBufferProgram.h:33
DtReusableMemoryVector< IndirectLodInfo, IndirectLodInfoInvalidator, IndirectLodInfoRemovalPredicate > VectorIndirectLodInfos
Definition: DtIndirectLodManager.h:88
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
std::deque< NodeLodInfoPair > DequeIndirectLodInfoPairs
Definition: DtIndirectLodManager.h:67
Helper class to manage instances This class allows you to add a DtInstance_64 Internally, however it stores this as a DtInstance (which the GPU can directly read)
Definition: DtInstanceContainer.h:31
std::map< osg::observer_ptr< const osg::Camera >, DtGlBuffer * > CameraToBufferMap
The buffer containing a bool for each instance to know if it should be drawn or not.
Definition: DtIndirectLodManager.h:165
std::deque< IndirectLodInfo > DequeIndirectLodInfos
Definition: DtIndirectLodManager.h:66
std::pair< NodeObserverPtr, IndirectLodInfo > NodeLodInfoPair
Definition: DtIndirectLodManager.h:65
DtIndirectClearBufferProgram * myMutableClearBufferProgram
Definition: DtIndirectLodManager.h:175