This commit is contained in:
2025-11-24 12:54:13 +00:00
parent a786d26dde
commit 767796919a
7 changed files with 179 additions and 31 deletions

25
inc/engine/shaders.hpp Normal file
View File

@@ -0,0 +1,25 @@
#ifndef SHADER_HPP
#define SHADER_HPP
#define GL_GLEXT_PROTOTYPES
// Includes
#include <SDL3/SDL_opengl.h>
#include <glm/glm.hpp>
#include <string>
// Shader class
class Shader {
public:
unsigned int ID;
Shader(const char* vertexPath, const char* fragmentPath);
void use() const;
void setBool(const std::string &name, bool value) const;
void setInt(const std::string &name, int value) const;
void setFloat(const std::string &name, float value) const;
void setMat4(const std::string &name, const glm::mat4 &mat) const;
~Shader();
private:
const char* read_file(const char* filePath);
};
#endif