[tests] Fix the cogl_polygon() interactive test
We need to premultiply the alpha, and we also need to change the frame painting to use the frame-less Timeline.
This commit is contained in:
parent
a8fc4e1694
commit
6414adbfeb
@ -120,6 +120,7 @@ test_coglbox_fade_texture (CoglHandle tex_id,
|
|||||||
255,
|
255,
|
||||||
255,
|
255,
|
||||||
((i ^ (i >> 1)) & 1) ? 0 : 128);
|
((i ^ (i >> 1)) & 1) ? 0 : 128);
|
||||||
|
cogl_color_premultiply (&(vertices[i].color));
|
||||||
}
|
}
|
||||||
|
|
||||||
cogl_set_source_texture (tex_id);
|
cogl_set_source_texture (tex_id);
|
||||||
@ -307,12 +308,13 @@ test_coglbox_new (void)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
frame_cb (ClutterTimeline *timeline,
|
frame_cb (ClutterTimeline *timeline,
|
||||||
gint frame_num,
|
gint elapsed_msecs,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (data);
|
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (data);
|
||||||
|
gdouble progress = clutter_timeline_get_progress (timeline);
|
||||||
|
|
||||||
priv->frame = frame_num;
|
priv->frame = 360.0 * progress;
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (data));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user