23 #define CPU_SIDE_COMPILATION 1
24 #include <../data/shaders/indirect/GeometrySpecification.h>
31 #include <boost/thread/mutex.hpp>
33 #include <unordered_set>
38 class DtGpuArenaUploadState;
40 class DtIndirectModelSubGeometry;
41 class DtIndirectLimitTextureStrategy;
42 class DtGlDeleteObjectManager;
97 virtual void unloadBuffers();
100 virtual bool buffersUploadedToGpu()
const;
109 virtual void texturesSet(std::map< const DtIndirectTexturePrototype*, int >& texturesSet)
const;
127 virtual const BindlessPtrNV& vertexBufferBindless(
int index)
const;
130 virtual const BindlessPtrNV& additionalBufferBindless(
int index)
const;
133 virtual const BindlessPtrNV& indexBufferBindless(
int index)
const;
136 virtual int numSubGeometries()
const;
139 virtual int maxCoords(
int index)
const;
142 virtual int numVertices(
int index)
const;
145 virtual int numIndices(
int index)
const;
160 virtual void promoteDataFromSubGeosToMe();
166 virtual void resetGpuUploads();
172 virtual bool glBuffersContainAnyData()
const;
175 virtual void releaseGLObjects(osg::State* state);
178 virtual void createIndirectBuffers();
181 virtual void deleteIndirectBuffers();
188 virtual void computeChunkUploadSize(
unsigned int& desiredUploadSize,
unsigned int& maxUploadSize)
const;
192 virtual void prepareToUploadGpuDataForBuffer(
DtGlBuffer& buffer, std::vector<uint8_t>& stagingData);
196 virtual void prepareToUploadGpuData();
199 virtual void updateBindlessPointers();
251 unsigned int myTotalSize = 0;
252 unsigned int myUploadOffset = 0;
253 unsigned int myUploadSize = 0;
254 const unsigned char* myUploadData =
nullptr;
260 std::unordered_set<const DtGpuCulling*>
myUsers;
boost::mutex myUserMutex
Definition: DtIndirectModelInfo.h:261
Contains makVrv::DtIndirectUvOffsetManager class.
friend DtIndirectModelInfoCreator
Definition: DtIndirectModelInfo.h:73
Structure for a bindless buffer of an individual sub geometry.
Definition: DtIndirectModelInfo.h:56
DtMaterial class declaration.
BindlessPtrNV myAdditionalBufferBindless
Definition: DtIndirectModelInfo.h:59
DtGeometrySpecVector myGeometrySpecifications
the vector of all geometry specs
Definition: DtIndirectModelInfo.h:212
std::string myModelDefName
Definition: DtIndirectModelInfo.h:206
DtDe & myDe
Definition: DtIndirectModelInfo.h:245
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtGlDeleteObjectManager & myGlDeleteObjectManager
Definition: DtIndirectModelInfo.h:246
This class is a component of the DtIndirectGeometry It inputs are: -> the instances registered with Dt...
Definition: DtGpuCulling.h:91
std::vector< DtIndirectModelSubGeometry * > myVectorModelSubGeometries
the same size as the spec vector above 1 sub-geometry for each spec
Definition: DtIndirectModelInfo.h:277
DtVector2< int > myMaxTextureResolutionInXandY
Definition: DtIndirectModelInfo.h:239
DtIndirectUvOffsetManager::ScrollableUvOffsetIdsAndMultipliers myScrollableUvOffsetIdsAndMultipliers
uv offset ids and multipliers
Definition: DtIndirectModelInfo.h:227
Holds information for a specific GPU buffer upload.
Definition: DtIndirectModelInfo.h:249
DtVirtualBaseClassCreator< DtIndirectModelInfo > DtIndirectModelInfoCreator
creator
Definition: DtIndirectModelInfo.h:46
DtIndirectLodManager::DequeIndirectLodInfoArray myLodStacks
lod paths
Definition: DtIndirectModelInfo.h:233
const char * creatorTypeName< DtIndirectModelInfo >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectModelInfo.h:53
int myNumLightSources
the number of light sources
Definition: DtIndirectModelInfo.h:237
std::vector< DequeIndirectLodInfos > DequeIndirectLodInfoArray
Definition: DtIndirectLodManager.h:70
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
std::deque< NodeDofInfoPair > DequeNodeDofInfoPairs
Definition: DtIndirectDofManager.h:77
Contains makVrv::DtIndirectDofManager class.
std::vector< DtIndirectGeometryTextures > myTextures
vector of the textures in this model
Definition: DtIndirectModelInfo.h:218
std::string myModelName
the model name
Definition: DtIndirectModelInfo.h:204
std::map< std::string, unsigned int > AnnotationToUvOffsetMap
Definition: DtIndirectUvOffsetManager.h:54
Contains makVrv::DtIndirectModelSubGeometry class.
DtIndirectUvOffsetManager::AnnotationToUvOffsetMap myAnnotationToUvOffsetIdMap
annotation to uv offset map
Definition: DtIndirectModelInfo.h:224
DtIndirectSwitchManager::DequeNodeSwitchInfoPairsArray mySwitchPaths
switch paths
Definition: DtIndirectModelInfo.h:230
BindlessPtrNV myIndexBufferBindless
Definition: DtIndirectModelInfo.h:60
std::unordered_map< int, MultiplierAndTrackSide > ScrollableUvOffsetIdsAndMultipliers
Definition: DtIndirectUvOffsetManager.h:66
Manages and tracks memory usage statistics for GPU resource upload operations.
Definition: DtGpuArenaUploadState.h:39
std::vector< uint8_t > myVertexBufferData
Definition: DtIndirectModelInfo.h:269
std::vector< PerGeomInstance > DtPerGeomInstances
Definition: DtPerGeomInstance.h:26
std::vector< DequeNodeSwitchInfoPairs > DequeNodeSwitchInfoPairsArray
Definition: DtIndirectSwitchManager.h:78
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:258
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:270
BindlessPtrNV myVertexBufferBindless
Definition: DtIndirectModelInfo.h:58
bool myBuffersUploadedToGpu
Are the model data buffers completely uploaded to the gpu.
Definition: DtIndirectModelInfo.h:267
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:243
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:215
std::unordered_set< const DtGpuCulling * > myUsers
Definition: DtIndirectModelInfo.h:260
int myModelID
the model id
Definition: DtIndirectModelInfo.h:209
Contains DLL export macros.
DtIndirectDofManager::DequeNodeDofInfoPairs myDofPaths
Definition: DtIndirectModelInfo.h:234
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:272
Contains the DtIndirectGeometryTextures class declaration.
std::vector< DtIndirectSubGeoBindlessBuffers > mySubGeoBindlessBuffersVec
Definition: DtIndirectModelInfo.h:273
DtPerGeomInstances myPerGeomInstancesTemplate
vector of the per geom instances
Definition: DtIndirectModelInfo.h:221
DtPerGeomInstance class declaration.
Contains the per Model info which the indirect module needs These objects are owned by the Indirect g...
Definition: DtIndirectModelInfo.h:68
std::vector< Material > DtIndirectMaterialVector
Each model type can have a number of geometries, each with an own material.
Definition: DtMaterial.h:46