summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:24:08 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commitf24210caac8d50940ddef858994571be59179c10 (patch)
treecfc8b264e77abbab9827517d1827f9a4fb4dcd50 /src/examples
parent9fdac37187e35f45570c3808011d0283c658652d (diff)
Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757b6332306264d7f126b15ba7bfd37d4.
Diffstat (limited to '')
-rw-r--r--src/examples/ecore/ecore_audio_custom.c4
-rw-r--r--src/examples/ecore/ecore_audio_playback.c6
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c4
-rw-r--r--src/examples/eldbus/dbusmodel.c2
-rw-r--r--src/examples/evas/evas-3d-aabb.c32
-rw-r--r--src/examples/evas/evas-3d-blending.c31
-rw-r--r--src/examples/evas/evas-3d-colorpick.c10
-rw-r--r--src/examples/evas/evas-3d-cube-rotate.c20
-rw-r--r--src/examples/evas/evas-3d-cube.c24
-rw-r--r--src/examples/evas/evas-3d-cube2.c34
-rw-r--r--src/examples/evas/evas-3d-eet.c24
-rw-r--r--src/examples/evas/evas-3d-fog.c34
-rw-r--r--src/examples/evas/evas-3d-frustum.c33
-rw-r--r--src/examples/evas/evas-3d-hull.c36
-rw-r--r--src/examples/evas/evas-3d-md2.c24
-rw-r--r--src/examples/evas/evas-3d-mmap-set.c18
-rw-r--r--src/examples/evas/evas-3d-obj.c20
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c32
-rw-r--r--src/examples/evas/evas-3d-pick.c21
-rw-r--r--src/examples/evas/evas-3d-ply.c18
-rw-r--r--src/examples/evas/evas-3d-proxy.c28
-rw-r--r--src/examples/evas/evas-3d-shadows.c78
-rw-r--r--src/examples/evas/evas-vg-simple.c34
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter-header.c10
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c20
25 files changed, 316 insertions, 281 deletions
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 6eb1add..2570a9e 100644
--- a/src/examples/ecore/ecore_audio_custom.c
+++ b/src/examples/ecore/ecore_audio_custom.c
@@ -56,9 +56,9 @@ main(int argc, const char *argv[])
56 56
57 ecore_app_args_set(argc, argv); 57 ecore_app_args_set(argc, argv);
58 58
59 eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 59 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
60 60
61 eo_add(&in, ECORE_AUDIO_OBJ_IN_CLASS, NULL); 61 in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL);
62 if (!in) 62 if (!in)
63 { 63 {
64 printf("error when creating ecore audio source.\n"); 64 printf("error when creating ecore audio source.\n");
diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c
index a6e6c5e..f1624e0 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -252,7 +252,7 @@ main(int argc, const char *argv[])
252 { 252 {
253 if (!strncmp(argv[i], "tone:", 5)) 253 if (!strncmp(argv[i], "tone:", 5))
254 { 254 {
255 eo_add(&in, ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL); 255 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
256 if (!in) 256 if (!in)
257 { 257 {
258 printf("error when creating ecore audio source.\n"); 258 printf("error when creating ecore audio source.\n");
@@ -276,7 +276,7 @@ main(int argc, const char *argv[])
276 } 276 }
277 else 277 else
278 { 278 {
279 eo_add(&in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 279 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
280 if (!in) 280 if (!in)
281 { 281 {
282 printf("error when creating ecore audio source.\n"); 282 printf("error when creating ecore audio source.\n");
@@ -307,7 +307,7 @@ main(int argc, const char *argv[])
307 307
308 printf("Start: %s (%0.2fs)\n", name, length); 308 printf("Start: %s (%0.2fs)\n", name, length);
309 309
310 eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 310 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
311 ret = ecore_audio_obj_out_input_attach(out, in); 311 ret = ecore_audio_obj_out_input_attach(out, in);
312 if (!ret) 312 if (!ret)
313 printf("Could not attach input %s\n", name); 313 printf("Could not attach input %s\n", name);
diff --git a/src/examples/ecore/ecore_audio_to_ogg.c b/src/examples/ecore/ecore_audio_to_ogg.c
index 62e721b..fceed59 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+++ b/src/examples/ecore/ecore_audio_to_ogg.c
@@ -49,7 +49,7 @@ main(int argc, char *argv[])
49 ecore_audio_init(); 49 ecore_audio_init();
50 50
51 51
52 eo_add(&in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 52 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
53 ecore_audio_obj_name_set(in, basename(argv[1])); 53 ecore_audio_obj_name_set(in, basename(argv[1]));
54 ret = ecore_audio_obj_source_set(in, argv[1]); 54 ret = ecore_audio_obj_source_set(in, argv[1]);
55 if (!ret) { 55 if (!ret) {
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
60 60
61 eo_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL); 61 eo_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL);
62 62
63 eo_add(&out, ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 63 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
64 ret = ecore_audio_obj_source_set(out, argv[2]); 64 ret = ecore_audio_obj_source_set(out, argv[2]);
65 if (!ret) { 65 if (!ret) {
66 printf("Could not set %s as output\n", argv[2]); 66 printf("Could not set %s as output\n", argv[2]);
diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index 3e4063e..b34799b 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -102,7 +102,7 @@ main(int argc, char **argv EINA_UNUSED)
102 if (argc > 1) bus = argv[1]; 102 if (argc > 1) bus = argv[1];
103 if (argc > 2) path = argv[2]; 103 if (argc > 2) path = argv[2];
104 104
105 eo_add_ref(&root, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(root, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path)); 105 root = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path));
106 106
107 eo_event_callback_add(root, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL); 107 eo_event_callback_add(root, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL);
108 efl_model_load(root); 108 efl_model_load(root);
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index a676185..d02668b 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -142,38 +142,40 @@ main(void)
142 142
143 evas = ecore_evas_get(ecore_evas); 143 evas = ecore_evas_get(ecore_evas);
144 144
145 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 145 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
146 146
147 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 147 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
148 148
149 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 149 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
150 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 150 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
151 151
152 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 152 camera_node =
153 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
153 evas_canvas3d_node_camera_set(camera_node, camera); 154 evas_canvas3d_node_camera_set(camera_node, camera);
154 evas_canvas3d_node_member_add(root_node, camera_node); 155 evas_canvas3d_node_member_add(root_node, camera_node);
155 evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0); 156 evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0);
156 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0); 157 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
157 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 158 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
158 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 159 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
159 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 160 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
160 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 161 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
161 evas_canvas3d_light_directional_set(light, EINA_TRUE); 162 evas_canvas3d_light_directional_set(light, EINA_TRUE);
162 163
163 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 164 light_node =
165 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
164 evas_canvas3d_node_light_set(light_node, light); 166 evas_canvas3d_node_light_set(light_node, light);
165 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 167 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
166 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 168 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
167 evas_canvas3d_node_member_add(root_node, light_node); 169 evas_canvas3d_node_member_add(root_node, light_node);
168 170
169 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 171 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
170 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 172 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
171 173
172 efl_file_set(mesh, model_path, NULL); 174 efl_file_set(mesh, model_path, NULL);
173 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 175 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
174 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 176 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
175 177
176 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 178 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
177 evas_canvas3d_texture_file_set(texture, image_path, NULL); 179 evas_canvas3d_texture_file_set(texture, image_path, NULL);
178 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 180 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
179 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 181 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -187,16 +189,16 @@ main(void)
187 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 189 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
188 evas_canvas3d_material_shininess_set(material, 50.0); 190 evas_canvas3d_material_shininess_set(material, 50.0);
189 191
190 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 192 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
191 eo_add(&mesh_box_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_box_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 193 mesh_box_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
192 194
193 eo_add(&material_box, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 195 material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
194 evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 196 evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
195 197
196 eo_add(&cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 198 cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
197 evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 199 evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
198 200
199 eo_add(&mesh_box, EVAS_CANVAS3D_MESH_CLASS, evas); 201 mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
200 evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube); 202 evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube);
201 evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES); 203 evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
202 evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR); 204 evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR);
@@ -213,7 +215,7 @@ main(void)
213 evas_canvas3d_scene_camera_node_set(scene, camera_node); 215 evas_canvas3d_scene_camera_node_set(scene, camera_node);
214 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 216 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
215 217
216 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 218 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
217 efl_gfx_color_set(background, 0, 0, 0, 255); 219 efl_gfx_color_set(background, 0, 0, 0, 255);
218 efl_gfx_size_set(background, WIDTH, HEIGHT); 220 efl_gfx_size_set(background, WIDTH, HEIGHT);
219 efl_gfx_visible_set(background, EINA_TRUE); 221 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-blending.c b/src/examples/evas/evas-3d-blending.c
index 90ee461..db7c7a1 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -143,11 +143,12 @@ _animate_scene(void *data)
143static void 143static void
144_camera_setup(Scene_Data *data) 144_camera_setup(Scene_Data *data)
145{ 145{
146 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 146 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
147 147
148 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 148 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
149 149
150 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 150 data->camera_node =
151 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
151 152
152 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 153 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
153 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 154 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
@@ -159,12 +160,13 @@ _camera_setup(Scene_Data *data)
159static void 160static void
160_light_setup(Scene_Data *data) 161_light_setup(Scene_Data *data)
161{ 162{
162 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 163 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
163 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 164 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
164 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 165 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
165 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 166 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
166 167
167 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 168 data->light_node =
169 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
168 evas_canvas3d_node_light_set(data->light_node, data->light); 170 evas_canvas3d_node_light_set(data->light_node, data->light);
169 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 171 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
170 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 172 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -182,7 +184,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
182static void 184static void
183_mesh_setup(Scene_Data *data) 185_mesh_setup(Scene_Data *data)
184{ 186{
185 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 187 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
186 188
187 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 189 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
188 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 190 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -192,7 +194,7 @@ _mesh_setup(Scene_Data *data)
192 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2); 194 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
193 evas_canvas3d_material_shininess_set(data->material, 100.0); 195 evas_canvas3d_material_shininess_set(data->material, 100.0);
194 196
195 eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 197 data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
196 198
197 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 199 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
198 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 200 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -202,22 +204,24 @@ _mesh_setup(Scene_Data *data)
202 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2); 204 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
203 evas_canvas3d_material_shininess_set(data->material1, 100.0); 205 evas_canvas3d_material_shininess_set(data->material1, 100.0);
204 206
205 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 207 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
206 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 208 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
207 evas_canvas3d_primitive_precision_set(data->sphere, 50); 209 evas_canvas3d_primitive_precision_set(data->sphere, 50);
208 210
209 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 211 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
210 eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas); 212 data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
211 213
212 _set_ball(data->mesh, data->sphere, data->material); 214 _set_ball(data->mesh, data->sphere, data->material);
213 _set_ball(data->mesh1, data->sphere, data->material1); 215 _set_ball(data->mesh1, data->sphere, data->material1);
214 216
215 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 217 data->mesh_node =
218 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
216 219
217 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 220 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
218 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 221 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
219 222
220 eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH)); 223 data->mesh_node1 =
224 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
221 225
222 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1); 226 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
223 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1); 227 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -233,12 +237,13 @@ _mesh_setup(Scene_Data *data)
233static void 237static void
234_scene_setup(Scene_Data *data) 238_scene_setup(Scene_Data *data)
235{ 239{
236 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 240 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
237 241
238 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 242 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
239 evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1); 243 evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1);
240 244
241 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 245 data->root_node =
246 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
242 247
243 _camera_setup(data); 248 _camera_setup(data);
244 _light_setup(data); 249 _light_setup(data);
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index 4a7594b..885a53b 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -237,9 +237,9 @@ Eina_Bool
237_init_sphere(void *this, const char *texture) 237_init_sphere(void *this, const char *texture)
238{ 238{
239 Test_object *sphere = (Test_object *)this; 239 Test_object *sphere = (Test_object *)this;
240 eo_add(&sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 240 sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
241 eo_add(&sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 241 sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
242 eo_add(&sphere->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 242 sphere->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
243 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 243 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
244 evas_canvas3d_primitive_precision_set(sphere->primitive, 50); 244 evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
245 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive); 245 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
@@ -248,7 +248,7 @@ _init_sphere(void *this, const char *texture)
248 248
249 evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE); 249 evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE);
250 250
251 eo_add(&sphere->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 251 sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
252 evas_canvas3d_texture_file_set(sphere->texture, texture, NULL); 252 evas_canvas3d_texture_file_set(sphere->texture, texture, NULL);
253 evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 253 evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
254 evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 254 evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -313,7 +313,7 @@ _init_scene(const char *texture)
313 m->material = spheretmp->material; 313 m->material = spheretmp->material;
314 m->texture = spheretmp->texture; 314 m->texture = spheretmp->texture;
315 } 315 }
316 eo_add(&m->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(m->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 316 m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
317 m->speed = tmp; 317 m->speed = tmp;
318 m->sphere_animate = _animate_sphere; 318 m->sphere_animate = _animate_sphere;
319 m->animate = ecore_timer_add(m->speed, m->sphere_animate, m); 319 m->animate = ecore_timer_add(m->speed, m->sphere_animate, m);
diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c
index 74525cc..e393c14 100644
--- a/src/examples/evas/evas-3d-cube-rotate.c
+++ b/src/examples/evas/evas-3d-cube-rotate.c
@@ -148,10 +148,10 @@ _animate_scene(void *data)
148static void 148static void
149_camera_setup(Scene_Data *data) 149_camera_setup(Scene_Data *data)
150{ 150{
151 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 151 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
152 evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0); 152 evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0);
153 153
154 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 154 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
155 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 155 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
156 evas_canvas3d_node_position_set(data->camera_node, 3.0, 3.0, 10.0); 156 evas_canvas3d_node_position_set(data->camera_node, 3.0, 3.0, 10.0);
157 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 157 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -162,13 +162,13 @@ _camera_setup(Scene_Data *data)
162static void 162static void
163_light_setup(Scene_Data *data) 163_light_setup(Scene_Data *data)
164{ 164{
165 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 165 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
166 166
167 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 167 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
168 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 168 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
169 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 169 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
170 170
171 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 171 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
172 172
173 evas_canvas3d_node_light_set(data->light_node, data->light); 173 evas_canvas3d_node_light_set(data->light_node, data->light);
174 evas_canvas3d_node_position_set(data->light_node, 5.0, 5.0, 10.0); 174 evas_canvas3d_node_position_set(data->light_node, 5.0, 5.0, 10.0);
@@ -181,7 +181,7 @@ static void
181_mesh_setup(Scene_Data *data) 181_mesh_setup(Scene_Data *data)
182{ 182{
183 /* Setup material. */ 183 /* Setup material. */
184 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 184 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
185 185
186 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 186 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
187 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 187 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -192,16 +192,16 @@ _mesh_setup(Scene_Data *data)
192 evas_canvas3d_material_shininess_set(data->material, 100.0); 192 evas_canvas3d_material_shininess_set(data->material, 100.0);
193 193
194 /* Setup primitive */ 194 /* Setup primitive */
195 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 195 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
196 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 196 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
197 197
198 /* Setup mesh. */ 198 /* Setup mesh. */
199 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 199 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
200 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 200 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
201 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 201 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
202 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 202 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
203 203
204 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 204 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
205 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 205 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
206 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 206 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
207} 207}
@@ -209,8 +209,8 @@ _mesh_setup(Scene_Data *data)
209static void 209static void
210_scene_setup(Scene_Data *data) 210_scene_setup(Scene_Data *data)
211{ 211{
212 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 212 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
213 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 213 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
214 214
215 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 215 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
216 evas_canvas3d_scene_background_color_set(scene, 0.0, 0.0, 0.0, 0.0); 216 evas_canvas3d_scene_background_color_set(scene, 0.0, 0.0, 0.0, 0.0);
diff --git a/src/examples/evas/evas-3d-cube.c b/src/examples/evas/evas-3d-cube.c
index be29e04..6f6f420 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -133,11 +133,12 @@ _animate_scene(void *data)
133static void 133static void
134_camera_setup(Scene_Data *data) 134_camera_setup(Scene_Data *data)
135{ 135{
136 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 136 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
137 137
138 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 138 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
139 139
140 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 140 data->camera_node =
141 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
141 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 142 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
142 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 143 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
143 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 144 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -147,12 +148,13 @@ _camera_setup(Scene_Data *data)
147static void 148static void
148_light_setup(Scene_Data *data) 149_light_setup(Scene_Data *data)
149{ 150{
150 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 151 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
151 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 152 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
152 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 153 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
153 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 154 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
154 155
155 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 156 data->light_node =
157 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
156 evas_canvas3d_node_light_set(data->light_node, data->light); 158 evas_canvas3d_node_light_set(data->light_node, data->light);
157 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 159 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
158 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 160 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -162,7 +164,7 @@ static void
162_mesh_setup(Scene_Data *data) 164_mesh_setup(Scene_Data *data)
163{ 165{
164 /* Setup material. */ 166 /* Setup material. */
165 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 167 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
166 168
167 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 169 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
168 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 170 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -173,7 +175,7 @@ _mesh_setup(Scene_Data *data)
173 evas_canvas3d_material_shininess_set(data->material, 100.0); 175 evas_canvas3d_material_shininess_set(data->material, 100.0);
174 176
175 /* Setup mesh. */ 177 /* Setup mesh. */
176 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 178 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
177 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24); 179 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
178 evas_canvas3d_mesh_frame_add(data->mesh, 0); 180 evas_canvas3d_mesh_frame_add(data->mesh, 0);
179 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]); 181 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
@@ -185,7 +187,8 @@ _mesh_setup(Scene_Data *data)
185 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 187 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
186 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 188 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
187 189
188 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 190 data->mesh_node =
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
189 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
190 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
191} 194}
@@ -193,11 +196,12 @@ _mesh_setup(Scene_Data *data)
193static void 196static void
194_scene_setup(Scene_Data *data) 197_scene_setup(Scene_Data *data)
195{ 198{
196 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 199 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
197 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
198 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
199 202
200 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 203 data->root_node =
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
201 205
202 _camera_setup(data); 206 _camera_setup(data);
203 _light_setup(data); 207 _light_setup(data);
@@ -229,7 +233,7 @@ main(void)
229 _scene_setup(&data); 233 _scene_setup(&data);
230 234
231 /* Add a background rectangle objects. */ 235 /* Add a background rectangle objects. */
232 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 236 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
233 efl_gfx_color_set(background, 0, 0, 0, 255); 237 efl_gfx_color_set(background, 0, 0, 0, 255);
234 efl_gfx_size_set(background, WIDTH, HEIGHT); 238 efl_gfx_size_set(background, WIDTH, HEIGHT);
235 efl_gfx_visible_set(background, EINA_TRUE); 239 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index 387edd8..e46c2f7 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -111,10 +111,11 @@ _animate_scene(void *data)
111static void 111static void
112_camera_setup(Scene_Data *data) 112_camera_setup(Scene_Data *data)
113{ 113{
114 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 114 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
115 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 115 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
116 116
117 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 117 data->camera_node =
118 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
118 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 119 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
119 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0); 120 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0);
120 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 121 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -124,12 +125,13 @@ _camera_setup(Scene_Data *data)
124static void 125static void
125_light_setup(Scene_Data *data) 126_light_setup(Scene_Data *data)
126{ 127{
127 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 128 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
128 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 129 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
129 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 130 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
130 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 131 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
131 132
132 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 133 data->light_node =
134 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
133 evas_canvas3d_node_light_set(data->light_node, data->light); 135 evas_canvas3d_node_light_set(data->light_node, data->light);
134 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 136 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
135 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 137 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -140,8 +142,8 @@ static void
140_mesh_setup(Scene_Data *data) 142_mesh_setup(Scene_Data *data)
141{ 143{
142 /* Setup material. */ 144 /* Setup material. */
143 eo_add(&data->material0, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 145 data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
144 eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 146 data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
145 147
146 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 148 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
147 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 149 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -161,9 +163,9 @@ _mesh_setup(Scene_Data *data)
161 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 163 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
162 evas_canvas3d_material_shininess_set(data->material1, 100.0); 164 evas_canvas3d_material_shininess_set(data->material1, 100.0);
163 165
164 eo_add(&data->texture0, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 166 data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
165 eo_add(&data->texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 167 data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
166 eo_add(&data->texture_normal, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 168 data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
167 169
168 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]); 170 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]);
169 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]); 171 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]);
@@ -174,18 +176,19 @@ _mesh_setup(Scene_Data *data)
174 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal); 176 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal);
175 177
176 /* Set data of primitive */ 178 /* Set data of primitive */
177 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 179 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
178 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 180 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
179 181
180 /* Setup mesh. */ 182 /* Setup mesh. */
181 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 183 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
182 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 184 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
183 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0); 185 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0);
184 evas_canvas3d_mesh_frame_add(data->mesh, 20); 186 evas_canvas3d_mesh_frame_add(data->mesh, 20);
185 evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1); 187 evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1);
186 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP); 188 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
187 189
188 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 190 data->mesh_node =
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
189 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
190 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
191} 194}
@@ -193,11 +196,12 @@ _mesh_setup(Scene_Data *data)
193static void 196static void
194_scene_setup(Scene_Data *data) 197_scene_setup(Scene_Data *data)
195{ 198{
196 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 199 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
197 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
198 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
199 202
200 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 203 data->root_node =
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
201 205
202 _camera_setup(data); 206 _camera_setup(data);
203 _light_setup(data); 207 _light_setup(data);
@@ -230,7 +234,7 @@ main(void)
230 _scene_setup(&data); 234 _scene_setup(&data);
231 235
232 /* Add a background rectangle objects. */ 236 /* Add a background rectangle objects. */
233 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 237 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
234 efl_gfx_color_set(background, 0, 0, 0, 255); 238 efl_gfx_color_set(background, 0, 0, 0, 255);
235 efl_gfx_size_set(background, WIDTH, HEIGHT); 239 efl_gfx_size_set(background, WIDTH, HEIGHT);
236 efl_gfx_visible_set(background, EINA_TRUE); 240 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index 69fca12..dc09191 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -115,37 +115,37 @@ main(void)
115 evas = ecore_evas_get(ecore_evas); 115 evas = ecore_evas_get(ecore_evas);
116 116
117 /* Add a scene object .*/ 117 /* Add a scene object .*/
118 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 118 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
119 119
120 /* Add the root node for the scene. */ 120 /* Add the root node for the scene. */
121 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 121 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
122 122
123 /* Add the camera. */ 123 /* Add the camera. */
124 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 124 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
125 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 125 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
126 126
127 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 127 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
128 evas_canvas3d_node_camera_set(camera_node, camera); 128 evas_canvas3d_node_camera_set(camera_node, camera);
129 evas_canvas3d_node_member_add(root_node, camera_node); 129 evas_canvas3d_node_member_add(root_node, camera_node);
130 evas_canvas3d_node_position_set(camera_node, 200.0, 0.0, 40.0); 130 evas_canvas3d_node_position_set(camera_node, 200.0, 0.0, 40.0);
131 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0); 131 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
132 /* Add the light. */ 132 /* Add the light. */
133 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 133 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
134 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 134 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
135 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 135 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
136 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 136 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
137 evas_canvas3d_light_directional_set(light, EINA_TRUE); 137 evas_canvas3d_light_directional_set(light, EINA_TRUE);
138 138
139 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 139 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
140 evas_canvas3d_node_light_set(light_node, light); 140 evas_canvas3d_node_light_set(light_node, light);
141 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 141 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
142 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 142 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
143 evas_canvas3d_node_member_add(root_node, light_node); 143 evas_canvas3d_node_member_add(root_node, light_node);
144 144
145 /* Add the meshes. */ 145 /* Add the meshes. */
146 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 146 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
147 eo_add(&mesh2, EVAS_CANVAS3D_MESH_CLASS, evas); 147 mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
148 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 148 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
149 149
150 efl_file_set(mesh, input_model_path, NULL); 150 efl_file_set(mesh, input_model_path, NULL);
151 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 151 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
@@ -169,13 +169,13 @@ main(void)
169 efl_file_set(mesh2, output_model_path, NULL); 169 efl_file_set(mesh2, output_model_path, NULL);
170 evas_canvas3d_mesh_shade_mode_set(mesh2, EVAS_CANVAS3D_SHADE_MODE_PHONG); 170 evas_canvas3d_mesh_shade_mode_set(mesh2, EVAS_CANVAS3D_SHADE_MODE_PHONG);
171 171
172 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 172 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
173 173
174 evas_canvas3d_node_member_add(root_node, mesh_node); 174 evas_canvas3d_node_member_add(root_node, mesh_node);
175 evas_canvas3d_node_mesh_add(mesh_node, mesh); 175 evas_canvas3d_node_mesh_add(mesh_node, mesh);
176 evas_canvas3d_node_position_set(mesh_node, 0.0, -40.0, 0.0); 176 evas_canvas3d_node_position_set(mesh_node, 0.0, -40.0, 0.0);
177 177
178 eo_add(&mesh_node2, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node2, EVAS_CANVAS3D_NODE_TYPE_MESH)); 178 mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
179 evas_canvas3d_node_member_add(root_node, mesh_node2); 179 evas_canvas3d_node_member_add(root_node, mesh_node2);
180 evas_canvas3d_node_mesh_add(mesh_node2, mesh2); 180 evas_canvas3d_node_mesh_add(mesh_node2, mesh2);
181 evas_canvas3d_node_position_set(mesh_node2, 0.0, 40.0, 0.0); 181 evas_canvas3d_node_position_set(mesh_node2, 0.0, 40.0, 0.0);
@@ -186,7 +186,7 @@ main(void)
186 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 186 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
187 187
188 /* Add a background rectangle objects. */ 188 /* Add a background rectangle objects. */
189 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 189 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
190 efl_gfx_color_set(background, 0, 0, 0, 255); 190 efl_gfx_color_set(background, 0, 0, 0, 255);
191 efl_gfx_size_set(background, WIDTH, HEIGHT); 191 efl_gfx_size_set(background, WIDTH, HEIGHT);
192 efl_gfx_visible_set(background, EINA_TRUE); 192 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c
index bc33f92..33bd05c 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -81,11 +81,12 @@ _animate_scene(void *data)
81static void 81static void
82_camera_setup(Scene_Data *data) 82_camera_setup(Scene_Data *data)
83{ 83{
84 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 84 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
85 85
86 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 86 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
87 87
88 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 88 data->camera_node =
89 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
89 90
90 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 91 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
91 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0); 92 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0);
@@ -97,12 +98,13 @@ _camera_setup(Scene_Data *data)
97static void 98static void
98_light_setup(Scene_Data *data) 99_light_setup(Scene_Data *data)
99{ 100{
100 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 101 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
101 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 102 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
102 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 103 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
103 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 104 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
104 105
105 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 106 data->light_node =
107 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
106 evas_canvas3d_node_light_set(data->light_node, data->light); 108 evas_canvas3d_node_light_set(data->light_node, data->light);
107 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 109 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
108 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 110 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -121,7 +123,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
121static void 123static void
122_mesh_setup(Scene_Data *data) 124_mesh_setup(Scene_Data *data)
123{ 125{
124 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 126 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
125 127
126 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 128 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
127 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 129 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -131,26 +133,29 @@ _mesh_setup(Scene_Data *data)
131 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 133 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
132 evas_canvas3d_material_shininess_set(data->material, 100.0); 134 evas_canvas3d_material_shininess_set(data->material, 100.0);
133 135
134 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 136 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
135 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 137 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
136 evas_canvas3d_primitive_precision_set(data->sphere, 50); 138 evas_canvas3d_primitive_precision_set(data->sphere, 50);
137 139
138 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 140 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
139 eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas); 141 data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
140 142
141 _set_ball(data->mesh, data->sphere, data->material); 143 _set_ball(data->mesh, data->sphere, data->material);
142 _set_ball(data->mesh1, data->sphere, data->material); 144 _set_ball(data->mesh1, data->sphere, data->material);
143 145
144 eo_add(&data->animation_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->animation_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 146 data->animation_node =
147 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
145 148
146 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 149 data->mesh_node =
150 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
147 151
148 evas_canvas3d_node_member_add(data->animation_node, data->mesh_node); 152 evas_canvas3d_node_member_add(data->animation_node, data->mesh_node);
149 evas_canvas3d_node_member_add(data->root_node, data->animation_node); 153 evas_canvas3d_node_member_add(data->root_node, data->animation_node);
150 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 154 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
151 evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0); 155 evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0);
152 156
153 eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH)); 157 data->mesh_node1 =
158 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
154 159
155 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1); 160 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
156 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1); 161 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -165,12 +170,13 @@ _mesh_setup(Scene_Data *data)
165static void 170static void
166_scene_setup(Scene_Data *data) 171_scene_setup(Scene_Data *data)
167{ 172{
168 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 173 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
169 174
170 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 175 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
171 evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1); 176 evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1);
172 177
173 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 178 data->root_node =
179 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
174 180
175 _camera_setup(data); 181 _camera_setup(data);
176 _light_setup(data); 182 _light_setup(data);
@@ -203,7 +209,7 @@ main(void)
203 _scene_setup(&data); 209 _scene_setup(&data);
204 210
205 /* Add a background rectangle objects. */ 211 /* Add a background rectangle objects. */
206 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 212 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
207 efl_gfx_color_set(background, 0, 0, 0, 255); 213 efl_gfx_color_set(background, 0, 0, 0, 255);
208 efl_gfx_size_set(background, WIDTH, HEIGHT); 214 efl_gfx_size_set(background, WIDTH, HEIGHT);
209 efl_gfx_visible_set(background, EINA_TRUE); 215 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c
index 25cfc5b..4e1323f 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -279,8 +279,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
279static void 279static void
280_camera_setup(Scene_Data *data) 280_camera_setup(Scene_Data *data)
281{ 281{
282 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 282 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
283 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 283 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
284 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 284 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
285 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 300.0); 285 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 300.0);
286 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 286 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -293,12 +293,12 @@ _camera_setup(Scene_Data *data)
293static void 293static void
294_light_setup(Scene_Data *data) 294_light_setup(Scene_Data *data)
295{ 295{
296 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 296 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
297 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 297 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
298 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 298 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
299 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 299 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
300 300
301 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 301 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
302 evas_canvas3d_node_light_set(data->light_node, data->light); 302 evas_canvas3d_node_light_set(data->light_node, data->light);
303 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 200.0); 303 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 200.0);
304 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0); 304 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
@@ -309,7 +309,7 @@ _light_setup(Scene_Data *data)
309static void 309static void
310_mesh_setup(Scene_Data *data) 310_mesh_setup(Scene_Data *data)
311{ 311{
312 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 312 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
313 313
314 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 314 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
315 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 315 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -319,26 +319,27 @@ _mesh_setup(Scene_Data *data)
319 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 319 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
320 evas_canvas3d_material_shininess_set(data->material, 100.0); 320 evas_canvas3d_material_shininess_set(data->material, 100.0);
321 321
322 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 322 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
323 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 323 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
324 324
325 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 325 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
326 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 326 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
327 evas_canvas3d_primitive_precision_set(data->sphere, 20); 327 evas_canvas3d_primitive_precision_set(data->sphere, 20);
328 328
329 eo_add(&data->mesh_aabb, EVAS_CANVAS3D_MESH_CLASS, evas); 329 data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
330 evas_canvas3d_mesh_from_primitive_set(data->mesh_aabb, 0, data->cube); 330 evas_canvas3d_mesh_from_primitive_set(data->mesh_aabb, 0, data->cube);
331 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_aabb, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES); 331 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_aabb, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
332 evas_canvas3d_mesh_shade_mode_set(data->mesh_aabb, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE); 332 evas_canvas3d_mesh_shade_mode_set(data->mesh_aabb, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
333 evas_canvas3d_mesh_frame_material_set(data->mesh_aabb, 0, data->material); 333 evas_canvas3d_mesh_frame_material_set(data->mesh_aabb, 0, data->material);
334 334
335 eo_add(&data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas); 335 data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
336 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, data->sphere); 336 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, data->sphere);
337 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES); 337 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
338 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE); 338 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
339 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material); 339 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
340 340
341 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 341 data->mesh_node =
342 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
342 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 343 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
343 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb); 344 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb);
344} 345}
@@ -346,9 +347,9 @@ _mesh_setup(Scene_Data *data)
346static void 347static void
347_mesh_setup_model(Scene_Data *data) 348_mesh_setup_model(Scene_Data *data)
348{ 349{
349 eo_add(&data->mesh_model, EVAS_CANVAS3D_MESH_CLASS, evas); 350 data->mesh_model = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
350 eo_add(&data->material_model, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 351 data->material_model = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
351 eo_add(&data->texture_model, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 352 data->texture_model = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
352 353
353 evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL); 354 evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL);
354 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 355 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
@@ -373,15 +374,15 @@ _mesh_setup_model(Scene_Data *data)
373static void 374static void
374_scene_setup(Scene_Data *data) 375_scene_setup(Scene_Data *data)
375{ 376{
376 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 377 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
377 378
378 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 379 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
379 380
380 _light_setup(data); 381 _light_setup(data);
381 _mesh_setup_model(data); 382 _mesh_setup_model(data);
382 _camera_setup(data); 383 _camera_setup(data);
383 384
384 eo_add(&data->mesh_node_model, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_model, EVAS_CANVAS3D_NODE_TYPE_MESH)); 385 data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
385 evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z); 386 evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z);
386 evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0); 387 evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0);
387 evas_canvas3d_node_scale_set(data->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z); 388 evas_canvas3d_node_scale_set(data->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index 130ad37..57602b6 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -255,11 +255,12 @@ _key_down(void *data,
255static void 255static void
256_camera_setup(Scene_Data *data) 256_camera_setup(Scene_Data *data)
257{ 257{
258 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 258 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
259 259
260 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 260 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
261 261
262 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 262 data->camera_node =
263 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
263 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 264 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
264 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 265 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
265 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 266 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -269,12 +270,13 @@ _camera_setup(Scene_Data *data)
269static void 270static void
270_light_setup(Scene_Data *data) 271_light_setup(Scene_Data *data)
271{ 272{
272 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 273 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
273 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 274 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
274 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 275 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
275 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 276 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
276 277
277 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 278 data->light_node =
279 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
278 evas_canvas3d_node_light_set(data->light_node, data->light); 280 evas_canvas3d_node_light_set(data->light_node, data->light);
279 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 281 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
280 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 282 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -290,7 +292,7 @@ _mesh_setup(Scene_Data *data)
290 Eo *primitive = NULL; 292 Eo *primitive = NULL;
291 /* Setup material. */ 293 /* Setup material. */
292 294
293 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 295 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
294 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 296 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
295 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 297 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
296 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); 298 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -300,17 +302,17 @@ _mesh_setup(Scene_Data *data)
300 evas_canvas3d_material_shininess_set(data->material, 100.0); 302 evas_canvas3d_material_shininess_set(data->material, 100.0);
301 303
302 /* Setup mesh sphere */ 304 /* Setup mesh sphere */
303 eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 305 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
304 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 306 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
305 evas_canvas3d_primitive_precision_set(primitive, 10); 307 evas_canvas3d_primitive_precision_set(primitive, 10);
306 eo_add(&data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas); 308 data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
307 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive); 309 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive);
308 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); 310 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
309 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG); 311 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG);
310 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material); 312 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
311 313
312 /* Setup mesh torus */ 314 /* Setup mesh torus */
313 eo_add(&data->mesh_torus, EVAS_CANVAS3D_MESH_CLASS, evas); 315 data->mesh_torus = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
314 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS); 316 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS);
315 evas_canvas3d_primitive_precision_set(primitive, 50); 317 evas_canvas3d_primitive_precision_set(primitive, 50);
316 evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive); 318 evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive);
@@ -319,7 +321,7 @@ _mesh_setup(Scene_Data *data)
319 evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material); 321 evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material);
320 322
321 /* Setup mesh cube */ 323 /* Setup mesh cube */
322 eo_add(&data->mesh_cube, EVAS_CANVAS3D_MESH_CLASS, evas); 324 data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
323 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 325 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
324 evas_canvas3d_primitive_precision_set(primitive, 50); 326 evas_canvas3d_primitive_precision_set(primitive, 50);
325 evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive); 327 evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive);
@@ -351,7 +353,8 @@ _mesh_setup(Scene_Data *data)
351 MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE) 353 MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE)
352 MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE) 354 MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE)
353 355
354 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 356 data->mesh_node =
357 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
355 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 358 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
356 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere); 359 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere);
357 evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 360 evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -368,13 +371,15 @@ _mesh_setup(Scene_Data *data)
368 371
369 _print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere); 372 _print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere);
370 373
371 eo_add(&data->mesh_node_convex_hull, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_convex_hull, EVAS_CANVAS3D_NODE_TYPE_MESH)); 374 data->mesh_node_convex_hull =
375 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
372 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull); 376 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull);
373 evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0); 377 evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0);
374 evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 378 evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
375 evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch); 379 evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch);
376 380
377 eo_add(&data->mesh_node_blender, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_blender, EVAS_CANVAS3D_NODE_TYPE_MESH)); 381 data->mesh_node_blender =
382 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
378 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender); 383 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender);
379 evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0); 384 evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0);
380 evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 385 evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -384,11 +389,12 @@ _mesh_setup(Scene_Data *data)
384static void 389static void
385_scene_setup(Scene_Data *data) 390_scene_setup(Scene_Data *data)
386{ 391{
387 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 392 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
388 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 393 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
389 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 394 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
390 395
391 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 396 data->root_node =
397 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
392 398
393 _camera_setup(data); 399 _camera_setup(data);
394 _light_setup(data); 400 _light_setup(data);
@@ -423,7 +429,7 @@ main(void)
423 _scene_setup(&data); 429 _scene_setup(&data);
424 430
425 /* Add a background rectangle objects. */ 431 /* Add a background rectangle objects. */
426 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 432 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
427 efl_gfx_color_set(background, 0, 0, 0, 255); 433 efl_gfx_color_set(background, 0, 0, 0, 255);
428 efl_gfx_size_set(background, WIDTH, HEIGHT); 434 efl_gfx_size_set(background, WIDTH, HEIGHT);
429 efl_gfx_visible_set(background, EINA_TRUE); 435 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index 443271a..e19dfd6 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -91,42 +91,44 @@ main(void)
91 evas = ecore_evas_get(ecore_evas); 91 evas = ecore_evas_get(ecore_evas);
92 92
93 /* Add a scene object .*/ 93 /* Add a scene object .*/
94 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 94 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
95 95
96 /* Add the root node for the scene. */ 96 /* Add the root node for the scene. */
97 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 97 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
98 98
99 /* Add the camera. */ 99 /* Add the camera. */
100 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 100 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
101 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 101 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
102 102
103 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 103 camera_node =
104 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
104 evas_canvas3d_node_camera_set(camera_node, camera); 105 evas_canvas3d_node_camera_set(camera_node, camera);
105 evas_canvas3d_node_member_add(root_node, camera_node); 106 evas_canvas3d_node_member_add(root_node, camera_node);
106 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0); 107 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0);
107 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0); 108 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
108 /* Add the light. */ 109 /* Add the light. */
109 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 110 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
110 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 111 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
111 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 112 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
112 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 113 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
113 evas_canvas3d_light_directional_set(light, EINA_TRUE); 114 evas_canvas3d_light_directional_set(light, EINA_TRUE);
114 115
115 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 116 light_node =
117 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
116 evas_canvas3d_node_light_set(light_node, light); 118 evas_canvas3d_node_light_set(light_node, light);
117 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 119 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
118 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 120 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
119 evas_canvas3d_node_member_add(root_node, light_node); 121 evas_canvas3d_node_member_add(root_node, light_node);
120 122
121 /* Add the mesh. */ 123 /* Add the mesh. */
122 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 124 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
123 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 125 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
124 126
125 efl_file_set(mesh, model_path, NULL); 127 efl_file_set(mesh, model_path, NULL);
126 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 128 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
127 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 129 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
128 130
129 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 131 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
130 evas_canvas3d_texture_file_set(texture, image_path, NULL); 132 evas_canvas3d_texture_file_set(texture, image_path, NULL);
131 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 133 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
132 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 134 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -140,7 +142,7 @@ main(void)
140 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 142 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
141 evas_canvas3d_material_shininess_set(material, 50.0); 143 evas_canvas3d_material_shininess_set(material, 50.0);
142 144
143 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 145 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
144 evas_canvas3d_node_member_add(root_node, mesh_node); 146 evas_canvas3d_node_member_add(root_node, mesh_node);
145 evas_canvas3d_node_mesh_add(mesh_node, mesh); 147 evas_canvas3d_node_mesh_add(mesh_node, mesh);
146 148
@@ -150,7 +152,7 @@ main(void)
150 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 152 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
151 153
152 /* Add a background rectangle objects. */ 154 /* Add a background rectangle objects. */
153 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 155 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
154 efl_gfx_color_set(background, 0, 0, 0, 255); 156 efl_gfx_color_set(background, 0, 0, 0, 255);
155 efl_gfx_size_set(background, WIDTH, HEIGHT); 157 efl_gfx_size_set(background, WIDTH, HEIGHT);
156 efl_gfx_visible_set(background, EINA_TRUE); 158 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-mmap-set.c b/src/examples/evas/evas-3d-mmap-set.c
index 2432a4b..000204d 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -181,34 +181,36 @@ main(void)
181 evas = ecore_evas_get(ecore_evas); 181 evas = ecore_evas_get(ecore_evas);
182 182
183 /* Add a scene object .*/ 183 /* Add a scene object .*/
184 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 184 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
185 185
186 /* Add the root node for the scene. */ 186 /* Add the root node for the scene. */
187 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 187 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
188 188
189 /* Add the camera. */ 189 /* Add the camera. */
190 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 190 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
191 evas_canvas3d_camera_projection_perspective_set(camera, 10.0, 1.0, 1.0, 500.0); 191 evas_canvas3d_camera_projection_perspective_set(camera, 10.0, 1.0, 1.0, 500.0);
192 192
193 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 193 camera_node =
194 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
194 evas_canvas3d_node_camera_set(camera_node, camera); 195 evas_canvas3d_node_camera_set(camera_node, camera);
195 evas_canvas3d_node_member_add(root_node, camera_node); 196 evas_canvas3d_node_member_add(root_node, camera_node);
196 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0); 197 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0);
197 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 198 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
198 /* Add the light. */ 199 /* Add the light. */
199 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 200 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
200 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 201 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
201 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 202 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
202 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 203 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
203 evas_canvas3d_light_directional_set(light, EINA_TRUE); 204 evas_canvas3d_light_directional_set(light, EINA_TRUE);
204 205
205 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 206 light_node =
207 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
206 evas_canvas3d_node_light_set(light_node, light); 208 evas_canvas3d_node_light_set(light_node, light);
207 evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0); 209 evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0);
208 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 210 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
209 evas_canvas3d_node_member_add(root_node, light_node); 211 evas_canvas3d_node_member_add(root_node, light_node);
210 212
211 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 213 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
212 214
213 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 215 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
214 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 216 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -231,7 +233,7 @@ main(void)
231 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 233 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
232 234
233 /* Add a background rectangle objects. */ 235 /* Add a background rectangle objects. */
234 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 236 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
235 efl_gfx_color_set(background, 20, 20, 200, 255); 237 efl_gfx_color_set(background, 20, 20, 200, 255);
236 efl_gfx_size_set(background, WIDTH, HEIGHT); 238 efl_gfx_size_set(background, WIDTH, HEIGHT);
237 efl_gfx_visible_set(background, EINA_TRUE); 239 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index f2623f4..b9a6b69 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -63,7 +63,7 @@
63 ADD_OBJ_MESH(buffer, Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material) 63 ADD_OBJ_MESH(buffer, Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material)
64 64
65#define ADD_TEXTURE(name, path) \ 65#define ADD_TEXTURE(name, path) \
66 eo_add(&name, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ 66 name = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
67 evas_canvas3d_texture_file_set(name, path, NULL); \ 67 evas_canvas3d_texture_file_set(name, path, NULL); \
68 evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ 68 evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
69 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ 69 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
@@ -71,7 +71,7 @@
71 EVAS_CANVAS3D_WRAP_MODE_REPEAT); 71 EVAS_CANVAS3D_WRAP_MODE_REPEAT);
72 72
73#define ADD_MATERIAL(name) \ 73#define ADD_MATERIAL(name) \
74 eo_add(&name, EVAS_CANVAS3D_MATERIAL_CLASS, evas); \ 74 name = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
75 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); \ 75 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); \
76 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); \ 76 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); \
77 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); \ 77 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); \
@@ -157,28 +157,30 @@ main(void)
157 evas = ecore_evas_get(ecore_evas); 157 evas = ecore_evas_get(ecore_evas);
158 158
159 /* Add a scene object .*/ 159 /* Add a scene object .*/
160 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 160 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
161 161
162 /* Add the root node for the scene. */ 162 /* Add the root node for the scene. */
163 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 163 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
164 164
165 /* Add the camera. */ 165 /* Add the camera. */
166 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 166 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
167 evas_canvas3d_camera_projection_perspective_set(camera, 20.0, 1.0, 1.0, 500.0); 167 evas_canvas3d_camera_projection_perspective_set(camera, 20.0, 1.0, 1.0, 500.0);
168 168
169 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 169 camera_node =
170 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
170 evas_canvas3d_node_camera_set(camera_node, camera); 171 evas_canvas3d_node_camera_set(camera_node, camera);
171 evas_canvas3d_node_member_add(root_node, camera_node); 172 evas_canvas3d_node_member_add(root_node, camera_node);
172 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0); 173 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0);
173 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0); 174 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
174 /* Add the light. */ 175 /* Add the light. */
175 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 176 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
176 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 177 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
177 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 178 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
178 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 179 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
179 evas_canvas3d_light_directional_set(light, EINA_TRUE); 180 evas_canvas3d_light_directional_set(light, EINA_TRUE);
180 181
181 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 182 light_node =
183 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
182 evas_canvas3d_node_light_set(light_node, light); 184 evas_canvas3d_node_light_set(light_node, light);
183 evas_canvas3d_node_position_set(light_node, 10.0, 0.0, 0.0); 185 evas_canvas3d_node_position_set(light_node, 10.0, 0.0, 0.0);
184 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 186 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -210,7 +212,7 @@ main(void)
210 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 212 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
211 213
212 /* Add a background rectangle MESHES. */ 214 /* Add a background rectangle MESHES. */
213 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 215 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
214 efl_gfx_color_set(background, 0, 0, 0, 255); 216 efl_gfx_color_set(background, 0, 0, 0, 255);
215 efl_gfx_size_set(background, WIDTH, HEIGHT); 217 efl_gfx_size_set(background, WIDTH, HEIGHT);
216 efl_gfx_visible_set(background, EINA_TRUE); 218 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c
index b096dc8..67be665 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -104,11 +104,11 @@ _animate_scene(void *data)
104static void 104static void
105_camera_setup(Scene_Data *data) 105_camera_setup(Scene_Data *data)
106{ 106{
107 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 107 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
108 108
109 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0); 109 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
110 110
111 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 111 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
112 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 112 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
113 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 113 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
114 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 114 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -118,12 +118,12 @@ _camera_setup(Scene_Data *data)
118static void 118static void
119_light_setup(Scene_Data *data) 119_light_setup(Scene_Data *data)
120{ 120{
121 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 121 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
122 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 122 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
123 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 123 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
124 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 124 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
125 125
126 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 126 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
127 evas_canvas3d_node_light_set(data->light_node, data->light); 127 evas_canvas3d_node_light_set(data->light_node, data->light);
128 evas_canvas3d_node_position_set(data->light_node, -20.0, 20.0, 50.0); 128 evas_canvas3d_node_position_set(data->light_node, -20.0, 20.0, 50.0);
129 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 129 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -134,10 +134,10 @@ static void
134_mesh_setup(Scene_Data *data) 134_mesh_setup(Scene_Data *data)
135{ 135{
136 /* Setup material. */ 136 /* Setup material. */
137 eo_add(&data->material_rocks, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 137 data->material_rocks = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
138 138
139 eo_add(&data->texture_rocks, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 139 data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
140 eo_add(&data->texture_rocks_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 140 data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
141 evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL); 141 evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL);
142 evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 142 evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
143 evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL); 143 evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL);
@@ -156,10 +156,10 @@ _mesh_setup(Scene_Data *data)
156 evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 156 evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
157 evas_canvas3d_material_shininess_set(data->material_rocks, 100.0); 157 evas_canvas3d_material_shininess_set(data->material_rocks, 100.0);
158 158
159 eo_add(&data->material_wood, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 159 data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
160 160
161 eo_add(&data->texture_wood, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
162 eo_add(&data->texture_four_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 162 data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
163 evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL); 163 evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL);
164 evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 164 evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
165 evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL); 165 evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL);
@@ -179,11 +179,11 @@ _mesh_setup(Scene_Data *data)
179 evas_canvas3d_material_shininess_set(data->material_wood, 100.0); 179 evas_canvas3d_material_shininess_set(data->material_wood, 100.0);
180 180
181 /* Set data of primitive */ 181 /* Set data of primitive */
182 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 182 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
183 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 183 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
184 184
185 /* Setup mesh. */ 185 /* Setup mesh. */
186 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 186 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
187 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 187 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
188 evas_canvas3d_mesh_from_primitive_set(data->mesh, 100, data->cube); 188 evas_canvas3d_mesh_from_primitive_set(data->mesh, 100, data->cube);
189 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION); 189 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION);
@@ -191,7 +191,7 @@ _mesh_setup(Scene_Data *data)
191 191
192 evas_canvas3d_mesh_frame_material_set(data->mesh, 100, data->material_wood); 192 evas_canvas3d_mesh_frame_material_set(data->mesh, 100, data->material_wood);
193 193
194 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 194 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
195 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 195 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
196 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 196 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
197 evas_canvas3d_node_scale_set(data->mesh_node, 3, 3, 3); 197 evas_canvas3d_node_scale_set(data->mesh_node, 3, 3, 3);
@@ -200,11 +200,11 @@ _mesh_setup(Scene_Data *data)
200static void 200static void
201_scene_setup(Scene_Data *data) 201_scene_setup(Scene_Data *data)
202{ 202{
203 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 203 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
204 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 204 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
205 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 205 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
206 206
207 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 207 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
208 208
209 _camera_setup(data); 209 _camera_setup(data);
210 _light_setup(data); 210 _light_setup(data);
@@ -237,7 +237,7 @@ main(void)
237 _scene_setup(&data); 237 _scene_setup(&data);
238 238
239 /* Add a background rectangle objects. */ 239 /* Add a background rectangle objects. */
240 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 240 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
241 efl_gfx_color_set(background, 0, 0, 0, 255); 241 efl_gfx_color_set(background, 0, 0, 0, 255);
242 efl_gfx_size_set(background, WIDTH, HEIGHT); 242 efl_gfx_size_set(background, WIDTH, HEIGHT);
243 efl_gfx_visible_set(background, EINA_TRUE); 243 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index 86ee222..1ae79a8 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -132,31 +132,32 @@ main(void)
132 evas = ecore_evas_get(ecore_evas); 132 evas = ecore_evas_get(ecore_evas);
133 133
134 /* Add a scene object .*/ 134 /* Add a scene object .*/
135 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 135 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
136 136
137 /* Add the root node for the scene. */ 137 /* Add the root node for the scene. */
138 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 138 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
139 139
140 /* Add the camera. */ 140 /* Add the camera. */
141 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 141 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
142 evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0); 142 evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0);
143 143
144 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 144 camera_node =
145 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
145 evas_canvas3d_node_camera_set(camera_node, camera); 146 evas_canvas3d_node_camera_set(camera_node, camera);
146 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5); 147 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5);
147 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 148 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
148 evas_canvas3d_node_member_add(root_node, camera_node); 149 evas_canvas3d_node_member_add(root_node, camera_node);
149 150
150 eo_add(&sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 151 sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
151 evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 152 evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
152 evas_canvas3d_primitive_precision_set(sphere, 50); 153 evas_canvas3d_primitive_precision_set(sphere, 50);
153 154
154 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 155 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
155 evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere); 156 evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
156 157
157 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 158 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
158 159
159 eo_add(&texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 160 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
160 evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL); 161 evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL);
161 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); 162 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
162 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse); 163 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
@@ -168,7 +169,7 @@ main(void)
168 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 169 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
169 evas_canvas3d_material_shininess_set(material, 50.0); 170 evas_canvas3d_material_shininess_set(material, 50.0);
170 171
171 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 172 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
172 173
173 evas_canvas3d_node_member_add(root_node, mesh_node); 174 evas_canvas3d_node_member_add(root_node, mesh_node);
174 evas_canvas3d_node_mesh_add(mesh_node, mesh); 175 evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -181,7 +182,7 @@ main(void)
181 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 182 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
182 183
183 /* Add evas objects. */ 184 /* Add evas objects. */
184 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 185 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
185 efl_gfx_color_set(background, 0, 0, 0, 255); 186 efl_gfx_color_set(background, 0, 0, 0, 255);
186 efl_gfx_size_set(background, WIDTH, HEIGHT); 187 efl_gfx_size_set(background, WIDTH, HEIGHT);
187 efl_gfx_visible_set(background, EINA_TRUE); 188 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 65f4fe5..b34b2cc 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -130,35 +130,35 @@ main(void)
130 evas = ecore_evas_get(ecore_evas); 130 evas = ecore_evas_get(ecore_evas);
131 131
132 /* Add a scene object .*/ 132 /* Add a scene object .*/
133 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 133 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
134 134
135 /* Add the root node for the scene. */ 135 /* Add the root node for the scene. */
136 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 136 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
137 137
138 /* Add the camera. */ 138 /* Add the camera. */
139 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 139 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
140 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 140 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
141 141
142 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 142 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
143 evas_canvas3d_node_camera_set(camera_node, camera); 143 evas_canvas3d_node_camera_set(camera_node, camera);
144 evas_canvas3d_node_member_add(root_node, camera_node); 144 evas_canvas3d_node_member_add(root_node, camera_node);
145 evas_canvas3d_node_position_set(camera_node, 15.0, 0.0, 0.0); 145 evas_canvas3d_node_position_set(camera_node, 15.0, 0.0, 0.0);
146 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0); 146 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
147 /* Add the light. */ 147 /* Add the light. */
148 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 148 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
149 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 149 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
150 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 150 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
151 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 151 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
152 evas_canvas3d_light_directional_set(light, EINA_TRUE); 152 evas_canvas3d_light_directional_set(light, EINA_TRUE);
153 153
154 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 154 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
155 evas_canvas3d_node_light_set(light_node, light); 155 evas_canvas3d_node_light_set(light_node, light);
156 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 156 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
157 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 157 evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
158 evas_canvas3d_node_member_add(root_node, light_node); 158 evas_canvas3d_node_member_add(root_node, light_node);
159 159
160 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 160 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
161 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
162 evas_canvas3d_texture_file_set(texture, image_path, NULL); 162 evas_canvas3d_texture_file_set(texture, image_path, NULL);
163 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 163 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
164 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 164 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -208,7 +208,7 @@ main(void)
208 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 208 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
209 209
210 /* Add a background rectangle objects. */ 210 /* Add a background rectangle objects. */
211 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 211 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
212 efl_gfx_color_set(background, 100, 100, 100, 255); 212 efl_gfx_color_set(background, 100, 100, 100, 255);
213 efl_gfx_size_set(background, WIDTH, HEIGHT); 213 efl_gfx_size_set(background, WIDTH, HEIGHT);
214 efl_gfx_visible_set(background, EINA_TRUE); 214 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-proxy.c b/src/examples/evas/evas-3d-proxy.c
index 7ec50bc..901c52b 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -97,10 +97,11 @@ _animate_scene(void *data)
97static void 97static void
98_camera_setup(Scene_Data *data) 98_camera_setup(Scene_Data *data)
99{ 99{
100 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 100 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
101 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0); 101 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
102 102
103 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 103 data->camera_node =
104 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
104 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 105 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
105 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.0); 106 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.0);
106 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 107 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -110,12 +111,13 @@ _camera_setup(Scene_Data *data)
110static void 111static void
111_light_setup(Scene_Data *data) 112_light_setup(Scene_Data *data)
112{ 113{
113 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 114 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
114 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 115 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
115 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 116 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
116 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 117 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
117 118
118 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 119 data->light_node =
120 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
119 evas_canvas3d_node_light_set(data->light_node, data->light); 121 evas_canvas3d_node_light_set(data->light_node, data->light);
120 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 122 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
121 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 123 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -126,8 +128,8 @@ static void
126_mesh_setup(Scene_Data *data) 128_mesh_setup(Scene_Data *data)
127{ 129{
128 /* Setup material. */ 130 /* Setup material. */
129 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 131 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
130 eo_add(&data->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 132 data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
131 133
132 evas_canvas3d_texture_source_set(data->texture, source); 134 evas_canvas3d_texture_source_set(data->texture, source);
133 evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE); 135 evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE);
@@ -142,16 +144,17 @@ _mesh_setup(Scene_Data *data)
142 evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture); 144 evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture);
143 145
144 /* Set data of primitive */ 146 /* Set data of primitive */
145 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 147 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
146 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 148 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
147 149
148 /* Setup mesh. */ 150 /* Setup mesh. */
149 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 151 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
150 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 152 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
151 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT); 153 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT);
152 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 154 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
153 155
154 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 156 data->mesh_node =
157 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
155 158
156 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 159 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
157 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 160 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
@@ -160,11 +163,12 @@ _mesh_setup(Scene_Data *data)
160static void 163static void
161_scene_setup(Scene_Data *data) 164_scene_setup(Scene_Data *data)
162{ 165{
163 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 166 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
164 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 167 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
165 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 168 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
166 169
167 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 170 data->root_node =
171 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
168 172
169 _camera_setup(data); 173 _camera_setup(data);
170 _light_setup(data); 174 _light_setup(data);
@@ -195,7 +199,7 @@ main(void)
195 evas = ecore_evas_get(ecore_evas); 199 evas = ecore_evas_get(ecore_evas);
196 200
197 /* Add a background rectangle objects. */ 201 /* Add a background rectangle objects. */
198 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 202 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
199 efl_gfx_color_set(background, 0, 0, 0, 255); 203 efl_gfx_color_set(background, 0, 0, 0, 255);
200 efl_gfx_size_set(background, WIDTH, HEIGHT); 204 efl_gfx_size_set(background, WIDTH, HEIGHT);
201 efl_gfx_visible_set(background, EINA_TRUE); 205 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index 90a71465..f70d7e4 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -174,7 +174,7 @@ _on_canvas_resize(Ecore_Evas *ee)
174static void 174static void
175_body_material_set(Body_3D *body, float r, float g, float b) 175_body_material_set(Body_3D *body, float r, float g, float b)
176{ 176{
177 eo_add(&body->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 177 body->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
178 178
179 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 179 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
180 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 180 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -191,32 +191,33 @@ _body_material_set(Body_3D *body, float r, float g, float b)
191static void 191static void
192_sphere_setup(Body_3D *sphere) 192_sphere_setup(Body_3D *sphere)
193{ 193{
194 eo_add(&sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 194 sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
195 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 195 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
196 evas_canvas3d_primitive_precision_set(sphere->primitive, 50); 196 evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
197 197
198 eo_add(&sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 198 sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
199 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive); 199 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
200 200
201 _body_material_set(sphere, 1, 0.0, 0.0); 201 _body_material_set(sphere, 1, 0.0, 0.0);
202 202
203 eo_add(&sphere->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(sphere->node, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(sphere->node, 3.0, 3.0, 0.0)); 203 sphere->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, 3.0, 3.0, 0.0));
204 evas_canvas3d_node_mesh_add(sphere->node, sphere->mesh); 204 evas_canvas3d_node_mesh_add(sphere->node, sphere->mesh);
205} 205}
206 206
207static void 207static void
208_cone_setup(Body_3D *cone) 208_cone_setup(Body_3D *cone)
209{ 209{
210 eo_add(&cone->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 210 cone->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
211 evas_canvas3d_primitive_form_set(cone->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CONE); 211 evas_canvas3d_primitive_form_set(cone->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CONE);
212 evas_canvas3d_primitive_precision_set(cone->primitive, 50); 212 evas_canvas3d_primitive_precision_set(cone->primitive, 50);
213 213
214 eo_add(&cone->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 214 cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
215 evas_canvas3d_mesh_from_primitive_set(cone->mesh, 0, cone->primitive); 215 evas_canvas3d_mesh_from_primitive_set(cone->mesh, 0, cone->primitive);
216 216
217 _body_material_set(cone, 0.8, 0.5, 0.5); 217 _body_material_set(cone, 0.8, 0.5, 0.5);
218 218
219 eo_add(&cone->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cone->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 219 cone->node =
220 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
220 evas_canvas3d_node_mesh_add(cone->node, cone->mesh); 221 evas_canvas3d_node_mesh_add(cone->node, cone->mesh);
221 evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0); 222 evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0);
222 evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0); 223 evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0);
@@ -225,16 +226,17 @@ _cone_setup(Body_3D *cone)
225static void 226static void
226_cylinder_setup(Body_3D *cylinder) 227_cylinder_setup(Body_3D *cylinder)
227{ 228{
228 eo_add(&cylinder->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 229 cylinder->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
229 evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER); 230 evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
230 evas_canvas3d_primitive_precision_set(cylinder->primitive, 50); 231 evas_canvas3d_primitive_precision_set(cylinder->primitive, 50);
231 232
232 eo_add(&cylinder->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 233 cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
233 evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive); 234 evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive);
234 235
235 _body_material_set(cylinder, 0.0, 0.0, 1.0); 236 _body_material_set(cylinder, 0.0, 0.0, 1.0);
236 237
237 eo_add(&cylinder->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cylinder->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 238 cylinder->node =
239 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
238 evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh); 240 evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh);
239 evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0); 241 evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0);
240 evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0); 242 evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0);
@@ -244,19 +246,17 @@ static void
244_fence_setup(Body_3D *fence) 246_fence_setup(Body_3D *fence)
245{ 247{
246 248
247 Eo *texture = NULL; 249 Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
248 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
249 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE); 250 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE);
250 evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL); 251 evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL);
251 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 252 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
252 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 253 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
253 Eo *texture1 = NULL; 254 Eo *texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
254 eo_add(&texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
255 evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE); 255 evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE);
256 evas_canvas3d_texture_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL); 256 evas_canvas3d_texture_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL);
257 evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 257 evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
258 evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 258 evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
259 eo_add(&fence->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 259 fence->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
260 260
261 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); 261 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
262 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, texture); 262 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, texture);
@@ -270,20 +270,21 @@ _fence_setup(Body_3D *fence)
270 evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 270 evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
271 evas_canvas3d_material_shininess_set(fence->material, 100.0); 271 evas_canvas3d_material_shininess_set(fence->material, 100.0);
272 272
273 eo_add(&fence->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 273 fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
274 evas_canvas3d_primitive_form_set(fence->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER); 274 evas_canvas3d_primitive_form_set(fence->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
275 evas_canvas3d_primitive_mode_set(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE); 275 evas_canvas3d_primitive_mode_set(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
276 evas_canvas3d_primitive_tex_scale_set(fence->primitive, 160.0, 12.0); 276 evas_canvas3d_primitive_tex_scale_set(fence->primitive, 160.0, 12.0);
277 evas_canvas3d_primitive_precision_set(fence->primitive, 50); 277 evas_canvas3d_primitive_precision_set(fence->primitive, 50);
278 278
279 eo_add(&fence->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 279 fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
280 evas_canvas3d_mesh_from_primitive_set(fence->mesh, 0, fence->primitive); 280 evas_canvas3d_mesh_from_primitive_set(fence->mesh, 0, fence->primitive);
281 281
282 evas_canvas3d_mesh_frame_material_set(fence->mesh, 0, fence->material); 282 evas_canvas3d_mesh_frame_material_set(fence->mesh, 0, fence->material);
283 evas_canvas3d_mesh_alpha_func_set(fence->mesh, EVAS_CANVAS3D_COMPARISON_GREATER, 0); 283 evas_canvas3d_mesh_alpha_func_set(fence->mesh, EVAS_CANVAS3D_COMPARISON_GREATER, 0);
284 evas_canvas3d_mesh_alpha_test_enable_set(fence->mesh, EINA_TRUE); 284 evas_canvas3d_mesh_alpha_test_enable_set(fence->mesh, EINA_TRUE);
285 evas_canvas3d_mesh_shade_mode_set(fence->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP); 285 evas_canvas3d_mesh_shade_mode_set(fence->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
286 eo_add(&fence->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(fence->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 286 fence->node =
287 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
287 evas_canvas3d_node_mesh_add(fence->node, fence->mesh); 288 evas_canvas3d_node_mesh_add(fence->node, fence->mesh);
288 evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0); 289 evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0);
289 evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0); 290 evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0);
@@ -293,15 +294,16 @@ _fence_setup(Body_3D *fence)
293static void 294static void
294_square_setup(Body_3D *square) 295_square_setup(Body_3D *square)
295{ 296{
296 eo_add(&square->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 297 square->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
297 evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE); 298 evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE);
298 299
299 eo_add(&square->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 300 square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
300 evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive); 301 evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive);
301 302
302 _body_material_set(square, 0.4, 0.4, 0.4); 303 _body_material_set(square, 0.4, 0.4, 0.4);
303 304
304 eo_add(&square->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(square->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 305 square->node =
306 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
305 evas_canvas3d_node_mesh_add(square->node, square->mesh); 307 evas_canvas3d_node_mesh_add(square->node, square->mesh);
306 evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0); 308 evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0);
307 evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0); 309 evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0);
@@ -311,15 +313,15 @@ _square_setup(Body_3D *square)
311static void 313static void
312_box_setup(Body_3D *box) 314_box_setup(Body_3D *box)
313{ 315{
314 eo_add(&box->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 316 box->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
315 evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 317 evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
316 318
317 eo_add(&box->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 319 box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
318 evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive); 320 evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive);
319 321
320 _body_material_set(box, 0, 1, 0); 322 _body_material_set(box, 0, 1, 0);
321 323
322 eo_add(&box->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(box->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 324 box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
323 evas_canvas3d_node_mesh_add(box->node, box->mesh); 325 evas_canvas3d_node_mesh_add(box->node, box->mesh);
324 evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0); 326 evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0);
325} 327}
@@ -327,11 +329,11 @@ _box_setup(Body_3D *box)
327static void 329static void
328_model_setup(Body_3D *model) 330_model_setup(Body_3D *model)
329{ 331{
330 eo_add(&model->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 332 model->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
331 evas_canvas3d_texture_file_set(model->texture, image_path, NULL); 333 evas_canvas3d_texture_file_set(model->texture, image_path, NULL);
332 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 334 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
333 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 335 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
334 eo_add(&model->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 336 model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
335 337
336 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture); 338 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture);
337 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture); 339 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture);
@@ -341,12 +343,13 @@ _model_setup(Body_3D *model)
341 evas_canvas3d_material_shininess_set(model->material, 100.0); 343 evas_canvas3d_material_shininess_set(model->material, 100.0);
342 344
343 345
344 eo_add(&model->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 346 model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
345 efl_file_set(model->mesh, model_path, NULL); 347 efl_file_set(model->mesh, model_path, NULL);
346 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material); 348 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material);
347 evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 349 evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
348 350
349 eo_add(&model->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(model->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 351 model->node =
352 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
350 evas_canvas3d_node_mesh_add(model->node, model->mesh); 353 evas_canvas3d_node_mesh_add(model->node, model->mesh);
351 evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1); 354 evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1);
352 evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577); 355 evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577);
@@ -388,12 +391,13 @@ _billboard_setup(Scene_Data *data)
388static void 391static void
389_camera_setup(Scene_Data *data) 392_camera_setup(Scene_Data *data)
390{ 393{
391 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 394 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
392 eo_add(&data->mediator, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator, EVAS_CANVAS3D_NODE_TYPE_NODE)); 395 data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
393 396
394 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0); 397 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0);
395 398
396 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 399 data->camera_node =
400 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
397 401
398 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 402 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
399 403
@@ -408,14 +412,15 @@ _camera_setup(Scene_Data *data)
408static void 412static void
409_light_setup(Scene_Data *data) 413_light_setup(Scene_Data *data)
410{ 414{
411 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 415 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
412 evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0); 416 evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0);
413 evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0); 417 evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0);
414 evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0); 418 evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0);
415 evas_canvas3d_light_spot_cutoff_set(data->light, 20); 419 evas_canvas3d_light_spot_cutoff_set(data->light, 20);
416 evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0); 420 evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0);
417 421
418 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 422 data->light_node =
423 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
419 evas_canvas3d_node_light_set(data->light_node, data->light); 424 evas_canvas3d_node_light_set(data->light_node, data->light);
420 evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.0); 425 evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.0);
421 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 15.0, 0.0, -5.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0); 426 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 15.0, 0.0, -5.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
@@ -427,12 +432,13 @@ _scene_setup(Scene_Data *data)
427{ 432{
428 data->init = EINA_FALSE; 433 data->init = EINA_FALSE;
429 434
430 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 435 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
431 436
432 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 437 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
433 evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1); 438 evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1);
434 439
435 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 440 data->root_node =
441 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
436 442
437 443
438 _camera_setup(data); 444 _camera_setup(data);
@@ -604,7 +610,7 @@ main(void)
604 _scene_setup(&data); 610 _scene_setup(&data);
605 611
606 /* Add a background rectangle objects. */ 612 /* Add a background rectangle objects. */
607 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 613 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
608 efl_gfx_color_set(background, 0, 0, 0, 255); 614 efl_gfx_color_set(background, 0, 0, 0, 255);
609 efl_gfx_size_set(background, WIDTH, HEIGHT); 615 efl_gfx_size_set(background, WIDTH, HEIGHT);
610 efl_gfx_visible_set(background, EINA_TRUE); 616 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-vg-simple.c b/src/examples/evas/evas-vg-simple.c
index 9d22907..2c0c702 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -449,19 +449,15 @@ vector_set(int x, int y, int w, int h)
449 root = evas_object_vg_root_node_get(d.vg); 449 root = evas_object_vg_root_node_get(d.vg);
450 //evas_vg_node_transformation_set(root, &matrix); 450 //evas_vg_node_transformation_set(root, &matrix);
451 451
452 Efl_VG *bg = NULL; 452 Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "bg"));
453 eo_add(&bg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(bg, "bg"));
454 _rect_add(bg, 0, 0 , vg_w, vg_h); 453 _rect_add(bg, 0, 0 , vg_w, vg_h);
455 evas_vg_node_origin_set(bg, 0,0); 454 evas_vg_node_origin_set(bg, 0,0);
456 evas_vg_shape_stroke_width_set(bg, 1.0); 455 evas_vg_shape_stroke_width_set(bg, 1.0);
457 evas_vg_node_color_set(bg, 80, 80, 80, 80); 456 evas_vg_node_color_set(bg, 80, 80, 80, 80);
458 457
459 Efl_VG *shape = NULL; 458 Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "shape"));
460 eo_add(&shape, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(shape, "shape")); 459 Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(eoid, "rgradient"));
461 Efl_VG *rgradient = NULL; 460 Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(eoid, "lgradient"));
462 eo_add(&rgradient, EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(rgradient, "rgradient"));
463 Efl_VG *lgradient = NULL;
464 eo_add(&lgradient, EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(lgradient, "lgradient"));
465 461
466 _arcto(shape, 0, 0, 100, 100, 25, 330); 462 _arcto(shape, 0, 0, 100, 100, 25, 330);
467 463
@@ -502,8 +498,7 @@ vector_set(int x, int y, int w, int h)
502 evas_vg_node_color_set(shape, 0, 0, 255, 255); 498 evas_vg_node_color_set(shape, 0, 0, 255, 255);
503 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128); 499 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
504 500
505 Efl_VG *rect = NULL; 501 Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect"));
506 eo_add(&rect, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect, "rect"));
507 _rect_add(rect, 0, 0, 100, 100); 502 _rect_add(rect, 0, 0, 100, 100);
508 evas_vg_node_origin_set(rect, 100, 100); 503 evas_vg_node_origin_set(rect, 100, 100);
509 evas_vg_shape_fill_set(rect, lgradient); 504 evas_vg_shape_fill_set(rect, lgradient);
@@ -511,8 +506,7 @@ vector_set(int x, int y, int w, int h)
511 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND); 506 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
512 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255); 507 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
513 508
514 Efl_VG *rect1 = NULL; 509 Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect1"));
515 eo_add(&rect1, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect1, "rect1"));
516 _rect_add(rect1, 0, 0, 70, 70); 510 _rect_add(rect1, 0, 0, 70, 70);
517 evas_vg_node_origin_set(rect1, 50, 70); 511 evas_vg_node_origin_set(rect1, 50, 70);
518 evas_vg_shape_stroke_scale_set(rect1, 2); 512 evas_vg_shape_stroke_scale_set(rect1, 2);
@@ -520,8 +514,7 @@ vector_set(int x, int y, int w, int h)
520 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND); 514 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
521 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100); 515 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
522 516
523 Efl_VG *circle = NULL; 517 Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "circle"));
524 eo_add(&circle, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(circle, "circle"));
525 _arcto(circle, 0, 0, 250, 100, 30, 300); 518 _arcto(circle, 0, 0, 250, 100, 30, 300);
526 evas_vg_shape_fill_set(circle, lgradient); 519 evas_vg_shape_fill_set(circle, lgradient);
527 //evas_vg_node_transformation_set(&matrix), 520 //evas_vg_node_transformation_set(&matrix),
@@ -529,30 +522,27 @@ vector_set(int x, int y, int w, int h)
529 evas_vg_node_color_set(circle, 50, 0, 0, 50); 522 evas_vg_node_color_set(circle, 50, 0, 0, 50);
530 523
531 // Foreground 524 // Foreground
532 Efl_VG *fg = NULL; 525 Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "fg"));
533 eo_add(&fg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(fg, "fg"));
534 _rect_add(fg, 0, 0, vg_w, vg_h); 526 _rect_add(fg, 0, 0, vg_w, vg_h);
535 evas_vg_node_origin_set(fg, 0, 0); 527 evas_vg_node_origin_set(fg, 0, 0);
536 evas_vg_shape_stroke_width_set(fg, 5.0); 528 evas_vg_shape_stroke_width_set(fg, 5.0);
537 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND); 529 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
538 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70); 530 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
539 531
540 Efl_VG *tst = NULL; 532 Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "tst"));
541 eo_add(&tst, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(tst, "tst"));
542 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5); 533 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
543 evas_vg_node_color_set(tst, 0, 0, 200, 200); 534 evas_vg_node_color_set(tst, 0, 0, 200, 200);
544 evas_vg_shape_stroke_width_set(tst, 2); 535 evas_vg_shape_stroke_width_set(tst, 2);
545 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255); 536 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
546 537
547 Efl_VG *vc = NULL; 538 Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "vc"));
548 eo_add(&vc, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(vc, "vc"));
549 evas_vg_shape_shape_append_circle(vc, 100, 100, 23); 539 evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
550 evas_vg_node_color_set(vc, 0, 200, 0, 255); 540 evas_vg_node_color_set(vc, 0, 200, 0, 255);
551 evas_vg_shape_stroke_width_set(vc, 4); 541 evas_vg_shape_stroke_width_set(vc, 4);
552 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255); 542 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
553 543
554 eo_add(&beginning, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(beginning, root)); 544 beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
555 eo_add(&end, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(end, root)); 545 end = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
556 546
557 circle = efl_vg_container_child_get(end, "circle"); 547 circle = efl_vg_container_child_get(end, "circle");
558 efl_vg_transformation_set(circle, &matrix); 548 efl_vg_transformation_set(circle, &matrix);
diff --git a/src/examples/evas/shooter/evas-3d-shooter-header.c b/src/examples/evas/shooter/evas-3d-shooter-header.c
index 8529746..ee608ba 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-header.c
+++ b/src/examples/evas/shooter/evas-3d-shooter-header.c
@@ -26,11 +26,11 @@ _distance(float x1, float z1, float x2, float z2)
26void 26void
27_camera_setup(Scene_Data *data) 27_camera_setup(Scene_Data *data)
28{ 28{
29 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 29 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
30 evas_canvas3d_camera_projection_perspective_set(data->camera, 65.0, 1.0, 1.0, 300.0); 30 evas_canvas3d_camera_projection_perspective_set(data->camera, 65.0, 1.0, 1.0, 300.0);
31 31
32 eo_add(&data->mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 32 data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
33 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 33 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
34 34
35 evas_canvas3d_node_member_add(data->root_node, data->mediator_node); 35 evas_canvas3d_node_member_add(data->root_node, data->mediator_node);
36 evas_canvas3d_node_member_add(data->mediator_node, data->camera_node); 36 evas_canvas3d_node_member_add(data->mediator_node, data->camera_node);
@@ -43,14 +43,14 @@ _camera_setup(Scene_Data *data)
43void 43void
44_light_setup(Scene_Data *data) 44_light_setup(Scene_Data *data)
45{ 45{
46 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 46 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
47 47
48 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 48 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
49 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 49 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
50 evas_canvas3d_light_specular_set(data->light, 0.2, 0.2, 0.2, 1.0); 50 evas_canvas3d_light_specular_set(data->light, 0.2, 0.2, 0.2, 1.0);
51 evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 200.0); 51 evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 200.0);
52 52
53 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 53 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
54 54
55 evas_canvas3d_node_light_set(data->light_node, data->light); 55 evas_canvas3d_node_light_set(data->light_node, data->light);
56 evas_canvas3d_node_position_set(data->light_node, -30.0, 70.0, 0.0); 56 evas_canvas3d_node_position_set(data->light_node, -30.0, 70.0, 0.0);
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index 4acf990..2e83fd8 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -802,7 +802,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
802 evas_canvas3d_node_position_set(data->mesh_node_column_c, 10, 9.0, -12); 802 evas_canvas3d_node_position_set(data->mesh_node_column_c, 10, 9.0, -12);
803 803
804 /* Setup mesh for bounding sphere */ 804 /* Setup mesh for bounding sphere */
805 eo_add(&data->material_ball, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 805 data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
806 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 806 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
807 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 807 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
808 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); 808 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -811,7 +811,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
811 evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 811 evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
812 evas_canvas3d_material_shininess_set(data->material_ball, 50.0); 812 evas_canvas3d_material_shininess_set(data->material_ball, 50.0);
813 813
814 eo_add(&data->mesh_ball, EVAS_CANVAS3D_MESH_CLASS, evas); 814 data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
815 815
816 _set_ball(data->mesh_ball, 10); 816 _set_ball(data->mesh_ball, 10);
817 817
@@ -865,7 +865,7 @@ _mesh_setup_column(Scene_Data *data, int index)
865{ 865{
866 /* Setup mesh for column */ 866 /* Setup mesh for column */
867 867
868 eo_add(&data->material_column, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 868 data->material_column = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
869 869
870 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 870 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
871 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 871 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -886,7 +886,7 @@ _mesh_setup_column(Scene_Data *data, int index)
886 evas_canvas3d_mesh_shade_mode_set(data->mesh_column[index], EVAS_CANVAS3D_SHADE_MODE_PHONG); 886 evas_canvas3d_mesh_shade_mode_set(data->mesh_column[index], EVAS_CANVAS3D_SHADE_MODE_PHONG);
887 evas_canvas3d_mesh_frame_material_set(data->mesh_column[index], 0, data->material_column); 887 evas_canvas3d_mesh_frame_material_set(data->mesh_column[index], 0, data->material_column);
888 888
889 eo_add(&data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 889 data->texture_diffuse_column = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
890 890
891 evas_canvas3d_texture_file_set(data->texture_diffuse_column, red_brick_path, NULL); 891 evas_canvas3d_texture_file_set(data->texture_diffuse_column, red_brick_path, NULL);
892 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE); 892 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE);
@@ -991,20 +991,20 @@ _scene_setup(Scene_Data *data)
991 for (i = 0; i < 4; i++) 991 for (i = 0; i < 4; i++)
992 motion_vec[i] = 0; 992 motion_vec[i] = 0;
993 993
994 eo_add(&data->cube_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 994 data->cube_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
995 evas_canvas3d_primitive_form_set(data->cube_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 995 evas_canvas3d_primitive_form_set(data->cube_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
996 evas_canvas3d_primitive_precision_set(data->cube_primitive, 10); 996 evas_canvas3d_primitive_precision_set(data->cube_primitive, 10);
997 997
998 eo_add(&data->sphere_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 998 data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
999 evas_canvas3d_primitive_form_set(data->sphere_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 999 evas_canvas3d_primitive_form_set(data->sphere_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
1000 evas_canvas3d_primitive_precision_set(data->sphere_primitive, 50); 1000 evas_canvas3d_primitive_precision_set(data->sphere_primitive, 50);
1001 1001
1002 eo_add(&global_scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 1002 global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
1003 1003
1004 evas_canvas3d_scene_size_set(global_scene, WIDTH, HEIGHT); 1004 evas_canvas3d_scene_size_set(global_scene, WIDTH, HEIGHT);
1005 evas_canvas3d_scene_background_color_set(global_scene, 0.5, 0.5, 0.9, 0.0); 1005 evas_canvas3d_scene_background_color_set(global_scene, 0.5, 0.5, 0.9, 0.0);
1006 1006
1007 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 1007 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
1008 1008
1009 _camera_setup(data); 1009 _camera_setup(data);
1010 _light_setup(data); 1010 _light_setup(data);
@@ -1014,7 +1014,7 @@ _scene_setup(Scene_Data *data)
1014 for (i = 0; i < 10; i++) 1014 for (i = 0; i < 10; i++)
1015 _mesh_setup_rocket(data, i); 1015 _mesh_setup_rocket(data, i);
1016 1016
1017 eo_add(&data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 1017 data->cylinder_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
1018 evas_canvas3d_primitive_mode_set(data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE); 1018 evas_canvas3d_primitive_mode_set(data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
1019 evas_canvas3d_primitive_form_set(data->cylinder_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER); 1019 evas_canvas3d_primitive_form_set(data->cylinder_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
1020 evas_canvas3d_primitive_tex_scale_set(data->cylinder_primitive, 1.0, 1.0); 1020 evas_canvas3d_primitive_tex_scale_set(data->cylinder_primitive, 1.0, 1.0);
@@ -1069,7 +1069,7 @@ _scene_setup(Scene_Data *data)
1069 } 1069 }
1070 } 1070 }
1071 1071
1072 eo_add(&data->carp_mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->carp_mediator_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 1072 data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
1073 1073
1074 evas_canvas3d_node_member_add(data->carp_mediator_node, data->mesh_node_carpet); 1074 evas_canvas3d_node_member_add(data->carp_mediator_node, data->mesh_node_carpet);
1075 1075