2020-04-10 01:22:16 +00:00
|
|
|
#ifndef shader_h
|
|
|
|
#define shader_h
|
|
|
|
#include <epoxy/gl.h>
|
|
|
|
#include <stdbool.h>
|
2019-10-01 17:56:53 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <glib.h>
|
|
|
|
#include <gio/gio.h>
|
2020-04-10 01:22:16 +00:00
|
|
|
|
|
|
|
typedef struct shader_s {
|
|
|
|
GLuint resolution_uniform;
|
|
|
|
GLuint origin_uniform;
|
|
|
|
GLuint texture_uniform;
|
|
|
|
GLuint previous_texture_uniform;
|
|
|
|
GLuint mix_previous_uniform;
|
|
|
|
|
|
|
|
GLuint position_attribute;
|
|
|
|
GLuint texture;
|
|
|
|
GLuint previous_texture;
|
|
|
|
GLuint program;
|
2019-09-29 23:49:41 +00:00
|
|
|
|
|
|
|
bool compat_mode;
|
2020-04-10 01:22:16 +00:00
|
|
|
} shader_t;
|
|
|
|
|
|
|
|
bool init_shader_with_name(shader_t *shader, const char *name);
|
|
|
|
void render_bitmap_with_shader(shader_t *shader, void *bitmap, void *previous,
|
|
|
|
unsigned source_width, unsigned source_height,
|
|
|
|
unsigned x, unsigned y, unsigned w, unsigned h);
|
|
|
|
void free_shader(struct shader_s *shader);
|
2019-10-12 21:11:26 +00:00
|
|
|
void free_master_shader(void);
|
2020-04-10 01:22:16 +00:00
|
|
|
|
|
|
|
#endif /* shader_h */
|