![]() |
VR-Forces Developer's Guide
|
Contains the per Model info which the indirect module needs These objects are owned by the Indirect geometry registrar. The vertex and index buffers GPU uploads are slpit into chucks to improve GPU driver interaction and avoid stalls.
Classes | |
| struct | GpuBufferUploadInfo |
Public Member Functions | |
| virtual | ~DtIndirectModelInfo () |
| DtIndirectModelInfo ()=delete | |
| DtIndirectModelInfo (const DtIndirectModelInfo &)=delete | |
| DtIndirectModelInfo & | operator= (const DtIndirectModelInfo &)=delete |
| virtual void | unloadBuffers () |
| virtual bool | buffersUploadedToGpu () const |
| virtual bool | processGpuBufferUploads (unsigned int &uploadedMemory) |
| virtual void | texturesSet (std::map< const DtIndirectTexturePrototype *, int > &texturesSet) const |
| virtual void | addUser (const DtGpuCulling *user) |
| virtual void | removeUser (const DtGpuCulling *user) |
| virtual void | computeMaxTextureResolution (const DtIndirectLimitTextureStrategy &limitStrategy) |
| virtual const BindlessPtrNV & | vertexBufferBindless (int index) const |
| virtual const BindlessPtrNV & | additionalBufferBindless (int index) const |
| virtual const BindlessPtrNV & | indexBufferBindless (int index) const |
| virtual int | numSubGeometries () const |
| virtual int | maxCoords (int index) const |
| virtual int | numVertices (int index) const |
| virtual int | numIndices (int index) const |
| virtual void | addSubGeometry (DtIndirectModelSubGeometry *modelSubGeometry) |
| virtual DtIndirectModelSubGeometry * | subGeometry (int index) const |
| virtual void | promoteDataFromSubGeosToMe () |
Protected Member Functions | |
| DtIndirectModelInfo (DtDe &de) | |
| virtual void | resetGpuUploads () |
| virtual bool | isDefaultTexture (const DtIndirectTexturePrototype *texture) const |
| virtual bool | glBuffersContainAnyData () const |
| virtual void | releaseGLObjects (osg::State *state) |
| virtual void | createIndirectBuffers () |
| virtual void | deleteIndirectBuffers () |
| virtual void | computeChunkUploadSize (unsigned int &desiredUploadSize, unsigned int &maxUploadSize) const |
| virtual void | prepareToUploadGpuDataForBuffer (DtGlBuffer &buffer, std::vector< uint8_t > &stagingData) |
| virtual void | prepareToUploadGpuData () |
| virtual void | updateBindlessPointers () |
Protected Attributes | |
| DtDe & | myDe |
| DtGlDeleteObjectManager & | myGlDeleteObjectManager |
| std::vector< GpuBufferUploadInfo > | myGpuBufferUploads |
| std::unordered_set< const DtGpuCulling * > | myUsers |
| boost::mutex | myUserMutex |
| DtGlBuffer * | myVertexAndAttributesBuffer = nullptr |
| DtGlBuffer * | myIndexBuffer = nullptr |
| bool | myBuffersUploadedToGpu |
| std::vector< uint8_t > | myVertexBufferData |
| std::vector< uint8_t > | myIndexBufferData |
| std::vector < DtIndirectModelSubGeoProps > | mySubGeoPropsVec |
| std::vector < DtIndirectSubGeoBindlessBuffers > | mySubGeoBindlessBuffersVec |
| std::vector < DtIndirectModelSubGeometry * > | myVectorModelSubGeometries |
Static Protected Attributes | |
| static const BindlessPtrNV | theInvalidBindless |
|
virtual |
destructor
|
delete |
not allowed
|
delete |
not allowed
|
protected |
CTOR. only creator can create.
|
delete |
not allowed
|
virtual |
unload gl buffers make gl buffers non-resident and add them to the delete manager
|
virtual |
Is all buffer data completely uploaded to the GPU?
|
virtual |
Processes any remaining gpu buffer uploads. Returns true if the model data is still in the process of being uploaded to the gpu.
| uploadedMemory | The amount of memory uploaded to the GPU. (modified by this function) |
|
virtual |
get the set of textures (diffuse + effect textures) that this model refers to
|
virtual |
gpu culling is the only 'user' of the model info since it uses the bindless address of the buffers and textures of the model multiple gpu cullings (and hence indirect geometries) can refer to the same model info
|
virtual |
gpu culling is the only 'user' of the model info since it uses the bindless address of the buffers and textures of the model multiple gpu cullings (and hence indirect geometries) can refer to the same model info
|
virtual |
update the max texture resolution in x and y for all textures of a given model should be done when the model is finalized. Also, excludes the excluded textures from the max computation, per the specified strategy
|
virtual |
bindless vertex buffer
|
virtual |
bindless additional attributes buffer
|
virtual |
bindless index buffer
|
virtual |
number of sub goes
The max texture coordinates unit/number of the texture coordinate sets.
The num of vertices.
|
virtual |
Don't use directly Added only by aggregator. This will transfer ownership of the sub geo/ (ie, the model info will handle the lifetime/deletion of this subgeo)
|
virtual |
Don't use directly. Used only by DtIndirectModelInfoContainer::copyData to copy data: sub geo <- osg.
|
virtual |
Don't use directly. Used only by DtIndirectModelInfoContainer. Promote data from sub geos into me. The sub geos can then be deleted.
|
protectedvirtual |
Resets information associated with gpu uploads. Marks the state of the model buffers as not uploaded to gpu.
|
protectedvirtual |
whether a texture is the default white texture
|
protectedvirtual |
Returns true if any gl buffer data has been loaded partially or fully.
|
protectedvirtual |
release gl objects
|
protectedvirtual |
internal. create the indirect buffers
|
protectedvirtual |
internal. delete the indirect buffers
|
protectedvirtual |
internal. computes the the desired upload size for each chunk of data that is uploaded to the GPU. Rather than updating the entire buffer at once, the buffer updates are split into chunks to improve GPU driver interaction.
| desiredUploadSize | the chunk size |
| maxUploadSize | the maximum chunk size |
|
protectedvirtual |
internal. prepares information about chunks of data that will be uploaded to the gpu for a given buffer
|
protectedvirtual |
internal. prepares information about chunks of data that will be uploaded to the gpu for all buffers
|
protectedvirtual |
internal. update the bindless pointers with current buffer data
| friend makVrv::DtIndirectModelInfo::DtIndirectModelInfoCreator |
| std::string makVrv::DtIndirectModelInfo::myModelName |
the model name
| std::string makVrv::DtIndirectModelInfo::myModelDefName |
| int makVrv::DtIndirectModelInfo::myModelID |
the model id
| DtGeometrySpecVector makVrv::DtIndirectModelInfo::myGeometrySpecifications |
the vector of all geometry specs
| DtIndirectMaterialVector makVrv::DtIndirectModelInfo::myMaterials |
vector of the materials in this model
| std::vector<DtIndirectGeometryTextures> makVrv::DtIndirectModelInfo::myTextures |
vector of the textures in this model
| DtPerGeomInstances makVrv::DtIndirectModelInfo::myPerGeomInstancesTemplate |
vector of the per geom instances
| DtIndirectUvOffsetManager::AnnotationToUvOffsetMap makVrv::DtIndirectModelInfo::myAnnotationToUvOffsetIdMap |
annotation to uv offset map
| DtIndirectUvOffsetManager::ScrollableUvOffsetIdsAndMultipliers makVrv::DtIndirectModelInfo::myScrollableUvOffsetIdsAndMultipliers |
uv offset ids and multipliers
| DtIndirectSwitchManager::DequeNodeSwitchInfoPairsArray makVrv::DtIndirectModelInfo::mySwitchPaths |
switch paths
| DtIndirectLodManager::DequeIndirectLodInfoArray makVrv::DtIndirectModelInfo::myLodStacks |
lod paths
| DtIndirectDofManager::DequeNodeDofInfoPairs makVrv::DtIndirectModelInfo::myDofPaths |
| int makVrv::DtIndirectModelInfo::myNumLightSources |
the number of light sources
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Are the model data buffers completely uploaded to the gpu.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the same size as the spec vector above 1 sub-geometry for each spec