On Mon, Jun 30, 2008 at 1:53 AM, Jason Tackaberry <[EMAIL PROTECTED]> wrote:
> I understood that it was possible to position actors with subpixel
> precision.  I have a texture that I want to move by 0.1f along the x and
> y axis every 30ms.  I'm sure the best way to do this would be using a
> timeline, but as a test implementation, I just did:
>
>        gboolean slide(gpointer data)
>        {
>            ClutterActor *tex = data;
>            ClutterUnit x, y;
>            clutter_actor_get_positionu(tex, &x, &y);
>            clutter_actor_set_positionu(tex,
>                CLUTTER_UNITS_FROM_FLOAT(CLUTTER_UNITS_TO_FLOAT(x) + 0.1),
>                CLUTTER_UNITS_FROM_FLOAT(CLUTTER_UNITS_TO_FLOAT(y) + 0.1));
>            printf("Pos: %f, %f\n", CLUTTER_UNITS_TO_FLOAT(x), 
> CLUTTER_UNITS_TO_FLOAT(y));
>        }
>
>        [...]
>        g_timeout_add(30, slide, tex);
>
> What actually happens is that although the position outputted is
> incrementing by 0.1, the actor itself only actually moves by full
> pixels.
>
> Am I missing something?

The edges of the texture will not move with subpixel accuracy unless
you've somehow otherwise turned on full scene anti aliasing for your
GPU. The actual contents of the texture should move with subpixel
precision though (try rendering a grid with 1px wide lines and wee how
that behaves).

/Øyvind K.


-- 
«The future is already here. It's just not very evenly distributed»
 -- William Gibson
http://pippin.gimp.org/ http://ffii.org/
--
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to