Developer Documentation
GLSL::Shader Class Reference

A generic shader base class. More...

#include <OpenFlipper/libs_required/ACG/ShaderUtils/GLSLShader.hh>

Inheritance diagram for GLSL::Shader:
GLSL::ComputeShader GLSL::FragmentShader GLSL::GeometryShader GLSL::VertexShader

Public Member Functions

 Shader (GLenum shaderType)
 Creates a new shader. More...
 
virtual ~Shader ()
 Deletes the shader object.
 
void setSource (const StringList &source)
 Upload the source of the shader.
 
void setSource (const QStringList &source)
 Upload the source of the shader.
 
bool compile (bool verbose=true)
 Compile the shader object. More...
 

Protected Attributes

GLuint m_shaderId
 

Friends

class Program
 

Detailed Description

A generic shader base class.

Definition at line 71 of file GLSLShader.hh.

Constructor & Destructor Documentation

◆ Shader()

GLSL::Shader::Shader ( GLenum  shaderType)
explicit

Creates a new shader.

Parameters
[in]shaderTypeCan be one of GL_VERTEX_SHADER or GL_FRAGMENT_SHADER

Definition at line 77 of file GLSLShader.cc.

Member Function Documentation

◆ compile()

bool GLSL::Shader::compile ( bool  verbose = true)

Compile the shader object.

Returns
True if compilation was successful, or false if it failed. Also it prints out the shader source and the error message.

Definition at line 146 of file GLSLShader.cc.


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