aboutsummaryrefslogtreecommitdiff
path: root/render/gles2/texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/gles2/texture.c')
-rw-r--r--render/gles2/texture.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 0dfebc48..9ee2a3e3 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -227,16 +227,13 @@ static bool gles2_texture_upload_eglimage(struct wlr_texture *wlr_tex,
}
static void gles2_texture_get_matrix(struct wlr_texture *_texture,
- float mat[static 16], const float projection[static 16], int x, int y) {
+ float mat[static 9], const float projection[static 9], int x, int y) {
struct wlr_gles2_texture *texture = (struct wlr_gles2_texture *)_texture;
- float world[16];
wlr_matrix_identity(mat);
- wlr_matrix_translate(world, x, y, 0);
- wlr_matrix_mul(mat, mat, world);
- wlr_matrix_scale(world,
- texture->wlr_texture.width, texture->wlr_texture.height, 1);
- wlr_matrix_mul(mat, mat, world);
- wlr_matrix_mul(mat, projection, mat);
+ wlr_matrix_translate(mat, x, y);
+ wlr_matrix_scale(mat, texture->wlr_texture.width,
+ texture->wlr_texture.height);
+ wlr_matrix_multiply(mat, projection, mat);
}
static void gles2_texture_get_buffer_size(struct wlr_texture *texture, struct