Developer Documentation
SSAOPlugin Class Reference
Inheritance diagram for SSAOPlugin:
BaseInterface RenderInterface LoggingInterface

Classes

struct  ViewerResources
 

Public Slots

QString version ()
 

Signals

void log (Logtype _type, QString _message)
 
void log (QString _message)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application. More...
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot. More...
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer. More...
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 

Public Member Functions

QString name ()
 Return a name for the plugin. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 

Private Types

enum  {
  PROG_INIT = 0 , PROG_DOWNSAMPLING , PROG_BLUR , PROG_SSAO ,
  PROG_FINAL , PROG_FINAL_MSAA
}
 

Private Slots

void initializePlugin ()
 
void exit ()
 
void render (ACG::GLState *_glState, Viewer::ViewerProperties &_properties)
 
QString rendererName ()
 
void supportedDrawModes (ACG::SceneGraph::DrawModes::DrawMode &_mode)
 
QString checkOpenGL ()
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 
- Private Slots inherited from RenderInterface
virtual void render (ACG::GLState *_glState, Viewer::ViewerProperties &_properties)
 rendering function More...
 

Private Member Functions

void destroyResources ()
 free all gl resources More...
 
void destroyResources (int _viewerId)
 free viewer specific gl resources More...
 
void reloadResources (int _viewerId, unsigned int _sceneTexWidth, unsigned int _sceneTexHeight)
 reload gl resources More...
 
void drawQuadProj (float _x0=-1.0f, float _y0=1.0f, float _w=2.0f, float _h=2.0f)
 draw a quad in projection space (only positions) More...
 
void traverseLightNodes (BaseNode *_node)
 find all light nodes in the scene
 
void generatePeelingShaders (GLSL::StringList *_strVertexShaderOut, GLSL::StringList *_strFragmentShaderOut, bool _textured)
 peel shader generator based on lights and texture mode
 
void drawScenePass (ACG::GLState *_glState, Viewer::ViewerProperties &_properties, BaseNode *_sceneGraphRoot)
 draw the current scene More...
 
void gaussianBlurPass (const ViewerResources *_pViewer, const float *_texelSize, GLenum _targetAttachement, GLuint _srcTexture)
 
void generateSamplingKernel ()
 computes a hemisphere sampling kernel in [0,1] range More...
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor. More...
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates. More...
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin. More...
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin. More...
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden. More...
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer. More...
 
- Private Member Functions inherited from RenderInterface
virtual ~RenderInterface ()
 Destructor. More...
 
virtual QAction * optionsAction ()
 Return options menu. More...
 
virtual QString renderObjectsInfo (bool _outputShaderInfo)
 Return a qstring of the current render objects. More...
 
virtual void reloadShaders ()
 Reload any renderer specific shaders. More...
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor. More...
 

Private Attributes

std::map< int, ViewerResourcesviewerRes_
 
GLSL::Shadershaders_ [10]
 shader resources More...
 
GLSL::Programprograms_ [6]
 shader programs More...
 
GLuint randomVecTex_
 random vector table for sample offset rotation More...
 
ACG::Vec3f samplingKernel_ [128]
 ssao sampling kernel More...
 

Static Private Attributes

static const unsigned int numSamples_ = 32
 number of samples More...
 

Detailed Description

Definition at line 54 of file SSAO.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Definition at line 195 of file SSAO.hh.

Constructor & Destructor Documentation

◆ SSAOPlugin()

SSAOPlugin::SSAOPlugin ( )

Definition at line 58 of file SSAO.cc.

◆ ~SSAOPlugin()

SSAOPlugin::~SSAOPlugin ( )

Definition at line 68 of file SSAO.cc.

Member Function Documentation

◆ checkOpenGL

QString SSAOPlugin::checkOpenGL ( )
privateslot

Definition at line 73 of file SSAO.cc.

◆ description()

QString SSAOPlugin::description ( )
inlinevirtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 76 of file SSAO.hh.

◆ destroyResources() [1/2]

void SSAOPlugin::destroyResources ( )
private

free all gl resources

Definition at line 418 of file SSAO.cc.

◆ destroyResources() [2/2]

void SSAOPlugin::destroyResources ( int  _viewerId)
private

free viewer specific gl resources

Definition at line 442 of file SSAO.cc.

◆ drawQuadProj()

void SSAOPlugin::drawQuadProj ( float  _x0 = -1.0f,
float  _y0 = 1.0f,
float  _w = 2.0f,
float  _h = 2.0f 
)
private

draw a quad in projection space (only positions)

Definition at line 467 of file SSAO.cc.

◆ drawScenePass()

void SSAOPlugin::drawScenePass ( ACG::GLState _glState,
Viewer::ViewerProperties _properties,
BaseNode _sceneGraphRoot 
)
private

draw the current scene

Definition at line 486 of file SSAO.cc.

◆ exit

void SSAOPlugin::exit ( )
privateslot

Definition at line 141 of file SSAO.cc.

◆ gaussianBlurPass()

void SSAOPlugin::gaussianBlurPass ( const ViewerResources _pViewer,
const float *  _texelSize,
GLenum  _targetAttachement,
GLuint  _srcTexture 
)
private

Definition at line 494 of file SSAO.cc.

◆ generateSamplingKernel()

void SSAOPlugin::generateSamplingKernel ( )
private

computes a hemisphere sampling kernel in [0,1] range

Definition at line 111 of file SSAO.cc.

◆ initializePlugin

void SSAOPlugin::initializePlugin ( )
privateslot

Definition at line 99 of file SSAO.cc.

◆ name()

QString SSAOPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 75 of file SSAO.hh.

◆ reloadResources()

void SSAOPlugin::reloadResources ( int  _viewerId,
unsigned int  _sceneTexWidth,
unsigned int  _sceneTexHeight 
)
private

reload gl resources

Definition at line 161 of file SSAO.cc.

◆ render

void SSAOPlugin::render ( ACG::GLState _glState,
Viewer::ViewerProperties _properties 
)
privateslot

Definition at line 527 of file SSAO.cc.

◆ rendererName

QString SSAOPlugin::rendererName ( )
privateslot

Definition at line 148 of file SSAO.cc.

◆ supportedDrawModes

void SSAOPlugin::supportedDrawModes ( ACG::SceneGraph::DrawModes::DrawMode _mode)
privateslot

Definition at line 154 of file SSAO.cc.

◆ version

QString SSAOPlugin::version ( )
inlineslot

Definition at line 79 of file SSAO.hh.

Member Data Documentation

◆ numSamples_

const unsigned int SSAOPlugin::numSamples_ = 32
staticprivate

number of samples

Definition at line 212 of file SSAO.hh.

◆ programs_

GLSL::Program* SSAOPlugin::programs_[6]
private

shader programs

Definition at line 206 of file SSAO.hh.

◆ randomVecTex_

GLuint SSAOPlugin::randomVecTex_
private

random vector table for sample offset rotation

Definition at line 209 of file SSAO.hh.

◆ samplingKernel_

ACG::Vec3f SSAOPlugin::samplingKernel_[128]
private

ssao sampling kernel

Definition at line 215 of file SSAO.hh.

◆ shaders_

GLSL::Shader* SSAOPlugin::shaders_[10]
private

shader resources

Definition at line 193 of file SSAO.hh.

◆ viewerRes_

std::map<int, ViewerResources> SSAOPlugin::viewerRes_
private

Definition at line 190 of file SSAO.hh.


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