aboutsummaryrefslogtreecommitdiff
path: root/example/rotation.c
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-06-26 17:34:15 +1200
committerScott Anderson <ascent12@hotmail.com>2017-06-26 17:34:15 +1200
commit0cd94f0cf0dd104cee9837dc2961536a078d089e (patch)
tree798abd248cf605f2a82ef732c0bed0a1812704c7 /example/rotation.c
parentf252c5a79214a3d3cd7ab3f239050b234e4ae9e2 (diff)
Added software cursor fallback
Diffstat (limited to 'example/rotation.c')
-rw-r--r--example/rotation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/example/rotation.c b/example/rotation.c
index b8c43d4c..2dd148d0 100644
--- a/example/rotation.c
+++ b/example/rotation.c
@@ -46,6 +46,7 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
int32_t width, height;
wlr_output_effective_resolution(wlr_output, &width, &height);
+ wlr_output_make_current(wlr_output);
wlr_renderer_begin(sample->renderer, wlr_output);
float matrix[16];
@@ -59,6 +60,7 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
}
wlr_renderer_end(sample->renderer);
+ wlr_output_swap_buffers(wlr_output);
long ms = (ts->tv_sec - output->last_frame.tv_sec) * 1000 +
(ts->tv_nsec - output->last_frame.tv_nsec) / 1000000;
@@ -205,7 +207,7 @@ int main(int argc, char *argv[]) {
state.renderer = wlr_gles2_renderer_init();
state.cat_texture = wlr_render_surface_init(state.renderer);
wlr_surface_attach_pixels(state.cat_texture, GL_RGBA,
- cat_tex.width, cat_tex.height, cat_tex.pixel_data);
+ cat_tex.width, cat_tex.width, cat_tex.height, cat_tex.pixel_data);
compositor_run(&compositor);