mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
cogl/matrix: Relocate and update projection and transform APIs
Ideally, we would use Graphene to do that, however as of now Graphene lacks these APIs so we still need these helpers. Since we're preparing to get rid of CoglMatrix, move them to a separate file, and rename them with the 'cogl_graphene' prefix. Since I'm already touching the world with this change, I'm also renaming cogl_matrix_transform_point() to cogl_graphene_matrix_project_point(), as per XXX comment, to make it consistent with the transform/projection semantics in place. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
This commit is contained in:
@ -170,11 +170,11 @@ meta_actor_painting_untransformed (CoglFramebuffer *fb,
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
float w = 1;
|
||||
cogl_matrix_transform_point (&modelview_projection,
|
||||
&vertices[i].x,
|
||||
&vertices[i].y,
|
||||
&vertices[i].z,
|
||||
&w);
|
||||
cogl_graphene_matrix_project_point (&modelview_projection,
|
||||
&vertices[i].x,
|
||||
&vertices[i].y,
|
||||
&vertices[i].z,
|
||||
&w);
|
||||
vertices[i].x = MTX_GL_SCALE_X (vertices[i].x, w,
|
||||
viewport[2], viewport[0]);
|
||||
vertices[i].y = MTX_GL_SCALE_Y (vertices[i].y, w,
|
||||
|
Reference in New Issue
Block a user