yupplemayham/YuppleMayham/include/graphics/shader.h

27 lines
No EOL
722 B
C++

#ifndef _H_SHADER_H
#define _H_SHADER_H
#include <glad/glad.h>
#include <fstream>
#include <string>
class Shader
{
private:
public:
unsigned int ID;
Shader(const char* vertexPath, const char* fragmentPath);
void use() { glUseProgram(ID); }
void setFloat(const std::string& name, float value);
void setFloatArray(const std::string & name, size_t count, const float* value);
void setIntArray(const std::string & name, size_t count, const int* value);
void setInt(const std::string& name, int value);
void setBool(const std::string& name, bool value);
void setVec2(const std::string& name, const float* value);
void setMatrix4f(const std::string& name, const float* value);
~Shader();
};
#endif // _H_SHADER_H