rootston: only draw damaged regions

This commit is contained in:
emersion 2018-01-18 14:36:42 +01:00
parent 6fa0a91ee2
commit 5017d7f762
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 121 additions and 81 deletions

View file

@ -108,11 +108,9 @@ static void init_globals() {
static void wlr_gles2_begin(struct wlr_renderer *_renderer,
struct wlr_output *output) {
// TODO: let users customize the clear color?
GL_CALL(glClearColor(0.25f, 0.25f, 0.25f, 1));
GL_CALL(glClear(GL_COLOR_BUFFER_BIT));
int32_t width = output->width;
int32_t height = output->height;
GL_CALL(glViewport(0, 0, width, height));
//GL_CALL(glClearColor(0.25f, 0.25f, 0.25f, 1));
//GL_CALL(glClear(GL_COLOR_BUFFER_BIT));
GL_CALL(glViewport(0, 0, output->width, output->height));
// enable transparency
GL_CALL(glEnable(GL_BLEND));