From a01b4eefceb1d490d918eba1729c87354695d1ca Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 11 Jan 2010 16:21:56 +0000 Subject: [PATCH] cogl-texture-2d: Fix the coordinate wrapping for negative coordinates The formula to wrap the coordinates to the [0,1] range was broken when the coordinates were negative. --- clutter/cogl/cogl/cogl-texture-2d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clutter/cogl/cogl/cogl-texture-2d.c b/clutter/cogl/cogl/cogl-texture-2d.c index e605bb73e..f6bf603b2 100644 --- a/clutter/cogl/cogl/cogl-texture-2d.c +++ b/clutter/cogl/cogl/cogl-texture-2d.c @@ -66,8 +66,8 @@ _cogl_texture_2d_wrap_coords (float t_1, float t_2, t_2 -= int_part; if (signbit (int_part)) { - *out_t_1 = 1.0f - t_1; - *out_t_2 = 1.0f - t_2; + *out_t_1 = 1.0f + t_1; + *out_t_2 = 1.0f + t_2; } else {