summaryrefslogtreecommitdiff
path: root/include/render/fx_renderer/matrix.h
blob: c3bae42e6744f855271f2c26dc26f406184844ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef _MATRIX_H
#define _MATRIX_H

#include <wlr/types/wlr_output.h>

/**
 * Writes a 2D orthographic projection matrix to mat of (width, height) with a
 * specified wl_output_transform.
 *
 * Equivalent to glOrtho(0, width, 0, height, 1, -1) with the transform applied.
 */
void matrix_projection(float mat[static 9], int width, int height,
	enum wl_output_transform transform);

#endif