+ | Shader class system better working

This commit is contained in:
TheRedShip
2025-02-13 00:28:20 +01:00
parent a71529312b
commit 6e3b0c44eb
11 changed files with 402 additions and 213 deletions

View File

@ -18,9 +18,14 @@
class Shader
{
public:
Shader(std::string vertexPath, std::string fragmentPath, std::string computePath, std::string denoisingPath);
Shader(GLenum type, const std::string &file_path);
~Shader(void);
void compile(void);
void reload();
GLuint getShader(void) const;
void attach(void);
void setupVertexBuffer();
void drawTriangles();
@ -37,7 +42,6 @@ class Shader
void set_textures(std::vector<GLuint> texture_ids, std::vector<GLuint> emissive_texture_ids);
GLuint getProgram(void) const;
GLuint getProgramCompute(void) const;
GLuint getProgramComputeDenoising(void) const;
@ -67,7 +71,12 @@ class Shader
size_t _size;
void checkCompileErrors(unsigned int shader);
void checkCompileErrors();
//
GLenum _type;
GLuint _shader_id;
std::string _file_path;
};
#endif