Hello all,

It it possible to get a CoglHandle of cloned group? I found two ways how to
create a 'live' clone, with either clutter_clone_new() or
clutter_texture_new_from_actor(). But clutter_texture_new_from_actor() seems
not to work with ClutterGroup and clutter_clone_new() returns not a
ClutterTexture object. In both I can't get a proper CoglHandle.

Here's an example:

    ClutterColor actor_color = { 0xff, 0xff, 0xff, 0xff };
    ClutterActor *rect = clutter_rectangle_new_with_color (&actor_color);
    clutter_actor_set_size (rect, 100, 100);
    clutter_actor_set_position (rect, 20, 20);

    ClutterActor *text = clutter_text_new_with_text("Courier 20", "Hello!");
    clutter_actor_set_position (text, 20, 50);

    ClutterActor *group = clutter_group_new();
    clutter_group_add(group, rect);
    clutter_group_add(group, text);
    clutter_stage_add(CLUTTER_GROUP(clutter_stage_get_default()), group);

    ClutterActor* texture1 = clutter_clone_new(group);
    ClutterActor* texture2 = clutter_texture_new_from_actor(group);

    clutter_stage_add(CLUTTER_GROUP(clutter_stage_get_default()), texture1);
    clutter_actor_set_x(texture1, 300);

    clutter_stage_add(CLUTTER_GROUP(clutter_stage_get_default()), texture2);
     clutter_actor_set_x(texture2, 300);

    CoglHandle cogl_tex_id1 =
clutter_texture_get_cogl_texture(CLUTTER_TEXTURE(texture1));
    CoglHandle cogl_tex_id2 =
clutter_texture_get_cogl_texture(CLUTTER_TEXTURE(texture2));

P.S. I need a CoglHandle to do a reflection of the group later. I would be
happy if there a better way to reflect a group with all it's content.

--
Aarto

Reply via email to