render: make wlr_renderer_clear take a float[4] for the color

This commit is contained in:
emersion 2018-02-03 09:32:02 +01:00
parent 402587ed65
commit ddb1779f9f
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
9 changed files with 13 additions and 17 deletions

View file

@ -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);
}

View file

@ -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) {