mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-17 06:59:43 -05:00
render: make wlr_renderer_clear take a float[4] for the color
This commit is contained in:
parent
402587ed65
commit
ddb1779f9f
9 changed files with 13 additions and 17 deletions
|
|
@ -121,9 +121,9 @@ static void wlr_gles2_end(struct wlr_renderer *wlr_renderer) {
|
|||
// no-op
|
||||
}
|
||||
|
||||
static void wlr_gles2_clear(struct wlr_renderer *wlr_renderer, float red,
|
||||
float green, float blue, float alpha) {
|
||||
glClearColor(red, green, blue, alpha);
|
||||
static void wlr_gles2_clear(struct wlr_renderer *wlr_renderer,
|
||||
const float (*color)[4]) {
|
||||
glClearColor((*color)[0], (*color)[1], (*color)[2], (*color)[3]);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,8 @@ void wlr_renderer_end(struct wlr_renderer *r) {
|
|||
r->impl->end(r);
|
||||
}
|
||||
|
||||
void wlr_renderer_clear(struct wlr_renderer *r, float red, float green,
|
||||
float blue, float alpha) {
|
||||
r->impl->clear(r, red, green, blue, alpha);
|
||||
void wlr_renderer_clear(struct wlr_renderer *r, const float (*color)[4]) {
|
||||
r->impl->clear(r, color);
|
||||
}
|
||||
|
||||
void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue