summaryrefslogtreecommitdiff
path: root/include/render/fx_renderer/shaders.h
diff options
context:
space:
mode:
authorame <[email protected]>2024-10-09 17:04:13 -0500
committerame <[email protected]>2024-10-09 17:04:13 -0500
commitb2dd727499800306b89dad2275e600781ef3739f (patch)
tree57dc10dbe85f46ccc573f4eee2497be5ebc4ef6c /include/render/fx_renderer/shaders.h
parentf05626176636c49ba27c3ba2b69658f50c9b5730 (diff)
add gradient rect support
Diffstat (limited to 'include/render/fx_renderer/shaders.h')
-rw-r--r--include/render/fx_renderer/shaders.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/include/render/fx_renderer/shaders.h b/include/render/fx_renderer/shaders.h
index 6c19744..ad18167 100644
--- a/include/render/fx_renderer/shaders.h
+++ b/include/render/fx_renderer/shaders.h
@@ -37,6 +37,24 @@ struct quad_shader {
bool link_quad_program(struct quad_shader *shader);
+struct quad_grad_shader {
+ int max_len;
+
+ GLuint program;
+ GLint proj;
+ GLint colors;
+ GLint size;
+ GLint degree;
+ GLint grad_box;
+ GLint pos_attrib;
+ GLint linear;
+ GLint origin;
+ GLint count;
+ GLint blend;
+};
+
+bool link_quad_grad_program(struct quad_grad_shader *shader, int max_len);
+
struct quad_round_shader {
GLuint program;
GLint proj;
@@ -49,6 +67,29 @@ struct quad_round_shader {
bool link_quad_round_program(struct quad_round_shader *shader, enum fx_rounded_quad_shader_source source);
+struct quad_grad_round_shader {
+ GLuint program;
+ GLint proj;
+ GLint color;
+ GLint pos_attrib;
+ GLint size;
+ GLint position;
+ GLint radius;
+
+ GLint colors;
+ GLint grad_size;
+ GLint degree;
+ GLint grad_box;
+ GLint linear;
+ GLint origin;
+ GLint count;
+ GLint blend;
+
+ int max_len;
+};
+
+bool link_quad_grad_round_program(struct quad_grad_round_shader *shader, enum fx_rounded_quad_shader_source source, int max_len);
+
struct tex_shader {
GLuint program;
GLint proj;
@@ -84,6 +125,32 @@ struct rounded_border_corner_shader {
bool link_rounded_border_corner_program(struct rounded_border_corner_shader *shader);
+struct rounded_grad_border_corner_shader {
+ int max_len;
+ GLuint program;
+ GLint proj;
+ GLint is_top_left;
+ GLint is_top_right;
+ GLint is_bottom_left;
+ GLint is_bottom_right;
+ GLint position;
+ GLint radius;
+ GLint half_size;
+ GLint half_thickness;
+
+ GLint colors;
+ GLint size;
+ GLint degree;
+ GLint grad_box;
+ GLint pos_attrib;
+ GLint linear;
+ GLint origin;
+ GLint count;
+ GLint blend;
+};
+
+bool link_rounded_grad_border_corner_program(struct rounded_grad_border_corner_shader *shader, int max_len);
+
struct box_shadow_shader {
GLuint program;
GLint proj;