Class for managing an OpenGL shader.
More...
#include <Shader_Program.hpp>
|
| Shader ()=delete |
| Deleted default constructor.
|
|
| ~Shader () |
| Destructor for the Shader class.
|
|
GLuint | get_id () const |
| Gets the shader ID.
|
|
string * | get_error () |
| Gets the compilation error message.
|
|
bool | is_ok () const |
| Checks if the shader is compiled successfully.
|
|
Class for managing an OpenGL shader.
◆ Shader() [1/2]
Ragot::Shader::Shader |
( |
const vector< string > & | source_code, |
|
|
GLenum | type ) |
|
protected |
Constructor for the Shader class.
- Parameters
-
source_code | Vector of shader source code. |
type | Shader type (e.g., GL_VERTEX_SHADER, GL_FRAGMENT_SHADER). |
◆ Shader() [2/2]
Ragot::Shader::Shader |
( |
| ) |
|
|
delete |
Deleted default constructor.
◆ ~Shader()
Ragot::Shader::~Shader |
( |
| ) |
|
|
inline |
Destructor for the Shader class.
◆ compile_shader()
GLuint Ragot::Shader::compile_shader |
( |
| ) |
|
|
protected |
Compiles the shader.
- Returns
- Shader ID.
◆ get_error()
string * Ragot::Shader::get_error |
( |
| ) |
|
|
inline |
Gets the compilation error message.
- Returns
- Pointer to the error message string.
◆ get_id()
GLuint Ragot::Shader::get_id |
( |
| ) |
const |
|
inline |
Gets the shader ID.
- Returns
- Shader ID.
◆ is_ok()
bool Ragot::Shader::is_ok |
( |
| ) |
const |
|
inline |
Checks if the shader is compiled successfully.
- Returns
- True if compilation succeeded, false otherwise.
◆ show_compilation_error()
void Ragot::Shader::show_compilation_error |
( |
| ) |
|
|
protected |
Displays compilation errors.
◆ compilation_succeeded
bool Ragot::Shader::compilation_succeeded |
|
private |
Flag indicating if compilation succeeded.
◆ error
string Ragot::Shader::error |
|
private |
Compilation error message.
◆ id
The documentation for this class was generated from the following files: