29 lines
767 B
C++
29 lines
767 B
C++
#pragma once
|
|
#include <glad/glad.h>
|
|
#include <GLFW/glfw3.h>
|
|
#include <glm/glm.hpp>
|
|
#include <string>
|
|
#include <fstream>
|
|
#include <sstream>
|
|
#include <iostream>
|
|
|
|
class Shader
|
|
{
|
|
public:
|
|
unsigned int ID;// Program ID
|
|
|
|
// Read and build the shader upon construction
|
|
Shader() = default;
|
|
void Load(const char* vertexPath, const char* fragmentPath);
|
|
// Activate the shader
|
|
void use();
|
|
|
|
void setBool(const std::string &name, bool value)const;
|
|
void setInt(const std::string &name, int value)const;
|
|
void setFloat(const std::string &name, float value)const;
|
|
void setMat4(const std::string &name, glm::mat4 value)const;
|
|
void setVec3(const std::string &name, glm::vec3 value) const ;
|
|
|
|
};
|
|
|