mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
util/matrix: Introduce wlr_matrix_project_fbox
Same as wlr_matrix_project_box but takes an fbox And use it with gles2
This commit is contained in:
parent
26d24d2229
commit
088b7c98c5
3 changed files with 18 additions and 12 deletions
|
|
@ -134,9 +134,7 @@ static void set_proj_matrix(GLint loc, float proj[9], const struct wlr_box *box)
|
|||
static void set_tex_matrix(GLint loc, enum wl_output_transform trans,
|
||||
const struct wlr_fbox *box) {
|
||||
float tex_matrix[9];
|
||||
wlr_matrix_identity(tex_matrix);
|
||||
wlr_matrix_translate(tex_matrix, box->x, box->y);
|
||||
wlr_matrix_scale(tex_matrix, box->width, box->height);
|
||||
wlr_matrix_project_fbox(tex_matrix, box);
|
||||
|
||||
// since textures have a different origin point we have to transform
|
||||
// differently if we are rotating
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue