diff options
author | emersion <contact@emersion.fr> | 2018-03-19 20:21:02 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-19 20:21:02 +0100 |
commit | 6ecb0eefcba21d923bd01fce688dbd6bd399fbae (patch) | |
tree | 0ba90e941dc9029e6d9e12d8bbc85b52e183dcb7 /include/wlr | |
parent | 6227da96b113f00b4b8134c10a43994716a53fef (diff) |
render/gles2: transpose matrices before binding them
Setting glUniformMatrix3fv's transpose parameter to GL_TRUE is
not allowed for OpenGL ES 2.
This adds a wlr_matrix_transpose function.
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_matrix.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_matrix.h b/include/wlr/types/wlr_matrix.h index fd060d11..02111db8 100644 --- a/include/wlr/types/wlr_matrix.h +++ b/include/wlr/types/wlr_matrix.h @@ -5,11 +5,12 @@ #include <wlr/types/wlr_box.h> void wlr_matrix_identity(float mat[static 9]); +void wlr_matrix_multiply(float mat[static 9], const float a[static 9], + const float b[static 9]); +void wlr_matrix_transpose(float mat[static 9], const float a[static 9]); void wlr_matrix_translate(float mat[static 9], float x, float y); void wlr_matrix_scale(float mat[static 9], float x, float y); void wlr_matrix_rotate(float mat[static 9], float rad); -void wlr_matrix_multiply(float mat[static 9], const float a[static 9], - const float b[static 9]); void wlr_matrix_transform(float mat[static 9], enum wl_output_transform transform); void wlr_matrix_projection(float mat[static 9], int width, int height, |