[Cogl] [PATCH 2/2] Fix calculating the bounds when clipping from a primitive

Robert Bragg robert at sixbynine.org
Mon Dec 2 12:12:59 PST 2013


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
Robert

On Mon, Dec 2, 2013 at 6:56 PM, Neil Roberts <neil at linux.intel.com> wrote:
> 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.
> ---
>  cogl/cogl-clip-stack.c            | 2 +-
>  tests/conform/test-conform-main.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/cogl/cogl-clip-stack.c b/cogl/cogl-clip-stack.c
> index 2e909ae..40056bb 100644
> --- a/cogl/cogl-clip-stack.c
> +++ b/cogl/cogl-clip-stack.c
> @@ -276,7 +276,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,
> diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
> index 572235b..116d29d 100644
> --- a/tests/conform/test-conform-main.c
> +++ b/tests/conform/test-conform-main.c
> @@ -58,7 +58,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);
> --
> 1.8.3.1
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list