1
0
Fork 0

Fix calculating the bounds when clipping from a primitive

When projecting the bounding rectangle of a primitive it was using the
modelview matrix twice instead of the modelview and projection
matrices so it was coming out with garbage.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 7e1f05c84013bb91248d691091df00f4f634c6cf)
This commit is contained in:
Neil Roberts 2013-12-02 18:18:39 +00:00
parent 7f7187eaf1
commit 0596fe8020
2 changed files with 2 additions and 2 deletions

View file

@ -278,7 +278,7 @@ _cogl_clip_stack_push_primitive (CoglClipStack *stack,
entry->bounds_y2 = bounds_y2;
cogl_matrix_entry_get (modelview_entry, &modelview);
cogl_matrix_entry_get (modelview_entry, &projection);
cogl_matrix_entry_get (projection_entry, &projection);
get_transformed_corners (bounds_x1, bounds_y1, bounds_x2, bounds_y2,
&modelview,

View file

@ -59,7 +59,7 @@ main (int argc, char **argv)
UNPORTED_TEST (test_readpixels);
#ifdef COGL_HAS_COGL_PATH_SUPPORT
ADD_TEST (test_path, 0, 0);
ADD_TEST (test_path_clip, 0, TEST_KNOWN_FAILURE);
ADD_TEST (test_path_clip, 0, 0);
#endif
ADD_TEST (test_depth_test, 0, 0);
ADD_TEST (test_color_mask, 0, 0);