2022-04-22 20:37:38 +00:00
|
|
|
#pragma once
|
2022-05-27 20:47:36 +00:00
|
|
|
|
2022-04-22 20:37:38 +00:00
|
|
|
#include <glad/glad.h>
|
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
2022-05-04 09:10:26 +00:00
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include <glm/gtc/type_ptr.hpp>
|
2022-04-22 20:37:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Shader {
|
|
|
|
private:
|
|
|
|
int id;
|
|
|
|
char* readFile (const char* filePath);
|
|
|
|
public:
|
|
|
|
Shader(const std::string vertexShaderPath, const std::string fragmentShaderPath);
|
|
|
|
void Use();
|
2022-06-04 16:26:58 +00:00
|
|
|
void setUniformMat4(std::string uniformName, glm::mat4 matrix4)const;
|
|
|
|
void setUniformVec4(std::string uniformName, glm::vec4 vector4)const;
|
|
|
|
void setUniformVec3(std::string uniformName, glm::vec3 vector3)const;
|
|
|
|
void setUniformVec2(std::string uniformName, glm::vec2 vector2)const;
|
|
|
|
void setUniformFloat(std::string uniformName, float value)const;
|
|
|
|
void setUniformInt(std::string uniformName, int value) const ;
|
2022-05-04 09:10:26 +00:00
|
|
|
|
2022-04-22 20:37:38 +00:00
|
|
|
|
|
|
|
};
|