YoggieEngine/BarinkEngine/Include/Graphics/Shader.h

26 lines
792 B
C++

#pragma once
#include <glad/glad.h>
#include <string>
#include <iostream>
#include <fstream>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
class Shader {
private:
int id;
char* readFile (const char* filePath);
public:
Shader(const std::string vertexShaderPath, const std::string fragmentShaderPath);
void Use();
void setUniformMat4(std::string uniformName, glm::mat4 matrix4);
void setUniformVec4(std::string uniformName, glm::vec4 vector4);
void setUniformVec3(std::string uniformName, glm::vec3 vector3);
void setUniformVec2(std::string uniformName, glm::vec2 vector2);
void setUniformFloat(std::string uniformName, float value);
void setUniformInt(std::string uniformName, int value);
};