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.
This commit is contained in:
emersion 2018-03-19 20:21:02 +01:00
parent 6227da96b1
commit 6ecb0eefcb
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 30 additions and 5 deletions

View file

@ -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,