23 #define CPU_SIDE_COMPILATION 1
24 #include <../data/shaders/indirect/GeometrySpecification.h>
31 #include <boost/thread/mutex.hpp>
33 #include <unordered_set>
39 class DtIndirectModelSubGeometry;
40 class DtIndirectLimitTextureStrategy;
41 class DtGlDeleteObjectManager;
96 virtual void unloadBuffers();
99 virtual bool buffersUploadedToGpu()
const;
104 virtual bool processGpuBufferUploads(
unsigned int& uploadedMemory);
108 virtual void texturesSet(std::map< const DtIndirectTexturePrototype*, int >& texturesSet)
const;
126 virtual const BindlessPtrNV& vertexBufferBindless(
int index)
const;
129 virtual const BindlessPtrNV& additionalBufferBindless(
int index)
const;
132 virtual const BindlessPtrNV& indexBufferBindless(
int index)
const;
135 virtual int numSubGeometries()
const;
138 virtual int maxCoords(
int index)
const;
141 virtual int numVertices(
int index)
const;
144 virtual int numIndices(
int index)
const;
159 virtual void promoteDataFromSubGeosToMe();
165 virtual void resetGpuUploads();
171 virtual bool glBuffersContainAnyData()
const;
174 virtual void releaseGLObjects(osg::State* state);
177 virtual void createIndirectBuffers();
180 virtual void deleteIndirectBuffers();
187 virtual void computeChunkUploadSize(
unsigned int& desiredUploadSize,
unsigned int& maxUploadSize)
const;
191 virtual void prepareToUploadGpuDataForBuffer(
DtGlBuffer& buffer, std::vector<uint8_t>& stagingData);
195 virtual void prepareToUploadGpuData();
198 virtual void updateBindlessPointers();
250 unsigned int myTotalSize = 0;
251 unsigned int myUploadOffset = 0;
252 unsigned int myUploadSize = 0;
253 const unsigned char* myUploadData =
nullptr;
259 std::unordered_set<const DtGpuCulling*>
myUsers;
boost::mutex myUserMutex
Definition: DtIndirectModelInfo.h:260
Contains makVrv::DtIndirectUvOffsetManager class.
friend DtIndirectModelInfoCreator
Definition: DtIndirectModelInfo.h:72
Structure for a bindless buffer of an individual sub geometry.
Definition: DtIndirectModelInfo.h:55
DtMaterial class declaration.
BindlessPtrNV myAdditionalBufferBindless
Definition: DtIndirectModelInfo.h:58
DtGeometrySpecVector myGeometrySpecifications
the vector of all geometry specs
Definition: DtIndirectModelInfo.h:211
std::string myModelDefName
Definition: DtIndirectModelInfo.h:205
DtDe & myDe
Definition: DtIndirectModelInfo.h:244
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtGlDeleteObjectManager & myGlDeleteObjectManager
Definition: DtIndirectModelInfo.h:245
This class is a component of the DtIndirectGeometry It inputs are: -> the instances registered with Dt...
Definition: DtGpuCulling.h:88
std::vector< DtIndirectModelSubGeometry * > myVectorModelSubGeometries
the same size as the spec vector above 1 sub-geometry for each spec
Definition: DtIndirectModelInfo.h:276
DtVector2< int > myMaxTextureResolutionInXandY
Definition: DtIndirectModelInfo.h:238
DtIndirectUvOffsetManager::ScrollableUvOffsetIdsAndMultipliers myScrollableUvOffsetIdsAndMultipliers
uv offset ids and multipliers
Definition: DtIndirectModelInfo.h:226
Holds information for a specific GPU buffer upload.
Definition: DtIndirectModelInfo.h:248
DtVirtualBaseClassCreator< DtIndirectModelInfo > DtIndirectModelInfoCreator
creator
Definition: DtIndirectModelInfo.h:45
DtIndirectLodManager::DequeIndirectLodInfoArray myLodStacks
lod paths
Definition: DtIndirectModelInfo.h:232
const char * creatorTypeName< DtIndirectModelInfo >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectModelInfo.h:52
int myNumLightSources
the number of light sources
Definition: DtIndirectModelInfo.h:236
std::vector< DequeIndirectLodInfos > DequeIndirectLodInfoArray
Definition: DtIndirectLodManager.h:69
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
std::deque< NodeDofInfoPair > DequeNodeDofInfoPairs
Definition: DtIndirectDofManager.h:76
Contains makVrv::DtIndirectDofManager class.
std::vector< DtIndirectGeometryTextures > myTextures
vector of the textures in this model
Definition: DtIndirectModelInfo.h:217
std::string myModelName
the model name
Definition: DtIndirectModelInfo.h:203
std::map< std::string, unsigned int > AnnotationToUvOffsetMap
Definition: DtIndirectUvOffsetManager.h:53
Contains makVrv::DtIndirectModelSubGeometry class.
DtIndirectUvOffsetManager::AnnotationToUvOffsetMap myAnnotationToUvOffsetIdMap
annotation to uv offset map
Definition: DtIndirectModelInfo.h:223
DtIndirectSwitchManager::DequeNodeSwitchInfoPairsArray mySwitchPaths
switch paths
Definition: DtIndirectModelInfo.h:229
BindlessPtrNV myIndexBufferBindless
Definition: DtIndirectModelInfo.h:59
std::unordered_map< int, MultiplierAndTrackSide > ScrollableUvOffsetIdsAndMultipliers
Definition: DtIndirectUvOffsetManager.h:65
std::vector< uint8_t > myVertexBufferData
Definition: DtIndirectModelInfo.h:268
std::vector< PerGeomInstance > DtPerGeomInstances
Definition: DtPerGeomInstance.h:26
std::vector< DequeNodeSwitchInfoPairs > DequeNodeSwitchInfoPairsArray
Definition: DtIndirectSwitchManager.h:77
The indirect system uses this in conjunction with the system wide limits (for entity/terrain) to clam...
Definition: DtIndirectLimitTextureStrategy.h:65
Contains makVrv::DtIndirectSwitchManager class.
std::vector< GpuBufferUploadInfo > myGpuBufferUploads
Definition: DtIndirectModelInfo.h:257
A generic OpenGL buffer. This can be: -> a vertex buffer -> an index buffer -> a shader storage buffe...
Definition: DtGlBuffer.h:29
std::vector< uint8_t > myIndexBufferData
Definition: DtIndirectModelInfo.h:269
BindlessPtrNV myVertexBufferBindless
Definition: DtIndirectModelInfo.h:57
bool myBuffersUploadedToGpu
Are the model data buffers completely uploaded to the gpu.
Definition: DtIndirectModelInfo.h:266
Vaos are OpenGL context specific. They need to be deleted in the context they are created in...
Definition: DtGlDeleteObjectManager.h:58
static const BindlessPtrNV theInvalidBindless
Definition: DtIndirectModelInfo.h:242
Contains makVrv::DtIndirectLodManager class.
geometry that is part of a model. refers to one index buffer and a vertex+color+normal+uv buffer corr...
Definition: DtIndirectModelSubGeometry.h:57
DtIndirectMaterialVector myMaterials
vector of the materials in this model
Definition: DtIndirectModelInfo.h:214
std::unordered_set< const DtGpuCulling * > myUsers
Definition: DtIndirectModelInfo.h:259
int myModelID
the model id
Definition: DtIndirectModelInfo.h:208
Contains DLL export macros.
DtIndirectDofManager::DequeNodeDofInfoPairs myDofPaths
Definition: DtIndirectModelInfo.h:233
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
VRV/Indirect uses its own texture paradigm: DtIndirectTexturePrototype, which is a 'template' for mak...
Definition: DtIndirectTexturePrototype.h:53
std::vector< DtIndirectModelSubGeoProps > mySubGeoPropsVec
Definition: DtIndirectModelInfo.h:271
Contains the DtIndirectGeometryTextures class declaration.
std::vector< DtIndirectSubGeoBindlessBuffers > mySubGeoBindlessBuffersVec
Definition: DtIndirectModelInfo.h:272
DtPerGeomInstances myPerGeomInstancesTemplate
vector of the per geom instances
Definition: DtIndirectModelInfo.h:220
DtPerGeomInstance class declaration.
Contains the per Model info which the indirect module needs These objects are owned by the Indirect g...
Definition: DtIndirectModelInfo.h:67
std::vector< Material > DtIndirectMaterialVector
Each model type can have a number of geometries, each with an own material.
Definition: DtMaterial.h:46