2019-12-14 21:06:12 +00:00
|
|
|
#ifndef __GSK_SHADER_BUILDER_PRIVATE_H__
|
|
|
|
#define __GSK_SHADER_BUILDER_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <graphene.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2020-01-19 19:08:23 +00:00
|
|
|
GBytes *preamble;
|
2019-12-14 21:06:12 +00:00
|
|
|
GBytes *vs_preamble;
|
|
|
|
GBytes *fs_preamble;
|
|
|
|
|
|
|
|
int version;
|
|
|
|
|
|
|
|
guint debugging: 1;
|
|
|
|
guint gles: 1;
|
|
|
|
guint gl3: 1;
|
|
|
|
guint legacy: 1;
|
|
|
|
|
|
|
|
} GskGLShaderBuilder;
|
|
|
|
|
|
|
|
|
|
|
|
void gsk_gl_shader_builder_init (GskGLShaderBuilder *self,
|
2020-01-19 19:08:23 +00:00
|
|
|
const char *common_preamble_resource_path,
|
2019-12-14 21:06:12 +00:00
|
|
|
const char *vs_preamble_resource_path,
|
|
|
|
const char *fs_preamble_resource_path);
|
|
|
|
void gsk_gl_shader_builder_finish (GskGLShaderBuilder *self);
|
|
|
|
|
|
|
|
void gsk_gl_shader_builder_set_glsl_version (GskGLShaderBuilder *self,
|
|
|
|
int version);
|
|
|
|
|
|
|
|
int gsk_gl_shader_builder_create_program (GskGLShaderBuilder *self,
|
|
|
|
const char *resource_path,
|
2020-09-18 16:03:30 +00:00
|
|
|
const char *extra_fragment_snippet,
|
|
|
|
gsize extra_fragment_length,
|
2019-12-14 21:06:12 +00:00
|
|
|
GError **error);
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_SHADER_BUILDER_PRIVATE_H__ */
|