Volume Renderer DoF
GLShader Class Referenceabstract

#include <GLShader.h>

Inheritance diagram for GLShader:
DoFShader QuadShader Tex3DShader

Public Member Functions

 GLShader (const QString &_vertex, const QString &_fragment)
 
 ~GLShader ()
 
void prepare (const GLuint &vao)
 
void cleanUp ()
 
const bool isRenderable () const
 

Protected Member Functions

virtual void configShader ()=0
 
void createShader (const QString &_vertex, const QString &_fragment)
 

Protected Attributes

QOpenGLShaderProgram * linker
 
GLuint program
 
GLboolean renderable
 

Detailed Description

General class for shaders

Constructor & Destructor Documentation

◆ GLShader()

GLShader::GLShader ( const QString &  _vertex,
const QString &  _fragment 
)

◆ ~GLShader()

GLShader::~GLShader ( )

Member Function Documentation

◆ cleanUp()

void GLShader::cleanUp ( )

unbind everything

◆ configShader()

virtual void GLShader::configShader ( )
protectedpure virtual

gets all necessary uniform locations

◆ createShader()

void GLShader::createShader ( const QString &  _vertex,
const QString &  _fragment 
)
protected

creates, compiles and links the shader

Parameters
_vertexpath to the vertex shader
_fragmentpath to the fragment shader

◆ isRenderable()

const bool GLShader::isRenderable ( ) const

returns if the program is usable

Returns
true, if no error occured during compiling and linking, false else

◆ prepare()

void GLShader::prepare ( const GLuint &  vao)

use program and bind the vao

Parameters
vaobinds this vao

Member Data Documentation

◆ linker

QOpenGLShaderProgram* GLShader::linker
protected

Qt object for creating the shader

◆ program

GLuint GLShader::program
protected

shader program ID

◆ renderable

GLboolean GLShader::renderable
protected

bool holding the info if the shader can be used


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