From 6ecb0eefcba21d923bd01fce688dbd6bd399fbae Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 19 Mar 2018 20:21:02 +0100 Subject: 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. --- include/wlr/types/wlr_matrix.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/wlr') 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 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, -- cgit v1.2.3