ferx/engine/include/Shader.h

37 lines
809 B
C
Raw Normal View History

2024-07-31 13:40:16 +00:00
#ifndef SHADER_H
#define SHADER_H
#define GLFW_INCLUDE_NONE
#include <glad/glad.h>
2024-07-31 13:40:16 +00:00
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
2024-07-31 13:40:16 +00:00
class Shader
{
public:
Shader() = default;
Shader(const std::string& vPath, const std::string& fPath);
2024-07-31 13:40:16 +00:00
~Shader();
static Shader Create(const std::string& vPath, const std::string& fPath);
2024-07-31 13:40:16 +00:00
unsigned int GetID() const;
2024-07-31 13:40:16 +00:00
void Use() const;
void Shutdown() const;
2024-07-31 13:40:16 +00:00
void SetBool(const char* name, bool value) const;
void SetInt(const char* name, int value) const;
void SetFloat(const char* name, float value) const;
void SetMat4(const char* name, glm::mat4 value) const;
private:
unsigned int m_ID;
2024-07-31 13:40:16 +00:00
};
#endif