mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
bc41a88c92
_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 |
||
---|---|---|
.. | ||
clutter | ||
.gitignore | ||
meson.build |