Codebase list wlroots / 776b6ce
Fix software cursor rendering for tinywl and some examples Alexander Bakker 5 years ago
3 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
9999 sample->clear_color[2], sample->clear_color[3]);
100100 glClear(GL_COLOR_BUFFER_BIT);
101101
102 wlr_output_render_software_cursors(wlr_output, NULL);
102103 wlr_output_swap_buffers(wlr_output, NULL, NULL);
103104 }
104105
100100 wlr_output_make_current(wlr_output, NULL);
101101 wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
102102 wlr_renderer_clear(renderer, state->clear_color);
103 wlr_output_render_software_cursors(wlr_output, NULL);
103104 wlr_output_swap_buffers(wlr_output, NULL, NULL);
104105 wlr_renderer_end(renderer);
105106 }
609609 render_surface, &rdata);
610610 }
611611
612 /* Hardware cursors are rendered by the GPU on a separate plane, and can be
613 * moved around without re-rendering what's beneath them - which is more
614 * efficient. However, not all hardware supports hardware cursors. For this
615 * reason, wlroots provides a software fallback, which we ask it to render
616 * here. wlr_cursor handles configuring hardware vs software cursors for you,
617 * and this function is a no-op when hardware cursors are in use. */
618 wlr_output_render_software_cursors(output->wlr_output, NULL);
619
612620 /* Conclude rendering and swap the buffers, showing the final frame
613621 * on-screen. */
614622 wlr_renderer_end(renderer);