3D Graphics Engine for ESP32
 
Loading...
Searching...
No Matches
Ragot::Shader_Program Class Reference

Class for managing an OpenGL shader program. More...

#include <Shader_Program.hpp>

Collaboration diagram for Ragot::Shader_Program:
Collaboration graph

Public Member Functions

 Shader_Program (const vector< string > &source_code_vertex, const vector< string > &source_code_fragment)
 Constructor for the Shader_Program class.
 
 Shader_Program ()=delete
 Deleted default constructor.
 
 ~Shader_Program ()
 Destructor for the Shader_Program class.
 
void use () const
 Uses the shader program.
 
GLuint get_id () const
 Gets the shader program ID.
 
GLuint get_uniform_location (string uniform_name) const
 Gets the uniform location in the shader program.
 

Private Member Functions

 Shader_Program (const Shader_Program &)=delete
 Deleted copy constructor.
 
Shader_Programoperator= (const Shader_Program &)=delete
 Deleted copy assignment operator.
 
void initialize (GLuint vertex_shader_id, GLuint fragment_shader_id)
 Initializes the shader program.
 
void show_linkage_error ()
 Displays linkage errors.
 

Private Attributes

GLuint program_id
 Shader program ID.
 

Detailed Description

Class for managing an OpenGL shader program.

Constructor & Destructor Documentation

◆ Shader_Program() [1/3]

Ragot::Shader_Program::Shader_Program ( const vector< string > & source_code_vertex,
const vector< string > & source_code_fragment )

Constructor for the Shader_Program class.

Parameters
source_code_vertexVector of vertex shader source code.
source_code_fragmentVector of fragment shader source code.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Shader_Program() [2/3]

Ragot::Shader_Program::Shader_Program ( )
delete

Deleted default constructor.

◆ ~Shader_Program()

Ragot::Shader_Program::~Shader_Program ( )
inline

Destructor for the Shader_Program class.

◆ Shader_Program() [3/3]

Ragot::Shader_Program::Shader_Program ( const Shader_Program & )
privatedelete

Deleted copy constructor.

Here is the call graph for this function:

Member Function Documentation

◆ get_id()

GLuint Ragot::Shader_Program::get_id ( ) const
inline

Gets the shader program ID.

Returns
Shader program ID.

◆ get_uniform_location()

GLuint Ragot::Shader_Program::get_uniform_location ( string uniform_name) const
inline

Gets the uniform location in the shader program.

Parameters
uniform_nameName of the uniform.
Returns
Uniform location.

◆ initialize()

void Ragot::Shader_Program::initialize ( GLuint vertex_shader_id,
GLuint fragment_shader_id )
private

Initializes the shader program.

Parameters
vertex_shader_idVertex shader ID.
fragment_shader_idFragment shader ID.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

Shader_Program & Ragot::Shader_Program::operator= ( const Shader_Program & )
privatedelete

Deleted copy assignment operator.

Here is the call graph for this function:

◆ show_linkage_error()

void Ragot::Shader_Program::show_linkage_error ( )
private

Displays linkage errors.

Here is the caller graph for this function:

◆ use()

void Ragot::Shader_Program::use ( ) const
inline

Uses the shader program.

Member Data Documentation

◆ program_id

GLuint Ragot::Shader_Program::program_id
private

Shader program ID.


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