Basic Entity Components implementation
This commit is contained in:
27
BarinkEngine/src/Graphics/Primitives/Shader.h
Normal file
27
BarinkEngine/src/Graphics/Primitives/Shader.h
Normal file
@ -0,0 +1,27 @@
|
||||
#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:
|
||||
|
||||
char* readFile (const char* filePath);
|
||||
public:
|
||||
Shader(const std::string vertexShaderPath, const std::string fragmentShaderPath);
|
||||
void Use() const;
|
||||
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 ;
|
||||
|
||||
int id;
|
||||
|
||||
};
|
Reference in New Issue
Block a user