VR-Forces 5.0.3 Developer's Guide
 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
makVrv::DtHbaoDrawable Class Reference

class used to render HBAO during the post processor camera draw. Uses the NVIDIA GFSDK HBAO library to generate a texture which we then apply to the scene using a post processor rendering pass.

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

Public Member Functions

virtual ~DtHbaoDrawable ()
 
 DtHbaoDrawable ()=delete
 
 DtHbaoDrawable (const DtHbaoDrawable &)=delete
 
DtHbaoDrawableoperator= (const DtHbaoDrawable &)=delete
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const override
 
virtual void reloadShaders ()
 
virtual void setDepthTexture (osg::Texture *texture)
 
virtual void setBaseTexture (osg::Texture *texture)
 
virtual void setOcclusionTexture (osg::Texture *inputTex)
 
virtual void setViewSize (int width, int height)
 
- Public Member Functions inherited from makVrv::DtPostProcessorDrawable
 DtPostProcessorDrawable (DtDe &de)
 
 DtPostProcessorDrawable (const DtPostProcessorDrawable &orig, const osg::CopyOp &op)
 
virtual ~DtPostProcessorDrawable ()
 
virtual void drawTexturedQuad (bool drawOnly=false) const
 
virtual void beginTexturedQuad () const
 
virtual void endTexturedQuad () const
 
virtual std::string preprocessorDefinesString (void) const
 
virtual DtGlProgramcreateProgram (const std::string &path, const std::string &prefixName, const std::string &preprocessor="") const
 

Protected Member Functions

 DtHbaoDrawable (DtDe &de)
 
virtual void createProgramIfNecessary (void) const
 
virtual void cleanupGpuMemory (void)
 
virtual void releaseHbaoRenderTexture ()
 
void updateHbaoSettings () const
 
void createTextureViewsIfNecessary (osg::State *state) const
 
- Protected Member Functions inherited from makVrv::DtPostProcessorDrawable
void setupGeometry () const
 

Protected Attributes

friend DtHbaoDrawableCreator
 
osg::ref_ptr< osg::Texture > myBaseTexture
 
osg::ref_ptr< osg::Texture > myDepthTexture
 
osg::ref_ptr< osg::Texture > myOcclusionTex
 
GLuint myDepthTextureId
 
std::vector< GLuintmyDepthTexViews
 
bool myShadingRateIsSupported
 
DtGlProgrammyMutableHbaoProgram
 
int myMutableVrvSsaoTexLoc
 
int myMutableVrvOcclusionTexLoc
 
bool myMutableTapsDirty
 
osg::observer_ptr< const
osg::GraphicsContext > 
myInitGraphicsContext
 
DtGlRenderTexturemyMutableHbaoTexture
 
GFSDK_SSAO_Context_GL * myMutableSsaoContextGl
 
GFSDK_SSAO_GLFunctions myMutableGlFunctions
 
HbaoParameters myMutableParameters
 
DtSignalConnectionManager myMutableConnections
 
bool myMutableShadersDirtyFlag
 
- Protected Attributes inherited from makVrv::DtPostProcessorDrawable
DtDemyDe
 
unsigned int myMutableVbo
 

Constructor & Destructor Documentation

virtual makVrv::DtHbaoDrawable::~DtHbaoDrawable ( )
virtual

destructor

makVrv::DtHbaoDrawable::DtHbaoDrawable ( )
delete

not allowed - default constructor

makVrv::DtHbaoDrawable::DtHbaoDrawable ( const DtHbaoDrawable )
delete

not allowed - copy constructor

makVrv::DtHbaoDrawable::DtHbaoDrawable ( DtDe de)
protected

constructor. private. only creator can create

Member Function Documentation

DtHbaoDrawable& makVrv::DtHbaoDrawable::operator= ( const DtHbaoDrawable )
delete

not allowed - equals operator

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

Override the draw implementation to run the hbao texture generation and post processor.

