20 #include <unordered_map>
29 class DtInstanceContainer;
33 #define CPU_SIDE_COMPILATION 1
34 #include <../data/shaders/indirect/PerInstanceData.h>
35 #undef CPU_SIDE_COMPILATION
80 virtual void setColor(
int instanceId,
const Vector4_32& color);
82 virtual Vector4_32 color(
int instanceId)
const;
86 virtual void setOtherData0(
int instanceId,
const Vector4_32& data);
88 virtual Vector4_32 otherData0(
int instanceId)
const;
92 virtual void setVisibility(
int instanceId,
bool visible);
94 virtual bool visibility(
int instanceId)
const;
98 virtual void setLightPointMaxDistance(
int instanceId,
float distance);
100 virtual float lightPointMaxDistance(
int instanceId)
const;
104 virtual void setLightPointGroupId(
int instanceId,
int lightPointGroupId);
106 virtual int lightPointGroupId(
int instanceId)
const;
110 virtual void addInstance(
int perGeomInstanceIndex,
int numPerGeomInstances,
int instanceId,
int lightPointGroupId);
113 virtual void removeInstance(
int instanceId);
116 virtual void processPerInstanceData(
void);
119 virtual void releaseGLObjects(osg::State* state)
const;
122 virtual const DtGlBuffer* gpuPerInstanceDataBuffer(
void)
const;
void operator()(PerInstanceData &info)
std::unordered_map< int, int > MapInstanceIdToOffsetInInstanceDataBuffer
map of instance ids to offset in the instance data buffer
Definition: DtIndirectPerInstanceDataManager.h:137
parent manager class for all Indirect managers. Managers handle information about a specific feature ...
Definition: DtIndirectManager.h:26
MapInstanceIdToOffsetInInstanceDataBuffer myMapInstanceIdToOffsetInInstanceDataBuffer
Definition: DtIndirectPerInstanceDataManager.h:138
friend DtIndirectPerInstanceDataManagerCreator
only creator can create
Definition: DtIndirectPerInstanceDataManager.h:63
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtIndirectManager class.
DtReusableMemoryVector< PerInstanceData, PerInstanceDataInvalidator > DtReusablePerInstanceData
Definition: DtIndirectPerInstanceDataManager.h:54
const char * creatorTypeName< DtIndirectPerInstanceDataManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectPerInstanceDataManager.h:45
DtGlBuffer * myGpuPerInstanceDataBuffer
the gpu buffer for per instance data
Definition: DtIndirectPerInstanceDataManager.h:127
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
A generic OpenGL buffer. This can be: -> a vertex buffer -> an index buffer -> a shader storage buffe...
Definition: DtGlBuffer.h:29
Contains makVrv::DtReusableMemoryVector class.
invalidate the contents of PerInstanceData
Definition: DtIndirectPerInstanceDataManager.h:48
handles data that is specified per instance. Currently only the blend color from the DtOsgArticulated...
Definition: DtIndirectPerInstanceDataManager.h:59
DtVirtualBaseClassCreator< DtIndirectPerInstanceDataManager, DtInstanceContainer & > DtIndirectPerInstanceDataManagerCreator
creator
Definition: DtIndirectPerInstanceDataManager.h:38
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
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
DtReusablePerInstanceData myVectorPerInstanceData
the reusable vector representing per instance data that is used to hold & transfer the data to the GP...
Definition: DtIndirectPerInstanceDataManager.h:131
bool myMutablePerInstanceDataDirty
do we need an update
Definition: DtIndirectPerInstanceDataManager.h:134