2021-11-16 21:57:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class Shader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Shader();
|
|
|
|
Shader(const std::string& vertexShaderSourceCode, const std::string& fragmentShaderSourceCode);
|
2021-11-18 14:19:53 +00:00
|
|
|
~Shader();
|
2021-11-16 21:57:55 +00:00
|
|
|
|
|
|
|
void SetMatrix(const std::string& name, const float* data);
|
|
|
|
|
|
|
|
void Bind();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateProgram(const std::string& vertexShaderSourceCode, const std::string& fragmentShaderSourceCode);
|
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned int program;
|
|
|
|
};
|