Don't access CoglMatrix struct fields

Instead, use the new cogl_matrix_get_value() API.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
This commit is contained in:
Georges Basile Stavracas Neto
2020-09-09 22:16:25 -03:00
parent 8e125fbab6
commit 55b05e5631
3 changed files with 31 additions and 15 deletions

View File

@ -232,7 +232,7 @@ setup_viewport (CoglFramebuffer *framebuffer,
*/
cogl_framebuffer_get_projection_matrix (framebuffer, &projection_matrix);
z_camera = 0.5 * projection_matrix.xx;
z_camera = 0.5 * cogl_matrix_get_value (&projection_matrix, 0, 0);
cogl_matrix_init_identity (&mv_matrix);
cogl_matrix_translate (&mv_matrix, -0.5f, -0.5f, -z_camera);