From 588ea8e290a61a8a98e72617fd679689891e2e39 Mon Sep 17 00:00:00 2001 From: William McKinnon Date: Wed, 18 Jan 2023 01:49:26 -0500 Subject: feat: Add box shadows (#64) Co-authored-by: Erik Reider <35975961+ErikReider@users.noreply.github.com> --- include/sway/desktop/fx_renderer.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/sway/desktop/fx_renderer.h') diff --git a/include/sway/desktop/fx_renderer.h b/include/sway/desktop/fx_renderer.h index c5bae260..1c3121cd 100644 --- a/include/sway/desktop/fx_renderer.h +++ b/include/sway/desktop/fx_renderer.h @@ -47,6 +47,8 @@ struct fx_renderer { float projection[9]; + GLuint stencil_buffer_id; + struct { bool OES_egl_image_external; } exts; @@ -84,6 +86,17 @@ struct fx_renderer { GLint half_thickness; } corner; + struct { + GLuint program; + GLint proj; + GLint color; + GLint pos_attrib; + GLint position; + GLint size; + GLint blur_sigma; + GLint corner_radius; + } box_shadow; + struct gles2_tex_shader tex_rgba; struct gles2_tex_shader tex_rgbx; struct gles2_tex_shader tex_ext; @@ -118,4 +131,7 @@ void fx_render_border_corner(struct fx_renderer *renderer, const struct wlr_box const float color[static 4], const float projection[static 9], enum corner_location corner_location, int radius, int border_thickness); +void fx_render_box_shadow(struct fx_renderer *renderer, const struct wlr_box *box, + const float color[static 4], const float projection[static 9], int radius, float blur_sigma); + #endif -- cgit v1.2.3