ferx/engine/rendering/Shader.h
2024-11-22 04:35:43 +04:00

31 lines
661 B
C++

#pragma once
#define GLFW_INCLUDE_NONE
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include <unordered_map>
class Shader
{
public:
Shader() = default;
Shader(const std::string& vPath, const std::string& fPath);
~Shader();
static Shader Create(const std::string& vPath, const std::string& fPath);
void Use() const;
void Shutdown() const;
int GetUniformLocation(const std::string& name);
private:
unsigned int m_ID{};
std::unordered_map<std::string, int> m_Uniforms{};
};