1
0
Fork 0
mutter-performance-source/clutter
Georges Basile Stavracas Neto bc41a88c92 clutter/stage: Replace _cogl_util_get_eye_planes_for_screen_poly()
_cogl_util_get_eye_planes_for_screen_poly() is quite a complicated beast. Ever
since Clutter became a compositor toolkit, and specially after we switched to
graphene_frustum_t on paint volumes, we can brutally simplify this function.

The new code assumes camera is at (0, 0, 0) at world coordinates (i.e. before
applying the projection). We also consider that the redraw clip are at stage
coordinates. That means that converting the clip rectangle to world rectangle
is simply a matter of projecting the corresponding vertices using the "view"
matrix. Furthermore, we only need to project the top-left, and bottom-right
vertices, since top-right and bottom-left can be derived from those two.

The frustum setup still uses triplets of vertices to setup the planes, except
now the first vertex is always the camera (hardcoded to 0, 0, 0), and the other
two vertices are the projected clip rectangle vertices.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
2020-10-16 13:46:26 -03:00
..
clutter clutter/stage: Replace _cogl_util_get_eye_planes_for_screen_poly() 2020-10-16 13:46:26 -03:00
.gitignore clutter: Remove clutter specific version 2018-11-06 17:17:36 +01:00
meson.build clutter: Include semi private cogl API 2020-07-02 19:36:50 +02:00