From 0ba37a4dc9748ece98dd411f55fcf2e0e4464b4d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 8 May 2014 04:34:42 +1000 Subject: eo_add_custom() is the way. --- src/extantz/scenri.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/extantz/scenri.c') diff --git a/src/extantz/scenri.c b/src/extantz/scenri.c index af4897a..4b16faa 100644 --- a/src/extantz/scenri.c +++ b/src/extantz/scenri.c @@ -95,10 +95,7 @@ Scene_Data *scenriAdd(Evas_Object *win) eo_do(win, evas_obj_size_get(&w, &h)); scene = calloc(1, sizeof(Scene_Data)); - // TODO - I have no idea how this should work. - // It seems the people that wrote the examples don't know either. lol -// scene->root_node = eo_add(EVAS_3D_NODE_CLASS, evas, EVAS_3D_NODE_TYPE_NODE); - scene->root_node = evas_3d_node_add(evas, EVAS_3D_NODE_TYPE_NODE); + scene->root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); // -TODO - set the size based on the size of the enclosing window. scene->scene = eo_add(EVAS_3D_SCENE_CLASS, evas, @@ -127,8 +124,7 @@ Scene_Data *scenriAdd(Evas_Object *win) evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0), evas_3d_light_directional_set(EINA_TRUE) ); - scene->light_node = evas_3d_node_add(evas, EVAS_3D_NODE_TYPE_LIGHT); - eo_do(scene->light_node, + scene->light_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT), evas_3d_node_light_set(scene->light), evas_3d_node_position_set(1000.0, 0.0, 1000.0), evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_3D_SPACE_PARENT, 0.0, 1.0, 0.0) -- cgit v1.1