summary refs log tree commit diff
path: root/src/shader.h
blob: 6d538035ce4b486b63e176bee266648283e1f894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef SHADER_H
#define SHADER_H

#include <GL/glew.h>

typedef struct {
  unsigned int program;
} Shader;

Shader *shader_create(const char *vertex_path, const char *fragment_path);
void shader_use(Shader *shader);
void shader_delete(Shader *shader);
void shader_set_int(Shader *shader, const char *name, int value);
void shader_set_float(Shader *shader, const char *name, float value);
void shader_set_vec3(Shader *shader, const char *name, float x, float y,
                     float z);
void shader_set_mat4(Shader *shader, const char *name, const float *value);

#endif