#pragma once #include #include class Shader { public: Shader(const char* vertexPath, const char* fragmentPath); void use(); void set4f(const std::string& uniform, float val1, float val2, float val3, float val4); void setFloat(const char* name, float value, bool useShader = false); void setInteger(const char* name, int value, bool useShader = false); void setVector2f(const char* name, float x, float y, bool useShader = false); void setVector2f(const char* name, const glm::vec2& value, bool useShader = false); void setVector3f(const char* name, float x, float y, float z, bool useShader = false); void setVector3f(const char* name, const glm::vec3& value, bool useShader = false); void setVector4f(const char* name, float x, float y, float z, float w, bool useShader = false); void setVector4f(const char* name, const glm::vec4& value, bool useShader = false); void setMatrix4(const char* name, const glm::mat4& matrix, bool useShader = false); private: bool compiled = false; unsigned int ID; };