31 lines
661 B
C++
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{};
|
|
}; |