virtual void makVrv::DtHbaoDrawable::reloadShaders ( )
virtual

Reload the HBAO shader program.

virtual void makVrv::DtHbaoDrawable::setDepthTexture ( osg::Texture *  texture)
virtual

overridden currently unneeded because the postprocessor drawable is always deleted/recreated because of channel creation/destruction virtual void releaseGLObjects(osg::State* state = 0) const;

set the depth texture

virtual void makVrv::DtHbaoDrawable::setBaseTexture ( osg::Texture *  texture)
virtual

set the base texture which is used as input to the HBAO effect generation

virtual void makVrv::DtHbaoDrawable::setOcclusionTexture ( osg::Texture *  inputTex)
virtual

set the occlusion texture from the osgChannel

virtual void makVrv::DtHbaoDrawable::setViewSize ( int  width,
int  height 
)
virtual

set the viewport size

virtual void makVrv::DtHbaoDrawable::createProgramIfNecessary ( void  ) const
protectedvirtual

create the program if needed

virtual void makVrv::DtHbaoDrawable::cleanupGpuMemory ( void  )
protectedvirtual

cleanup the memory allocated on the GPU

virtual void makVrv::DtHbaoDrawable::releaseHbaoRenderTexture ( )
protectedvirtual

releases the HBAO render to textue and associated fbo

void makVrv::DtHbaoDrawable::updateHbaoSettings ( ) const
protected

not virtual since it is called by the constructor. Used to syncronize the hbao settings with the shared state. Don't think of this as really const since it modifies a mutable paratemers. All required due to osg requirement that draw implementation is const.

void makVrv::DtHbaoDrawable::createTextureViewsIfNecessary ( osg::State *  state) const
protected

brief create new texture views into the multiview arrays if nessacary

Member Data Documentation

friend makVrv::DtHbaoDrawable::DtHbaoDrawableCreator
protected

friended, to access constructor above

osg::ref_ptr<osg::Texture> makVrv::DtHbaoDrawable::myBaseTexture
protected
osg::ref_ptr<osg::Texture> makVrv::DtHbaoDrawable::myDepthTexture
protected
osg::ref_ptr<osg::Texture> makVrv::DtHbaoDrawable::myOcclusionTex
protected
GLuint makVrv::DtHbaoDrawable::myDepthTextureId
mutableprotected

texture views used for multiview

std::vector<GLuint> makVrv::DtHbaoDrawable::myDepthTexViews
mutableprotected
bool makVrv::DtHbaoDrawable::myShadingRateIsSupported
mutableprotected
DtGlProgram* makVrv::DtHbaoDrawable::myMutableHbaoProgram
mutableprotected

the program

int makVrv::DtHbaoDrawable::myMutableVrvSsaoTexLoc
mutableprotected

locations of various shader parameters

int makVrv::DtHbaoDrawable::myMutableVrvOcclusionTexLoc
mutableprotected
bool makVrv::DtHbaoDrawable::myMutableTapsDirty
mutableprotected

are the taps needed to be re-sent to the GPU

osg::observer_ptr<const osg::GraphicsContext> makVrv::DtHbaoDrawable::myInitGraphicsContext
mutableprotected
DtGlRenderTexture* makVrv::DtHbaoDrawable::myMutableHbaoTexture
mutableprotected
GFSDK_SSAO_Context_GL* makVrv::DtHbaoDrawable::myMutableSsaoContextGl
mutableprotected
GFSDK_SSAO_GLFunctions makVrv::DtHbaoDrawable::myMutableGlFunctions
mutableprotected
HbaoParameters makVrv::DtHbaoDrawable::myMutableParameters
mutableprotected
DtSignalConnectionManager makVrv::DtHbaoDrawable::myMutableConnections
mutableprotected
bool makVrv::DtHbaoDrawable::myMutableShadersDirtyFlag
mutableprotected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)