2024-07-31 13:40:16 +00:00
|
|
|
#ifndef SHADER_H
|
|
|
|
#define SHADER_H
|
|
|
|
|
2024-08-01 23:32:51 +00:00
|
|
|
#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>
|
2024-08-01 23:32:51 +00:00
|
|
|
#include <string>
|
|
|
|
#include <sstream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
2024-07-31 13:40:16 +00:00
|
|
|
|
|
|
|
class Shader
|
|
|
|
{
|
|
|
|
public:
|
2024-08-01 23:32:51 +00:00
|
|
|
Shader() = default;
|
|
|
|
Shader(const std::string& vPath, const std::string& fPath);
|
2024-07-31 13:40:16 +00:00
|
|
|
~Shader();
|
|
|
|
|
2024-08-01 23:32:51 +00:00
|
|
|
static Shader Create(const std::string& vPath, const std::string& fPath);
|
2024-07-31 13:40:16 +00:00
|
|
|
|
2024-08-01 23:32:51 +00:00
|
|
|
unsigned int GetID() const;
|
2024-07-31 13:40:16 +00:00
|
|
|
|
2024-08-01 23:32:51 +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:
|
2024-08-01 23:32:51 +00:00
|
|
|
unsigned int m_ID;
|
2024-07-31 13:40:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|