22 #include <unordered_map>
34 #define CPU_SIDE_COMPILATION 1
35 #include <../data/shaders/indirect/PerInstanceData.h>
36 #undef CPU_SIDE_COMPILATION
86 virtual void setColor(
int instanceId,
const Vector4_32& color);
88 virtual Vector4_32 color(
int instanceId)
const;
92 virtual void setOtherData0(
int instanceId,
const Vector4_32& data);
94 virtual Vector4_32 otherData0(
int instanceId)
const;
98 virtual void setVisibility(
int instanceId,
bool visible);
100 virtual bool visibility(
int instanceId)
const;
104 virtual void setLightPointMaxDistance(
int instanceId,
float distance);
106 virtual float lightPointMaxDistance(
int instanceId)
const;
110 virtual void setLightPointGroupId(
int instanceId,
int lightPointGroupId);
112 virtual int lightPointGroupId(
int instanceId)
const;
116 virtual void addInstance(std::vector<PerGeomInstance*>& perGeomInstances,
int instanceId,
int lightPointGroupId,
bool visible);
119 virtual void removeInstance(
int instanceId);
122 virtual void processPerInstanceData();
125 virtual void releaseGLObjects(osg::State* state)
const;
128 virtual const DtGlBuffer* gpuPerInstanceDataBuffer()
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:143
DtVirtualBaseClassCreator< DtIndirectPerInstanceDataManager > DtIndirectPerInstanceDataManagerCreator
creator
Definition: DtIndirectPerInstanceDataManager.h:39
parent manager class for all Indirect managers. Managers handle information about a specific feature ...
Definition: DtIndirectManager.h:25
MapInstanceIdToOffsetInInstanceDataBuffer myMapInstanceIdToOffsetInInstanceDataBuffer
Definition: DtIndirectPerInstanceDataManager.h:144
friend DtIndirectPerInstanceDataManagerCreator
only creator can create
Definition: DtIndirectPerInstanceDataManager.h:69
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtIndirectManager class.
DtReusableMemoryVector< PerInstanceData, PerInstanceDataInvalidator > DtReusablePerInstanceData
Definition: DtIndirectPerInstanceDataManager.h:55
const char * creatorTypeName< DtIndirectPerInstanceDataManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectPerInstanceDataManager.h:46
DtGlBuffer * myGpuPerInstanceDataBuffer
the gpu buffer for per instance data
Definition: DtIndirectPerInstanceDataManager.h:133
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
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:49
handles data that is specified per instance. Currently only the blend color from the DtOsgArticulated...
Definition: DtIndirectPerInstanceDataManager.h:65
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:76
DtReusablePerInstanceData myVectorPerInstanceData
the reusable vector representing per instance data that is used to hold & transfer the data to the GP...
Definition: DtIndirectPerInstanceDataManager.h:137
bool myMutablePerInstanceDataDirty
do we need an update
Definition: DtIndirectPerInstanceDataManager.h:140
DtPerGeomInstance class declaration.