VR-Forces 4.8 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
makVrv::DtIndirectLodManager Class Reference

handles the lods for all the indirect geometry. More...

Classes

struct  IndirectLodInfo
 structure for holding the information about a particular instance of a particular lod. More...
 

Public Types

typedef std::deque
< IndirectLodInfo
DequeIndirectLodInfos
 
typedef std::vector
< IndirectLodInfo
VectorIndirectLodInfos
 
typedef std::vector
< DequeIndirectLodInfos
DequeIndirectLodInfoArray
 

Public Member Functions

 DtIndirectLodManager (DtDe &de)
 CTOR. More...
 
virtual ~DtIndirectLodManager ()
 DTOR. More...
 
virtual void releaseGLObjects (osg::State *state) const
 called when the context is deleted in order to clean up GPU data More...
 
virtual void addLodStacks (int perGeomInstanceIndex, int size, const DequeIndirectLodInfos &parentLodStack, const DequeIndirectLodInfoArray &lodStacks, const osg::Matrix &localOriginMatrix, const osg::Matrix &instanceTransform)
 add a vector of lod stacks to the lod management system More...
 
virtual void processLods (const DtOsgShaderFilesCache *shaderFilesCache, const std::string &shaderFolderPath, const DtIndirectViewParameters &viewParameters)
 setup and run the lod compute shader which checks all lods agains the camera position to see if their children should be visible More...
 
virtual DtGlBuffergpuLodVisibleBuffer ()
 get the buffer which has the output of the lod compute shader More...
 
virtual void reloadShaders () const
 reload the compute shader shaders More...
 

Protected Member Functions

virtual void addLodStack (int perGeomInstanceIndex, const DequeIndirectLodInfos &parentLodStack, const DequeIndirectLodInfos &lodStack, const osg::Matrix &localOriginMatrix, const osg::Matrix &instanceTransform)
 add a single stack to the lod info input buffer The parent stack lod centers are multiplied by the inverse local offset so they correctly gives the view position when multiplied by the model view matrix. More...
 
virtual void updateLodBuffersIfNecessary ()
 send down any new lod infomation that has been recieved More...
 
virtual void deleteShaders () const
 cleanup the gpu shaders More...
 
virtual void deleteBuffers (void)
 
virtual void tearDownBuffers (void) const
 

Protected Attributes

VectorIndirectLodInfos myIndirectLodInfos
 
DtDemyDe
 
DtGlBuffermyGpuLodInfoBuffer
 The buffer containing all the lod infos for all instances managed by this manager. More...
 
DtGlBuffermyGpuLodVisibleBuffer
 The buffer containing a bool for each instance to know if it should be drawn or not. More...
 
bool myMutableLodInfoDirty
 
DtIndirectLodProgrammyMutableLodProgram
 
unsigned int myMaxPerGeomInstanceId
 

Private Member Functions

 DtIndirectLodManager ()
 default constructor not implemented More...
 
 DtIndirectLodManager (const DtIndirectLodManager &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtIndirectLodManageroperator= (const DtIndirectLodManager &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Detailed Description

handles the lods for all the indirect geometry.

sets up and runs a compute shader prepass for processing the lods contains a GPU buffer with the result which is used by the cull compute shader

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtIndirectLodManager::DtIndirectLodManager ( DtDe de)

CTOR.

virtual makVrv::DtIndirectLodManager::~DtIndirectLodManager ( )
virtual

DTOR.

makVrv::DtIndirectLodManager::DtIndirectLodManager ( )
private

default constructor not implemented

makVrv::DtIndirectLodManager::DtIndirectLodManager ( const DtIndirectLodManager other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtIndirectLodManager& makVrv::DtIndirectLodManager::operator= ( const DtIndirectLodManager other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

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

called when the context is deleted in order to clean up GPU data

virtual void makVrv::DtIndirectLodManager::addLodStacks ( int  perGeomInstanceIndex,
int  size,
const DequeIndirectLodInfos parentLodStack,
const DequeIndirectLodInfoArray lodStacks,
const osg::Matrix &  localOriginMatrix,
const osg::Matrix &  instanceTransform 
)
virtual

add a vector of lod stacks to the lod management system

virtual void makVrv::DtIndirectLodManager::processLods ( const DtOsgShaderFilesCache shaderFilesCache,
const std::string &  shaderFolderPath,
const DtIndirectViewParameters viewParameters 
)
virtual

setup and run the lod compute shader which checks all lods agains the camera position to see if their children should be visible

virtual DtGlBuffer* makVrv::DtIndirectLodManager::gpuLodVisibleBuffer ( )
virtual

get the buffer which has the output of the lod compute shader

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

reload the compute shader shaders

virtual void makVrv::DtIndirectLodManager::addLodStack ( int  perGeomInstanceIndex,
const DequeIndirectLodInfos parentLodStack,
const DequeIndirectLodInfos lodStack,
const osg::Matrix &  localOriginMatrix,
const osg::Matrix &  instanceTransform 
)
protectedvirtual

add a single stack to the lod info input buffer The parent stack lod centers are multiplied by the inverse local offset so they correctly gives the view position when multiplied by the model view matrix.

The child statck lod centers are multiplied by the instance xform

virtual void makVrv::DtIndirectLodManager::updateLodBuffersIfNecessary ( )
protectedvirtual

send down any new lod infomation that has been recieved

virtual void makVrv::DtIndirectLodManager::deleteShaders ( ) const
protectedvirtual

cleanup the gpu shaders

virtual void makVrv::DtIndirectLodManager::deleteBuffers ( void  )
protectedvirtual
virtual void makVrv::DtIndirectLodManager::tearDownBuffers ( void  ) const
protectedvirtual

Member Data Documentation

VectorIndirectLodInfos makVrv::DtIndirectLodManager::myIndirectLodInfos
protected
DtDe& makVrv::DtIndirectLodManager::myDe
protected
DtGlBuffer* makVrv::DtIndirectLodManager::myGpuLodInfoBuffer
protected

The buffer containing all the lod infos for all instances managed by this manager.

DtGlBuffer* makVrv::DtIndirectLodManager::myGpuLodVisibleBuffer
protected

The buffer containing a bool for each instance to know if it should be drawn or not.

bool makVrv::DtIndirectLodManager::myMutableLodInfoDirty
mutableprotected
DtIndirectLodProgram* makVrv::DtIndirectLodManager::myMutableLodProgram
mutableprotected
unsigned int makVrv::DtIndirectLodManager::myMaxPerGeomInstanceId
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)