aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render.h
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-02-21 23:20:09 +0100
committerGuido Günther <agx@sigxcpu.org>2018-02-25 13:47:48 +0100
commitd08792bfffc6b7b28f59d7ee100091805367b7fa (patch)
tree33c514b2e9f70be4980614717093029f675fc7fd /include/wlr/render.h
parente6ca78b0e4b81e02958628c4b3b4db911b51714b (diff)
Add alpha to wlr_render_with_matrix
so we can use the alpha channel to e.g. blend in textures
Diffstat (limited to 'include/wlr/render.h')
-rw-r--r--include/wlr/render.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/wlr/render.h b/include/wlr/render.h
index 3743482b..747603da 100644
--- a/include/wlr/render.h
+++ b/include/wlr/render.h
@@ -33,12 +33,13 @@ struct wlr_texture *wlr_render_texture_create(struct wlr_renderer *r);
* float projection[16];
* float matrix[16];
* wlr_texture_get_matrix(texture, &matrix, &projection, 123, 321);
- * wlr_render_with_matrix(renderer, texture, &matrix);
+ * wlr_render_with_matrix(renderer, texture, &matrix, 0.5f);
*
- * This will render the texture at <123, 321>.
+ * This will render the texture at <123, 321> with an alpha channel of 0.5.
*/
bool wlr_render_with_matrix(struct wlr_renderer *r,
- struct wlr_texture *texture, const float (*matrix)[16]);
+ struct wlr_texture *texture, const float (*matrix)[16], float alpha);
+
/**
* Renders a solid quad in the specified color.
*/