VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtGpuCulling Class Reference

This class is a component of the DtIndirectGeometry It inputs are: -> the instances registered with DtIndirectGeometry -> the viewing parameters (view matrix, projection matrix, etc) -> the indirect registrar (so that it can generate gpu data for -> the models of the instances from the interim data accessible -> via the registrar It outputs are: -> Tndirect command buffer -> The count of the indirect commands -> The input instances shuffled around/culled/lod'ed reflecting -> their order within the indirect command buffer generated -> It will also (optionally) do culling and lod. More...

Classes

struct  InstancesOffsetAndNumOfInstances
 structure for holding an offset of an instance type (model id), and number of those instances More...
 
struct  StateIdOffsetAndMaxCommands
 structure for holding an offset of a command of a given type (state id) and the number of commands of that type More...
 

Public Types

typedef std::vector
< StateIdOffsetAndMaxCommands
VectorStateIdOffsetAndMaxCommands
 
typedef std::map
< osg::observer_ptr< const
osg::Camera >, DtGlBuffer * > 
CameraToBufferMap
 
typedef std::set
< osg::observer_ptr< const
osg::Camera > > 
CameraSet
 

Public Member Functions

virtual ~DtGpuCulling ()
 destructor More...
 
virtual void setRegistrar (DtIndirectGeometryRegistrar *registrar)
 set the registrar More...
 
virtual void setCullShaderConfig (const DtCullShaderConfig &cullShaderConfig)
 set the compute shader config More...
 
virtual const DtCullShaderConfigcullShaderConfig (void) const
 get the compute shader config More...
 
virtual DtCullShaderConfigcullShaderConfig (void)
 get the compute shader config (non-const version) More...
 
virtual void updateGpuBuffers (osg::RenderInfo &renderInfo)
 updateGpuBuffers outInstanceTransformsUpdated indicates whether instance transforms that were marked dirty were sent to the GPU. More...
 
virtual void modelIdsToNumInstancesChanged (void)
 indicate to the culling that model ids to num instances changed so that internal maps get updated More...
 
virtual void updatePerInstancePerGeomBuffers (const MapIntToInt &modelIdsToNumInstances, const osg::Camera *camera)
 update the buffers that are needed to be correct every frame More...
 
virtual void doCulling (const DtIndirectViewParameters &viewParameters, const osg::FrameStamp *frameStamp, const DtGlBuffer *gpuLodVisibleBuffer, const DtGlBuffer *gpuDofTransformBuffer, const DtGlBuffer *gpuSwitchStateBuffer, const DtGlBuffer *gpuPerInstanceDataBuffer, const osg::Camera *camera)
 Do the culling (view frustum, lod, switch) More...
 
virtual void bindGpuOutputInstanceBuffer (const osg::Camera *camera) const
 bind the output instance buffer More...
 
virtual void unbindGpuOutputInstanceBuffer (const osg::Camera *camera) const
 unbind the output instance buffer More...
 
virtual bool bindCommandBufferAndSsbos (const DtGlBuffer *gpuDofTransformBuffer, const DtGlBuffer *gpuDofModelScaleBuffer, const DtGlBuffer *gpuUvOffsetBuffer, const DtGlBuffer *gpuPerInstanceDataBuffer, const osg::Camera *camera)
 bind the indirect command buffer and the count buffer returns false if handle is 0. More...
 
virtual void unbindCommandBufferAndSsbos (const osg::Camera *camera)
 unbind the indirect command buffer and the count buffer More...
 
virtual void bindGpuOutputInstanceBufferDebug (const osg::Camera *camera) const
 Bind the buffer containing the output instances of the cull shader with debugging. More...
 
virtual void unbindGpuOutputInstanceBufferDebug (const osg::Camera *camera) const
 Unbind the buffer containing the output instances of the cull shader with debugging. More...
 
virtual bool bindIndirectThingsDebug (const DtGlBuffer *gpuDofTransformBuffer, const osg::Camera *camera)
 bind the debug indirect command buffer, dof transform buffer and the specs buffer This allows us to draw all instances that are not switched out, lod'ed out (all non view frustum culled instances) More...
 
virtual void unbindIndirectThingsDebug (const osg::Camera *camera)
 unbind the debug indirect command buffer, dof transform buffer and the specs buffer More...
 
virtual bool useInstanceCount (void) const
 whether we are optimizing for shared models (useInstanceCount()=true) or unique models (useInstanceCount()=false), across instances More...
 
virtual int numDrawCommands (const osg::Camera *camera) const
 The number of draw commands generated. More...
 
virtual void releaseGLObjects (osg::State *state) const
 release the GL objects for the GpuCulling compute shader More...
 
virtual void reloadShaders () const
 destroy the cull program and shader if they exists so they can be recreated next frame. More...
 
virtual bool buffersInitializedForCamera (const osg::Camera *camera) const
 check to see if the buffers for this camera have been initialized. More...
 
virtual unsigned int maxNumInstances (void) const
 get the max number of instances that can possibly be rendered if none are culled out. More...
 
virtual const
VectorStateIdOffsetAndMaxCommands
stateIdOffsetAndMaxCommands (void) const
 get the map of the state id to their offset/number More...
 
virtual const std::vector
< InstancesOffsetAndNumOfInstances > & 
instancesOffsetAndNumInstances (void) const
 access the instances offset and num of instances map More...
 
virtual bool readyToUpdateAndGpuBuffersNeedUpdate () const
 helper function to decide if a job should be launched More...
 
virtual bool gpuBuffersNeedUpdate () const
 is anything in the buffers dirty? More...
 
virtual bool textureUpdateDirty () const
 are there textures that still need updating. More...
 
virtual void setTextureUpdateDirty (bool flag)
 inform that textures are dirty More...
 
virtual bool perGeomInstanceDataDirty () const
 is per geom instance data dirty? More...
 
virtual void setPerGeomInstanceDataDirty (bool flag)
 set the per geom instance data dirty More...
 
virtual bool instancesInvalidatedDirty () const
 were any instances invalidated? More...
 
virtual void invalidateInstance (int instanceId, int offset, int size)
 invalidate an instance More...
 
virtual const DtGlBuffergpuInputPerGeomInstancesBuffer (void) const
 Accessor for the gpu per geom instances buffer. More...
 
virtual const DtGlBuffergpuMaterialsBuffer () const
 Accessor for the gpu materials buffer. More...
 
virtual void fillOutputInstances (std::vector< DtVector4< int > > &outputInstances, const osg::Camera *camera) const
 For debugging. Get the values of the output instances computed by the compute shader. More...
 
virtual const
DtIndirectEffectTexturesTemplate
currentEffectTexturesState () const
 get the current effect texture state as it was after the last time the textures were sent down More...
 
virtual void setName (const std::string &name)
 set a name on this (useful for debugging) More...
 
virtual const std::string & name (void) const
 get the name on this (useful for debugging) More...
 

Protected Member Functions

 DtGpuCulling (DtDe &de, DtInstanceContainer &container)
 constructor More...
 
virtual void updateGpuTexturesBuffer (osg::RenderInfo &renderInfo)
 The buffer containing the bindless textures' addresses of the model textures. More...
 
virtual void updateInstancesOffsetAndInstances (const MapIntToInt &modelIdsToNumInstances)
 update the myInstancesOffsetAndNumInstances vector so it is ready to be used More...
 
virtual void updateInstancesOffsetAndInstancesBuffer (void)
 update the myGpuInstancesOffsetAndNumInstancesBuffer More...
 
virtual void updateStateIdToMaxNumCommands (const MapIntToInt &modelIdsToNumInstances)
 update the myStateIdToMaxNumCommands with the correct max state instances for each state More...
 
virtual void updateStateIdToMaxNumCommandsBuffer (void)
 update the myGpuStateIdToMaxNumCommandsBuffer with the correct max state instances for each state More...
 
virtual bool checkSpecBuffersOk (void) const
 check a few of the buffers to make sure they are not null More...
 
virtual void releaseCameraToBufferMap (DtGLDeleteObjectManager &deleteManager, const CameraToBufferMap &cameraToBufferMap) const
 release the resources for all the buffers in a camera to buffer map More...
 
virtual void deleteBuffers (void)
 delete buffers More...
 
virtual void deleteCameraToBufferMap (CameraToBufferMap &cameraToBufferMap)
 delete all the buffers in a camera to buffer map More...
 
virtual void flushCameraSpecificBuffers ()
 flush any buffers from the maps of cameras to buffers that no longer have a valid camera. More...
 
virtual void flushSingleCameraSpecificBufferMap (CameraToBufferMap &cameraToBufferMap)
 flush a single camera to buffer map More...
 
virtual void flushSingleCameraSet (CameraSet &cameraSet)
 flush a single camera set. More...
 
virtual void updateGpuInputPerGeomInstancesBufferByInvalidating ()
 update the various buffers that are fed to the cull shader -> if new models came in -> if textures became available (they can be asynchronously available, e.g. More...
 
virtual void updateGpuGeometrySpecificationsBuffer ()
 
virtual void updateGpuMaterialsBuffer ()
 
virtual void updateGpuInputPerGeomInstancesBuffer ()
 
virtual void updateGpuLightPointBuffers ()
 
virtual void updateGpuIndirectBuffersInstanceCount (const MapIntToInt &modelIdsToNumInstances, const osg::Camera *camera)
 
virtual void updateGpuIndirectBuffersNonInstanceCount (const MapIntToInt &modelIdsToNumInstances, const osg::Camera *camera)
 
virtual void clearGpuIndirectBuffer (const osg::Camera *camera)
 
virtual void clearStateIdCommandCountBuffer ()
 

Protected Attributes

DtIndirectGeometryRegistrarmyRegistrar
 
const DtInstanceContainermyInstanceContainer
 
DtGlBuffermyGpuInputPerGeomInstancesBuffer
 contains switch states/ lod info More...
 
bool myPerGeomInstanceDataDirty
 
DtIndirectInstancesInvalidated myInstancesInvalidated
 
DtGlBuffermyGpuGeometrySpecificationsBuffer
 The spec buffer containing GeometrySpecifications for all the models/lods of the passed in instances. More...
 
std::vector
< DtGeometrySpecification
myGeometrySpecifications
 c++ buffer that holds the same info More...
 
DtGlBuffermyGpuMaterialsBuffer
 The spec buffer containing Materials for all the models/lods of the passed in instances. More...
 
DtIndirectMaterialVector myMaterials
 c++ buffer that holds the same info More...
 
DtGlBuffermyGpuTexturesBuffer
 
CameraToBufferMap myMutableGpuIndirectBuffers
 these are mutable so the [] operator on the maps can be used in const functions The indirect command buffer that will be generated More...
 
CameraToBufferMap myMutableGpuOutputInstancesBuffers
 The re-distributed/culled/switched/lod'ed instances (a subset of the input instances) More...
 
CameraToBufferMap myMutableGpuOutputInstanceOffsetInPerInstanceDataBuffers
 The re-distributed/culled/switched/lod'ed instances' offset into the per instance data buffer, so that per intsance data can be accessed. More...
 
CameraToBufferMap myMutableGpuOutputInstancesBuffersDebug
 The re-distributed switched/lod'ed instances but not culled out via cull shader for debugging. More...
 
CameraToBufferMap myGpuIndirectBuffersDebug
 The indirect command buffer for debugging culling. More...
 
CameraToBufferMap myGpuLightSourceIndexOutputBuffers
 
DtIndirectCullProgrammyCullProgram
 
DtCullShaderConfig myCullShaderConfig
 
std::vector
< InstancesOffsetAndNumOfInstances
myInstancesOffsetAndNumInstances
 
DtGlBuffermyGpuInstancesOffsetAndNumInstancesBuffer
 
unsigned int myMaxNumInstancesPreCulling
 
unsigned int myMaxNumInstances
 
unsigned int myMaxNumLightSources
 
VectorStateIdOffsetAndMaxCommands myStateIdToMaxNumCommands
 
DtGlBuffermyGpuStateIdToMaxNumCommandsBuffer
 
DtGlBuffermyGpuStateIdToCommandCountBuffer
 
VectorInts myGeomSpecIndexToCommandIndex
 
DtGlBuffermyGpuSpecIndexToCommandIndexBuffer
 
DtOsgLightPointManagermyLightPointManager
 
DtDemyDe
 
DtFirstTextureStreamedModelAndIndexTracker myFirstTextureStreamedModelAndIndexTracker
 Keep track of the first model and what index to start using bindless textures. More...
 
unsigned int myLastNumEffectTextures
 
unsigned int myLastNumUniqueGeometries
 
bool myTextureUpdateDirty
 
DtModelIdAndStreamedBytesTracker myMaterialBufferTracker
 
DtModelIdAndStreamedBytesTracker mySpecBufferTracker
 
int myStreamedGeometryOffsetIdx
 
int myNumGeometries
 
CameraSet myModelIdsToNumInstancesChanged
 
DtCoreGlBufferCreatormyDtCoreGlBufferCreator
 
DtIndirectEffectTexturesTemplate myCurrentEffectTextureState
 
std::string myName
 

Private Member Functions

 DtGpuCulling ()=delete
 default constructor More...
 
 DtGpuCulling (const DtGpuCulling &other)=delete
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtGpuCullingoperator= (const DtGpuCulling &other)=delete
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Friends

class DtGpuCullingCreator
 

Detailed Description

This class is a component of the DtIndirectGeometry It inputs are: -> the instances registered with DtIndirectGeometry -> the viewing parameters (view matrix, projection matrix, etc) -> the indirect registrar (so that it can generate gpu data for -> the models of the instances from the interim data accessible -> via the registrar It outputs are: -> Tndirect command buffer -> The count of the indirect commands -> The input instances shuffled around/culled/lod'ed reflecting -> their order within the indirect command buffer generated -> It will also (optionally) do culling and lod.

Member Typedef Documentation

typedef std::map<osg::observer_ptr<const osg::Camera>, DtGlBuffer*> makVrv::DtGpuCulling::CameraToBufferMap
typedef std::set<osg::observer_ptr<const osg::Camera> > makVrv::DtGpuCulling::CameraSet

Constructor & Destructor Documentation

makVrv::DtGpuCulling::DtGpuCulling ( DtDe de,
DtInstanceContainer container 
)
protected

constructor

virtual makVrv::DtGpuCulling::~DtGpuCulling ( )
virtual

destructor

makVrv::DtGpuCulling::DtGpuCulling ( )
privatedelete

default constructor

makVrv::DtGpuCulling::DtGpuCulling ( const DtGpuCulling other)
privatedelete

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtGpuCulling& makVrv::DtGpuCulling::operator= ( const DtGpuCulling other)
privatedelete

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtGpuCulling::setRegistrar ( DtIndirectGeometryRegistrar registrar)
virtual

set the registrar

virtual void makVrv::DtGpuCulling::setCullShaderConfig ( const DtCullShaderConfig cullShaderConfig)
virtual

set the compute shader config

virtual const DtCullShaderConfig& makVrv::DtGpuCulling::cullShaderConfig ( void  ) const
virtual

get the compute shader config

virtual DtCullShaderConfig& makVrv::DtGpuCulling::cullShaderConfig ( void  )
virtual

get the compute shader config (non-const version)

virtual void makVrv::DtGpuCulling::updateGpuBuffers ( osg::RenderInfo &  renderInfo)
virtual

updateGpuBuffers outInstanceTransformsUpdated indicates whether instance transforms that were marked dirty were sent to the GPU.

This may not always happen with a call to updateGpuBuffers.

virtual void makVrv::DtGpuCulling::modelIdsToNumInstancesChanged ( void  )
virtual

indicate to the culling that model ids to num instances changed so that internal maps get updated

virtual void makVrv::DtGpuCulling::updatePerInstancePerGeomBuffers ( const MapIntToInt modelIdsToNumInstances,
const osg::Camera *  camera 
)
virtual

update the buffers that are needed to be correct every frame

virtual void makVrv::DtGpuCulling::doCulling ( const DtIndirectViewParameters viewParameters,
const osg::FrameStamp *  frameStamp,
const DtGlBuffer gpuLodVisibleBuffer,
const DtGlBuffer gpuDofTransformBuffer,
const DtGlBuffer gpuSwitchStateBuffer,
const DtGlBuffer gpuPerInstanceDataBuffer,
const osg::Camera *  camera 
)
virtual

Do the culling (view frustum, lod, switch)

virtual void makVrv::DtGpuCulling::bindGpuOutputInstanceBuffer ( const osg::Camera *  camera) const
virtual

bind the output instance buffer

virtual void makVrv::DtGpuCulling::unbindGpuOutputInstanceBuffer ( const osg::Camera *  camera) const
virtual

unbind the output instance buffer

virtual bool makVrv::DtGpuCulling::bindCommandBufferAndSsbos ( const DtGlBuffer gpuDofTransformBuffer,
const DtGlBuffer gpuDofModelScaleBuffer,
const DtGlBuffer gpuUvOffsetBuffer,
const DtGlBuffer gpuPerInstanceDataBuffer,
const osg::Camera *  camera 
)
virtual

bind the indirect command buffer and the count buffer returns false if handle is 0.

Can happen if the buffer hasn't been re-created yet (e.g. when the context is deleted and recreated), depending on the job/frame syc this can happen a few frames later

virtual void makVrv::DtGpuCulling::unbindCommandBufferAndSsbos ( const osg::Camera *  camera)
virtual

unbind the indirect command buffer and the count buffer

virtual void makVrv::DtGpuCulling::bindGpuOutputInstanceBufferDebug ( const osg::Camera *  camera) const
virtual

Bind the buffer containing the output instances of the cull shader with debugging.

This is the buffer representing the non-switched otu & non-loded out instances (all non view frustum culled instances).

virtual void makVrv::DtGpuCulling::unbindGpuOutputInstanceBufferDebug ( const osg::Camera *  camera) const
virtual

Unbind the buffer containing the output instances of the cull shader with debugging.

virtual bool makVrv::DtGpuCulling::bindIndirectThingsDebug ( const DtGlBuffer gpuDofTransformBuffer,
const osg::Camera *  camera 
)
virtual

bind the debug indirect command buffer, dof transform buffer and the specs buffer This allows us to draw all instances that are not switched out, lod'ed out (all non view frustum culled instances)

virtual void makVrv::DtGpuCulling::unbindIndirectThingsDebug ( const osg::Camera *  camera)
virtual

unbind the debug indirect command buffer, dof transform buffer and the specs buffer

virtual bool makVrv::DtGpuCulling::useInstanceCount ( void  ) const
virtual

whether we are optimizing for shared models (useInstanceCount()=true) or unique models (useInstanceCount()=false), across instances

virtual int makVrv::DtGpuCulling::numDrawCommands ( const osg::Camera *  camera) const
virtual

The number of draw commands generated.

Is a value between [0, DtIndirectGeoUtils::getMaxDrawCountNoCullingNoLod()], inclusive

virtual void makVrv::DtGpuCulling::releaseGLObjects ( osg::State *  state) const
virtual

release the GL objects for the GpuCulling compute shader

virtual void makVrv::DtGpuCulling::reloadShaders ( ) const
virtual

destroy the cull program and shader if they exists so they can be recreated next frame.

virtual bool makVrv::DtGpuCulling::buffersInitializedForCamera ( const osg::Camera *  camera) const
virtual

check to see if the buffers for this camera have been initialized.

virtual unsigned int makVrv::DtGpuCulling::maxNumInstances ( void  ) const
virtual

get the max number of instances that can possibly be rendered if none are culled out.

virtual const VectorStateIdOffsetAndMaxCommands& makVrv::DtGpuCulling::stateIdOffsetAndMaxCommands ( void  ) const
virtual

get the map of the state id to their offset/number

virtual const std::vector<InstancesOffsetAndNumOfInstances>& makVrv::DtGpuCulling::instancesOffsetAndNumInstances ( void  ) const
virtual

access the instances offset and num of instances map

virtual bool makVrv::DtGpuCulling::readyToUpdateAndGpuBuffersNeedUpdate ( ) const
virtual

helper function to decide if a job should be launched

virtual bool makVrv::DtGpuCulling::gpuBuffersNeedUpdate ( ) const
virtual

is anything in the buffers dirty?

virtual bool makVrv::DtGpuCulling::textureUpdateDirty ( ) const
virtual

are there textures that still need updating.

virtual void makVrv::DtGpuCulling::setTextureUpdateDirty ( bool  flag)
virtual

inform that textures are dirty

virtual bool makVrv::DtGpuCulling::perGeomInstanceDataDirty ( ) const
virtual

is per geom instance data dirty?

virtual void makVrv::DtGpuCulling::setPerGeomInstanceDataDirty ( bool  flag)
virtual

set the per geom instance data dirty

virtual bool makVrv::DtGpuCulling::instancesInvalidatedDirty ( ) const
virtual

were any instances invalidated?

virtual void makVrv::DtGpuCulling::invalidateInstance ( int  instanceId,
int  offset,
int  size 
)
virtual

invalidate an instance

virtual const DtGlBuffer* makVrv::DtGpuCulling::gpuInputPerGeomInstancesBuffer ( void  ) const
virtual

Accessor for the gpu per geom instances buffer.

virtual const DtGlBuffer* makVrv::DtGpuCulling::gpuMaterialsBuffer ( ) const
virtual

Accessor for the gpu materials buffer.

virtual void makVrv::DtGpuCulling::fillOutputInstances ( std::vector< DtVector4< int > > &  outputInstances,
const osg::Camera *  camera 
) const
virtual

For debugging. Get the values of the output instances computed by the compute shader.

virtual const DtIndirectEffectTexturesTemplate& makVrv::DtGpuCulling::currentEffectTexturesState ( ) const
virtual

get the current effect texture state as it was after the last time the textures were sent down

virtual void makVrv::DtGpuCulling::setName ( const std::string &  name)
virtual

set a name on this (useful for debugging)

virtual const std::string& makVrv::DtGpuCulling::name ( void  ) const
virtual

get the name on this (useful for debugging)

virtual void makVrv::DtGpuCulling::updateGpuInputPerGeomInstancesBufferByInvalidating ( )
protectedvirtual

update the various buffers that are fed to the cull shader -> if new models came in -> if textures became available (they can be asynchronously available, e.g.

via osg ico) -> if the number of instances changed

virtual void makVrv::DtGpuCulling::updateGpuGeometrySpecificationsBuffer ( )
protectedvirtual
virtual void makVrv::DtGpuCulling::updateGpuMaterialsBuffer ( )
protectedvirtual
virtual void makVrv::DtGpuCulling::updateGpuInputPerGeomInstancesBuffer ( )
protectedvirtual
virtual void makVrv::DtGpuCulling::updateGpuLightPointBuffers ( )
protectedvirtual
virtual void makVrv::DtGpuCulling::updateGpuIndirectBuffersInstanceCount ( const MapIntToInt modelIdsToNumInstances,
const osg::Camera *  camera 
)
protectedvirtual
virtual void makVrv::DtGpuCulling::updateGpuIndirectBuffersNonInstanceCount ( const MapIntToInt modelIdsToNumInstances,
const osg::Camera *  camera 
)
protectedvirtual
virtual void makVrv::DtGpuCulling::clearGpuIndirectBuffer ( const osg::Camera *  camera)
protectedvirtual
virtual void makVrv::DtGpuCulling::clearStateIdCommandCountBuffer ( )
protectedvirtual
virtual void makVrv::DtGpuCulling::updateGpuTexturesBuffer ( osg::RenderInfo &  renderInfo)
protectedvirtual

The buffer containing the bindless textures' addresses of the model textures.

virtual void makVrv::DtGpuCulling::updateInstancesOffsetAndInstances ( const MapIntToInt modelIdsToNumInstances)
protectedvirtual

update the myInstancesOffsetAndNumInstances vector so it is ready to be used

virtual void makVrv::DtGpuCulling::updateInstancesOffsetAndInstancesBuffer ( void  )
protectedvirtual

update the myGpuInstancesOffsetAndNumInstancesBuffer

virtual void makVrv::DtGpuCulling::updateStateIdToMaxNumCommands ( const MapIntToInt modelIdsToNumInstances)
protectedvirtual

update the myStateIdToMaxNumCommands with the correct max state instances for each state

virtual void makVrv::DtGpuCulling::updateStateIdToMaxNumCommandsBuffer ( void  )
protectedvirtual

update the myGpuStateIdToMaxNumCommandsBuffer with the correct max state instances for each state

virtual bool makVrv::DtGpuCulling::checkSpecBuffersOk ( void  ) const
protectedvirtual

check a few of the buffers to make sure they are not null

virtual void makVrv::DtGpuCulling::releaseCameraToBufferMap ( DtGLDeleteObjectManager deleteManager,
const CameraToBufferMap cameraToBufferMap 
) const
protectedvirtual

release the resources for all the buffers in a camera to buffer map

virtual void makVrv::DtGpuCulling::deleteBuffers ( void  )
protectedvirtual

delete buffers

virtual void makVrv::DtGpuCulling::deleteCameraToBufferMap ( CameraToBufferMap cameraToBufferMap)
protectedvirtual

delete all the buffers in a camera to buffer map

virtual void makVrv::DtGpuCulling::flushCameraSpecificBuffers ( )
protectedvirtual

flush any buffers from the maps of cameras to buffers that no longer have a valid camera.

virtual void makVrv::DtGpuCulling::flushSingleCameraSpecificBufferMap ( CameraToBufferMap cameraToBufferMap)
protectedvirtual

flush a single camera to buffer map

virtual void makVrv::DtGpuCulling::flushSingleCameraSet ( CameraSet cameraSet)
protectedvirtual

flush a single camera set.

Friends And Related Function Documentation

friend class DtGpuCullingCreator
friend

Member Data Documentation

DtIndirectGeometryRegistrar* makVrv::DtGpuCulling::myRegistrar
protected
const DtInstanceContainer& makVrv::DtGpuCulling::myInstanceContainer
protected
DtGlBuffer* makVrv::DtGpuCulling::myGpuInputPerGeomInstancesBuffer
protected

contains switch states/ lod info

bool makVrv::DtGpuCulling::myPerGeomInstanceDataDirty
protected
DtIndirectInstancesInvalidated makVrv::DtGpuCulling::myInstancesInvalidated
protected
DtGlBuffer* makVrv::DtGpuCulling::myGpuGeometrySpecificationsBuffer
protected

The spec buffer containing GeometrySpecifications for all the models/lods of the passed in instances.

std::vector<DtGeometrySpecification> makVrv::DtGpuCulling::myGeometrySpecifications
protected

c++ buffer that holds the same info

DtGlBuffer* makVrv::DtGpuCulling::myGpuMaterialsBuffer
protected

The spec buffer containing Materials for all the models/lods of the passed in instances.

DtIndirectMaterialVector makVrv::DtGpuCulling::myMaterials
protected

c++ buffer that holds the same info

DtGlBuffer* makVrv::DtGpuCulling::myGpuTexturesBuffer
protected
CameraToBufferMap makVrv::DtGpuCulling::myMutableGpuIndirectBuffers
mutableprotected

these are mutable so the [] operator on the maps can be used in const functions The indirect command buffer that will be generated

CameraToBufferMap makVrv::DtGpuCulling::myMutableGpuOutputInstancesBuffers
mutableprotected

The re-distributed/culled/switched/lod'ed instances (a subset of the input instances)

CameraToBufferMap makVrv::DtGpuCulling::myMutableGpuOutputInstanceOffsetInPerInstanceDataBuffers
mutableprotected

The re-distributed/culled/switched/lod'ed instances' offset into the per instance data buffer, so that per intsance data can be accessed.

CameraToBufferMap makVrv::DtGpuCulling::myMutableGpuOutputInstancesBuffersDebug
mutableprotected

The re-distributed switched/lod'ed instances but not culled out via cull shader for debugging.

CameraToBufferMap makVrv::DtGpuCulling::myGpuIndirectBuffersDebug
protected

The indirect command buffer for debugging culling.

CameraToBufferMap makVrv::DtGpuCulling::myGpuLightSourceIndexOutputBuffers
protected
DtIndirectCullProgram* makVrv::DtGpuCulling::myCullProgram
protected
DtCullShaderConfig makVrv::DtGpuCulling::myCullShaderConfig
protected
std::vector<InstancesOffsetAndNumOfInstances> makVrv::DtGpuCulling::myInstancesOffsetAndNumInstances
protected
DtGlBuffer* makVrv::DtGpuCulling::myGpuInstancesOffsetAndNumInstancesBuffer
protected
unsigned int makVrv::DtGpuCulling::myMaxNumInstancesPreCulling
protected
unsigned int makVrv::DtGpuCulling::myMaxNumInstances
protected
unsigned int makVrv::DtGpuCulling::myMaxNumLightSources
protected
VectorStateIdOffsetAndMaxCommands makVrv::DtGpuCulling::myStateIdToMaxNumCommands
protected
DtGlBuffer* makVrv::DtGpuCulling::myGpuStateIdToMaxNumCommandsBuffer
protected
DtGlBuffer* makVrv::DtGpuCulling::myGpuStateIdToCommandCountBuffer
protected
VectorInts makVrv::DtGpuCulling::myGeomSpecIndexToCommandIndex
protected
DtGlBuffer* makVrv::DtGpuCulling::myGpuSpecIndexToCommandIndexBuffer
protected
DtOsgLightPointManager& makVrv::DtGpuCulling::myLightPointManager
protected
DtDe& makVrv::DtGpuCulling::myDe
protected
DtFirstTextureStreamedModelAndIndexTracker makVrv::DtGpuCulling::myFirstTextureStreamedModelAndIndexTracker
mutableprotected

Keep track of the first model and what index to start using bindless textures.

unsigned int makVrv::DtGpuCulling::myLastNumEffectTextures
protected
unsigned int makVrv::DtGpuCulling::myLastNumUniqueGeometries
protected
bool makVrv::DtGpuCulling::myTextureUpdateDirty
protected
DtModelIdAndStreamedBytesTracker makVrv::DtGpuCulling::myMaterialBufferTracker
protected
DtModelIdAndStreamedBytesTracker makVrv::DtGpuCulling::mySpecBufferTracker
protected
int makVrv::DtGpuCulling::myStreamedGeometryOffsetIdx
protected
int makVrv::DtGpuCulling::myNumGeometries
protected
CameraSet makVrv::DtGpuCulling::myModelIdsToNumInstancesChanged
protected
DtCoreGlBufferCreator& makVrv::DtGpuCulling::myDtCoreGlBufferCreator
protected
DtIndirectEffectTexturesTemplate makVrv::DtGpuCulling::myCurrentEffectTextureState
protected
std::string makVrv::DtGpuCulling::myName
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)