diff options
author | David Walter Seikel | 2014-05-08 04:34:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-08 04:34:42 +1000 |
commit | 0ba37a4dc9748ece98dd411f55fcf2e0e4464b4d (patch) | |
tree | 67c54f762aa5863c0eefe7b0bf0ee6988077b3db /src/extantz/scenri.c | |
parent | Fixin's on the menu. (diff) | |
download | SledjHamr-0ba37a4dc9748ece98dd411f55fcf2e0e4464b4d.zip SledjHamr-0ba37a4dc9748ece98dd411f55fcf2e0e4464b4d.tar.gz SledjHamr-0ba37a4dc9748ece98dd411f55fcf2e0e4464b4d.tar.bz2 SledjHamr-0ba37a4dc9748ece98dd411f55fcf2e0e4464b4d.tar.xz |
eo_add_custom() is the way.
Diffstat (limited to '')
-rw-r--r-- | src/extantz/scenri.c | 8 |
1 files changed, 2 insertions, 6 deletions
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) | |||
95 | eo_do(win, evas_obj_size_get(&w, &h)); | 95 | eo_do(win, evas_obj_size_get(&w, &h)); |
96 | scene = calloc(1, sizeof(Scene_Data)); | 96 | scene = calloc(1, sizeof(Scene_Data)); |
97 | 97 | ||
98 | // TODO - I have no idea how this should work. | 98 | scene->root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); |
99 | // It seems the people that wrote the examples don't know either. lol | ||
100 | // scene->root_node = eo_add(EVAS_3D_NODE_CLASS, evas, EVAS_3D_NODE_TYPE_NODE); | ||
101 | scene->root_node = evas_3d_node_add(evas, EVAS_3D_NODE_TYPE_NODE); | ||
102 | 99 | ||
103 | // -TODO - set the size based on the size of the enclosing window. | 100 | // -TODO - set the size based on the size of the enclosing window. |
104 | scene->scene = eo_add(EVAS_3D_SCENE_CLASS, evas, | 101 | scene->scene = eo_add(EVAS_3D_SCENE_CLASS, evas, |
@@ -127,8 +124,7 @@ Scene_Data *scenriAdd(Evas_Object *win) | |||
127 | evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0), | 124 | evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0), |
128 | evas_3d_light_directional_set(EINA_TRUE) | 125 | evas_3d_light_directional_set(EINA_TRUE) |
129 | ); | 126 | ); |
130 | scene->light_node = evas_3d_node_add(evas, EVAS_3D_NODE_TYPE_LIGHT); | 127 | scene->light_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT), |
131 | eo_do(scene->light_node, | ||
132 | evas_3d_node_light_set(scene->light), | 128 | evas_3d_node_light_set(scene->light), |
133 | evas_3d_node_position_set(1000.0, 0.0, 1000.0), | 129 | evas_3d_node_position_set(1000.0, 0.0, 1000.0), |
134 | 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) | 130 | 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) |