Represents an OpenGL shader object.
More...
#include <Shader.h>
|
|
| Shader () |
| | Default constructor. Initializes with default values.
|
| |
| | Shader (int pID, std::string pCode, ShaderType pShaderType, bool pPath=true) |
| | Constructs a shader with the given parameters and loads it.
|
| |
|
| ~Shader () |
| | Destructor. Cleans up the shader object.
|
| |
| int | GetID () |
| | Gets the OpenGL shader ID.
|
| |
| void | Load (std::string pFileName, ShaderType pShaderType, bool pPath=true) |
| | Loads the shader from a file or source code.
|
| |
|
void | Use () |
| | Activates the shader for use.
|
| |
| const std::string | GetCode () const |
| | Gets the shader source code.
|
| |
Represents an OpenGL shader object.
◆ Shader()
| clt::Shader::Shader |
( |
int | pID, |
|
|
std::string | pCode, |
|
|
ShaderType | pShaderType, |
|
|
bool | pPath = true ) |
|
inline |
Constructs a shader with the given parameters and loads it.
- Parameters
-
| pID | Shader ID. |
| pCode | Shader source code or file path. |
| pShaderType | Type of the shader. |
| pPath | If true, pCode is treated as a file path; otherwise, as source code. |
◆ GetCode()
| const std::string clt::Shader::GetCode |
( |
| ) |
const |
|
inline |
Gets the shader source code.
- Returns
- The shader source code.
◆ GetID()
| int clt::Shader::GetID |
( |
| ) |
|
|
inline |
Gets the OpenGL shader ID.
- Returns
- The shader ID.
◆ Load()
| void Shader::Load |
( |
std::string | pFileName, |
|
|
ShaderType | pShaderType, |
|
|
bool | pPath = true ) |
Loads the shader from a file or source code.
- Parameters
-
| pFileName | File name or source code. |
| pShaderType | Type of the shader. |
| pPath | If true, pFileName is treated as a file path; otherwise, as source code. |
◆ mCode
| std::string clt::Shader::mCode |
|
protected |
◆ mID
◆ mType
| ShaderType clt::Shader::mType |
|
protected |
The documentation for this class was generated from the following files:
- D:/DEV JEUX/2025/CPP/Opengl/ClutterEngineOpenGL/ClutterEngine/Engine/Graphics/Shader/Shader.h
- D:/DEV JEUX/2025/CPP/Opengl/ClutterEngineOpenGL/ClutterEngine/Engine/Graphics/Shader/Shader.cpp