blob: 37f4c0919ad1144b815ad593882897294896359b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#ifndef GSR_SHADER_H
#define GSR_SHADER_H
#include "egl.h"
typedef struct {
gsr_egl *egl;
unsigned int program_id;
} gsr_shader;
/* |vertex_shader| or |fragment_shader| may be NULL */
int gsr_shader_init(gsr_shader *self, gsr_egl *egl, const char *vertex_shader, const char *fragment_shader);
void gsr_shader_deinit(gsr_shader *self);
int gsr_shader_bind_attribute_location(gsr_shader *self, const char *attribute, int location);
void gsr_shader_use(gsr_shader *self);
void gsr_shader_use_none(gsr_shader *self);
#endif /* GSR_SHADER_H */
|