aboutsummaryrefslogtreecommitdiff
path: root/examples/touch.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-03-15 19:31:02 +0100
committeremersion <contact@emersion.fr>2018-03-15 19:31:02 +0100
commit876f07e9f13946609047e8e32ca7918548315e1c (patch)
tree07fe534708d37ffa146a6631445cf57d19e931fb /examples/touch.c
parent1914a1aa2b4f3c5678bbbf7d734352a6f51bec58 (diff)
renderer: replace wlr_texture_get_matrix by wlr_render_texture
Diffstat (limited to 'examples/touch.c')
-rw-r--r--examples/touch.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/touch.c b/examples/touch.c
index 47bbebc2..0af8bc4a 100644
--- a/examples/touch.c
+++ b/examples/touch.c
@@ -45,15 +45,12 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
wlr_renderer_begin(sample->renderer, wlr_output);
wlr_renderer_clear(sample->renderer, (float[]){0.25f, 0.25f, 0.25f, 1});
- float matrix[9];
struct touch_point *p;
wl_list_for_each(p, &sample->touch_points, link) {
- wlr_texture_get_matrix(sample->cat_texture, matrix,
- wlr_output->transform_matrix,
- (int)(p->x * width) - sample->cat_texture->width / 2,
- (int)(p->y * height) - sample->cat_texture->height / 2);
- wlr_render_texture_with_matrix(sample->renderer, sample->cat_texture,
- matrix, 1.0f);
+ int x = (int)(p->x * width) - sample->cat_texture->width / 2;
+ int y = (int)(p->y * height) - sample->cat_texture->height / 2;
+ wlr_render_texture(sample->renderer, sample->cat_texture,
+ wlr_output->transform_matrix, x, y, 1.0f);
}
wlr_renderer_end(sample->renderer);