mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Merge pull request #1652 from ascent12/glclear
Clear buffer after beginning renderer
This commit is contained in:
commit
3d29d833b1
1 changed files with 3 additions and 2 deletions
|
@ -197,14 +197,15 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
|
||||||
struct sway_output *soutput = wl_container_of(listener, soutput, frame);
|
struct sway_output *soutput = wl_container_of(listener, soutput, frame);
|
||||||
struct wlr_output *wlr_output = data;
|
struct wlr_output *wlr_output = data;
|
||||||
struct sway_server *server = soutput->server;
|
struct sway_server *server = soutput->server;
|
||||||
float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f};
|
|
||||||
struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
|
struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
|
||||||
wlr_renderer_clear(renderer, clear_color);
|
|
||||||
|
|
||||||
int buffer_age = -1;
|
int buffer_age = -1;
|
||||||
wlr_output_make_current(wlr_output, &buffer_age);
|
wlr_output_make_current(wlr_output, &buffer_age);
|
||||||
wlr_renderer_begin(server->renderer, wlr_output->width, wlr_output->height);
|
wlr_renderer_begin(server->renderer, wlr_output->width, wlr_output->height);
|
||||||
|
|
||||||
|
float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f};
|
||||||
|
wlr_renderer_clear(renderer, clear_color);
|
||||||
|
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue