From 561c441241a2d6510075f07d154a8bbaa89a0596 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 28 Jan 2009 12:06:39 +0000 Subject: [PATCH] [text-backface-culling] Fix width/height parameters to cogl_rectangle During the upgrade to cogl material, test-backface-culling was switched to use cogl_rectangle instead of cogl_texture_rectangle to draw the textures. However, cogl_rectangle takes a width and height instead of the the top-left and bottom-right vertices so the rectangles were being drawn in the wrong place. --- tests/conform/test-backface-culling.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/conform/test-backface-culling.c b/tests/conform/test-backface-culling.c index f021ce81c..7e7c947e2 100644 --- a/tests/conform/test-backface-culling.c +++ b/tests/conform/test-backface-culling.c @@ -128,14 +128,14 @@ on_paint (ClutterActor *actor, TestState *state) /* Draw a front-facing texture */ cogl_set_source_texture (state->texture); - cogl_rectangle (x1, y1, x2, y2); + cogl_rectangle (x1, y1, x2 - x1, y2 - y1); x1 = x2; x2 = x1 + (float)(TEXTURE_SIZE); /* Draw a back-facing texture */ cogl_set_source_texture (state->texture); - cogl_rectangle (x2, y1, x1, y2); + cogl_rectangle (x2, y1, x1 - x2, y2 - y1); x1 = x2; x2 = x1 + (float)(TEXTURE_SIZE); @@ -172,8 +172,7 @@ on_paint (ClutterActor *actor, TestState *state) /* Draw a regular rectangle (this should always show) */ cogl_set_source_color4f (1.0, 0, 0, 1.0); - cogl_rectangle ( (x1), (y1), - (x2 - x1), (y2 - y1)); + cogl_rectangle (x1, y1, x2 - x1, y2 - y1); /* The second time round draw beneath the first with backface culling disabled */