From eee2e331fd7a858891d1aa0c4257c19201e670f8 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 8 Sep 2020 21:04:59 -0300 Subject: [PATCH] cogl/matrix: Add constant identity initializer https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439 --- cogl/cogl/cogl-matrix.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cogl/cogl/cogl-matrix.h b/cogl/cogl/cogl-matrix.h index 2cfd95bbb..e784b094a 100644 --- a/cogl/cogl/cogl-matrix.h +++ b/cogl/cogl/cogl-matrix.h @@ -121,6 +121,12 @@ struct _CoglMatrix }; COGL_STRUCT_SIZE_ASSERT (CoglMatrix, 128 + sizeof (unsigned long) * 3); +#define COGL_MATRIX_INIT_IDENTITY (CoglMatrix) { \ + 1.0f, 0.0f, 0.0f, 0.0f, \ + 0.0f, 1.0f, 0.0f, 0.0f, \ + 0.0f, 0.0f, 1.0f, 0.0f, \ + 0.0f, 0.0f, 0.0f, 1.0f, \ +} /** * cogl_matrix_init_identity: