26 lines
478 B
C++
26 lines
478 B
C++
#pragma once
|
|
#include "util.hpp"
|
|
|
|
class Shader
|
|
{
|
|
GLuint prog;
|
|
public:
|
|
bool create(std::string vertex, std::string fragment);
|
|
void use();
|
|
void u_vec4(const char* name, const glm::vec4& v);
|
|
void u_mat4(const char* name, const glm::mat4& m);
|
|
void u_int(const char* name, int i);
|
|
};
|
|
|
|
enum class kShader : uint16_t
|
|
{
|
|
Color = const_hash("color"),
|
|
};
|
|
|
|
class ShaderManager
|
|
{
|
|
public:
|
|
static void use(kShader id);
|
|
static void use(const char* name);
|
|
};
|