28 lines
836 B
C++
28 lines
836 B
C++
#pragma once
|
|
#include <string>
|
|
#include <glm/glm.hpp>
|
|
|
|
class Shader
|
|
{
|
|
public:
|
|
unsigned int Program;
|
|
|
|
Shader(const char* vertexShaderSourcePath, const char* fragmentShaderSourcePath, bool directSource = false);
|
|
Shader(std::string vertexShaderSourcePath, std::string fragmentShaderSourcePath, bool directSource = false);
|
|
~Shader();
|
|
|
|
|
|
void Use();
|
|
|
|
void setBool(const std::string name, bool value) const;
|
|
void setFloat(const std::string name, float value) const;
|
|
void setInt(const std::string name, int value) const;
|
|
void setMat4(const std::string name, glm::mat4 value) const;
|
|
void setVec3(const std::string name, glm::vec3 value) const;
|
|
void setVec3(const std::string name, float v0, float v1, float v2) const;
|
|
void setMat3(const std::string name, glm::mat3 value) const;
|
|
|
|
static std::string readFile(const char* path);
|
|
};
|
|
|