aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/output-layout.c6
-rw-r--r--examples/rotation.c4
-rw-r--r--examples/tablet.c2
-rw-r--r--examples/touch.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/examples/output-layout.c b/examples/output-layout.c
index f4df73a0..9c914137 100644
--- a/examples/output-layout.c
+++ b/examples/output-layout.c
@@ -111,7 +111,7 @@ static void handle_output_frame(struct output_state *output,
.width = 128, .height = 128,
};
if (wlr_output_layout_intersects(sample->layout, output->output, &box)) {
- float matrix[16];
+ float matrix[9];
// transform global coordinates to local coordinates
double local_x = sample->x_offs;
@@ -121,8 +121,8 @@ static void handle_output_frame(struct output_state *output,
wlr_texture_get_matrix(sample->cat_texture, matrix,
wlr_output->transform_matrix, local_x, local_y);
- wlr_render_with_matrix(sample->renderer,
- sample->cat_texture, matrix, 1.0f);
+ wlr_render_texture_with_matrix(sample->renderer, sample->cat_texture,
+ matrix, 1.0f);
}
wlr_renderer_end(sample->renderer);
diff --git a/examples/rotation.c b/examples/rotation.c
index 0b0c6adf..4431f60a 100644
--- a/examples/rotation.c
+++ b/examples/rotation.c
@@ -46,12 +46,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[16];
+ float matrix[9];
for (int y = -128 + (int)odata->y_offs; y < height; y += 128) {
for (int x = -128 + (int)odata->x_offs; x < width; x += 128) {
wlr_texture_get_matrix(sample->cat_texture, matrix,
wlr_output->transform_matrix, x, y);
- wlr_render_with_matrix(sample->renderer,
+ wlr_render_texture_with_matrix(sample->renderer,
sample->cat_texture, matrix, 1.0f);
}
}
diff --git a/examples/tablet.c b/examples/tablet.c
index 82f86553..521447b9 100644
--- a/examples/tablet.c
+++ b/examples/tablet.c
@@ -49,7 +49,7 @@ 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[16];
+ float matrix[9];
float distance = 0.8f * (1 - sample->distance);
float tool_color[4] = { distance, distance, distance, 1 };
for (size_t i = 0; sample->button && i < 4; ++i) {
diff --git a/examples/touch.c b/examples/touch.c
index 6f4821ad..47bbebc2 100644
--- a/examples/touch.c
+++ b/examples/touch.c
@@ -45,14 +45,14 @@ 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[16];
+ 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_with_matrix(sample->renderer, sample->cat_texture,
+ wlr_render_texture_with_matrix(sample->renderer, sample->cat_texture,
matrix, 1.0f);
}