gpu-screen-recorder/include/shader.h

20 lines
552 B
C
Raw Normal View History

#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 */