SuperimposeMesh
All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Private Attributes | List of all members
Shader Class Reference

#include <Shader.h>

Public Member Functions

 Shader (const std::string &vertex_shader_path, const std::string &fragment_shader_path)
 Create a shader program with given vertex and fragment shader paths. More...
 
void install ()
 Activate the shader program. More...
 
void uninstall ()
 Deactivate the shader program. More...
 
const GLuint get_program ()
 

Private Attributes

GLuint shader_program_id_
 The program ID. More...
 

Detailed Description

Definition at line 17 of file Shader.h.

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( const std::string &  vertex_shader_path,
const std::string &  fragment_shader_path 
)

Create a shader program with given vertex and fragment shader paths.

Definition at line 18 of file Shader.cpp.

References shader_program_id_.

Member Function Documentation

◆ get_program()

const GLuint Shader::get_program ( )
inline

Definition at line 36 of file Shader.h.

References shader_program_id_.

Referenced by Mesh::Draw(), and SICAD::renderBackground().

◆ install()

void Shader::install ( )

Activate the shader program.

Definition at line 129 of file Shader.cpp.

References shader_program_id_.

Referenced by SICAD::renderBackground().

◆ uninstall()

void Shader::uninstall ( )

Deactivate the shader program.

Definition at line 135 of file Shader.cpp.

Referenced by SICAD::renderBackground().

Member Data Documentation

◆ shader_program_id_

GLuint Shader::shader_program_id_
private

The program ID.

Definition at line 45 of file Shader.h.

Referenced by get_program(), install(), and Shader().


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