mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-24 08:56:28 -05:00
matrix: unify API, don't use array pointers
This commit is contained in:
parent
b6a3f240c7
commit
d26b67cb06
18 changed files with 172 additions and 167 deletions
|
|
@ -227,16 +227,16 @@ static bool gles2_texture_upload_eglimage(struct wlr_texture *wlr_tex,
|
|||
}
|
||||
|
||||
static void gles2_texture_get_matrix(struct wlr_texture *_texture,
|
||||
float (*matrix)[16], const float (*projection)[16], int x, int y) {
|
||||
float mat[static 16], const float projection[static 16], int x, int y) {
|
||||
struct wlr_gles2_texture *texture = (struct wlr_gles2_texture *)_texture;
|
||||
float world[16];
|
||||
wlr_matrix_identity(matrix);
|
||||
wlr_matrix_translate(&world, x, y, 0);
|
||||
wlr_matrix_mul(matrix, &world, matrix);
|
||||
wlr_matrix_scale(&world,
|
||||
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(matrix, &world, matrix);
|
||||
wlr_matrix_mul(projection, matrix, matrix);
|
||||
wlr_matrix_mul(mat, mat, world);
|
||||
wlr_matrix_mul(mat, projection, mat);
|
||||
}
|
||||
|
||||
static void gles2_texture_get_buffer_size(struct wlr_texture *texture, struct
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue