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

Class that renders all the diguy instance objects in one osg drawable, major performance improvement. More...

Inheritance diagram for makVrv::DtDiGuyInstanceDrawable:
Inheritance graph
[legend]

Public Member Functions

 DtDiGuyInstanceDrawable ()
 ctor More...
 
virtual ~DtDiGuyInstanceDrawable ()
 dtor More...
 
virtual void releaseGLObjects (osg::State *state) const
 releases texture data More...
 
virtual void reset ()
 called every frame at the beginning to clear out drawables list More...
 
virtual void addDrawable (DtDiGuyOsgGraphicsInstanceGroup *drawable)
 adds an instanced drawable More...
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 draws all the drawables. More...
 
virtual void copy_tbo_data (const int &num_floats, const float *data)
 function called by main thread job to get data down to the shared GPU More...
 

Protected Member Functions

virtual void setupTextureBufferObject ()
 

Protected Attributes

tbb::concurrent_vector
< DtDiGuyOsgGraphicsInstanceGroup * > 
myDrawables
 
tbb::concurrent_vector
< DtDiGuyOsgGraphicsInstanceGroup * > 
myTransparentDrawables
 
osg::Vec3d myMutableCameraPosition
 
osg::ref_ptr< osg::StateAttribute > myShaderProgram
 
DtGlTextureBufferObjectm_diguy_texture_buffer
 
osg::ref_ptr
< TextureBufferObjectApplyAttribute
m_diguy_texture_buffer_attribute
 
bool m_ready_for_clear
 diguy updates add stuff to drawable list, but sometimes that happens 2x, not sure why. More...
 

Private Member Functions

 DtDiGuyInstanceDrawable (const DtDiGuyInstanceDrawable &ob, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Copy CTOR. More...
 
virtual osg::Object * clone (const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY) const
 Clone this object. More...
 

Detailed Description

Class that renders all the diguy instance objects in one osg drawable, major performance improvement.

Constructor & Destructor Documentation

makVrv::DtDiGuyInstanceDrawable::DtDiGuyInstanceDrawable ( )

ctor

virtual makVrv::DtDiGuyInstanceDrawable::~DtDiGuyInstanceDrawable ( )
virtual

dtor

makVrv::DtDiGuyInstanceDrawable::DtDiGuyInstanceDrawable ( const DtDiGuyInstanceDrawable ob,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)
private

Copy CTOR.

Member Function Documentation

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

releases texture data

virtual void makVrv::DtDiGuyInstanceDrawable::reset ( )
virtual

called every frame at the beginning to clear out drawables list

virtual void makVrv::DtDiGuyInstanceDrawable::addDrawable ( DtDiGuyOsgGraphicsInstanceGroup drawable)
virtual

adds an instanced drawable

virtual void makVrv::DtDiGuyInstanceDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

draws all the drawables.

virtual void makVrv::DtDiGuyInstanceDrawable::copy_tbo_data ( const int num_floats,
const float *  data 
)
virtual

function called by main thread job to get data down to the shared GPU

virtual void makVrv::DtDiGuyInstanceDrawable::setupTextureBufferObject ( )
protectedvirtual
virtual osg::Object* makVrv::DtDiGuyInstanceDrawable::clone ( const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY) const
privatevirtual

Clone this object.

Member Data Documentation

tbb::concurrent_vector< DtDiGuyOsgGraphicsInstanceGroup*> makVrv::DtDiGuyInstanceDrawable::myDrawables
mutableprotected
tbb::concurrent_vector< DtDiGuyOsgGraphicsInstanceGroup*> makVrv::DtDiGuyInstanceDrawable::myTransparentDrawables
mutableprotected
osg::Vec3d makVrv::DtDiGuyInstanceDrawable::myMutableCameraPosition
mutableprotected
osg::ref_ptr<osg::StateAttribute> makVrv::DtDiGuyInstanceDrawable::myShaderProgram
protected
DtGlTextureBufferObject* makVrv::DtDiGuyInstanceDrawable::m_diguy_texture_buffer
mutableprotected
osg::ref_ptr<TextureBufferObjectApplyAttribute> makVrv::DtDiGuyInstanceDrawable::m_diguy_texture_buffer_attribute
protected
bool makVrv::DtDiGuyInstanceDrawable::m_ready_for_clear
mutableprotected

diguy updates add stuff to drawable list, but sometimes that happens 2x, not sure why.

so theres gaurd code to stop them from being added 2x, also sometimes there are diguy updates without drawing. like plan view and xr view. so need a way to control the reset of drawable list


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)