Volume Renderer DoF
DoFShader Class Reference

#include <DoFShader.h>

Inheritance diagram for DoFShader:
GLShader

Public Member Functions

 DoFShader ()
 
 ~DoFShader ()
 
void draw (FBO *fbo0, FBO *fbo1, float C, bool f2b)
 
void loadDepth (float depthZCoord, float distance)
 
void prepare (GLCamera &camera, const GLuint &quadVAO, const GLuint &volTEX)
 
void cleanUp ()
 
void refresh ()
 
- Public Member Functions inherited from GLShader
 GLShader (const QString &_vertex, const QString &_fragment)
 
 ~GLShader ()
 
void prepare (const GLuint &vao)
 
void cleanUp ()
 
const bool isRenderable () const
 

Additional Inherited Members

- Protected Member Functions inherited from GLShader
void createShader (const QString &_vertex, const QString &_fragment)
 
- Protected Attributes inherited from GLShader
QOpenGLShaderProgram * linker
 
GLuint program
 
GLboolean renderable
 

Detailed Description

A class for rendering the DoF effect

Constructor & Destructor Documentation

◆ DoFShader()

DoFShader::DoFShader ( )

◆ ~DoFShader()

DoFShader::~DoFShader ( )

Member Function Documentation

◆ cleanUp()

void DoFShader::cleanUp ( )

unbind everything

◆ draw()

void DoFShader::draw ( FBO fbo0,
FBO fbo1,
float  C,
bool  f2b 
)

renders a slice of the volume

Parameters
fbo0previous framebuffer
fbo1current framebuffer
Ccircle of confusion
f2bbool indicating if rendered front to back or back to front

◆ loadDepth()

void DoFShader::loadDepth ( float  depthZCoord,
float  distance 
)

loads up the depth values to the shader

Parameters
depthZCoorddistance from camera to slice
distancedistance between slices

◆ prepare()

void DoFShader::prepare ( GLCamera camera,
const GLuint &  quadVAO,
const GLuint &  volTEX 
)

bind matrices, VAO and texture

Parameters
cameracontains model, view, projection matrices
quadVAOVAO for a simple quad
volTEXID for the current volume slice

◆ refresh()

void DoFShader::refresh ( )

recompile the shader, for debugging


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