26 lines
517 B
C
26 lines
517 B
C
#pragma once
|
|
|
|
#include <GL/glew.h>
|
|
#include <GL/gl.h>
|
|
#include "math.h"
|
|
#include "file.h"
|
|
|
|
enum Shader_Type : u32 {
|
|
VERTEX = GL_VERTEX_SHADER,
|
|
FRAGMENT = GL_FRAGMENT_SHADER
|
|
};
|
|
|
|
struct Shader {
|
|
u32 id;
|
|
u32 uniform_projection;
|
|
u32 uniform_model;
|
|
u32 uniform_view;
|
|
|
|
Shader();
|
|
~Shader();
|
|
};
|
|
|
|
bool create_shader(Shader *shader, const char *vertex_shader_path, const char *fragment_shader_path);
|
|
bool add_shader(Shader *shader, const char *shader_code, Shader_Type type);
|
|
void clear_shader(Shader *shader);
|