summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-3d-ply.c
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-01 21:57:43 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-01 21:57:43 -0200
commitfa88a2337f4c1ed74dbe5f8e9b8ab9e80aa94215 (patch)
tree289d1f0e30abe7aeb9100ab9ed3e3a755d1c18b7 /src/examples/evas/evas-3d-ply.c
parentb9a6a8e7384fc79fced2132407208abfedf77fe1 (diff)
Eo: Partial implementation to remove eo_dodevs/felipealmeida/eo_optimisations
Diffstat (limited to 'src/examples/evas/evas-3d-ply.c')
-rw-r--r--src/examples/evas/evas-3d-ply.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 10881aa..6781c9a 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -123,18 +123,18 @@ main(void)
123 evas = ecore_evas_get(ecore_evas); 123 evas = ecore_evas_get(ecore_evas);
124 124
125 /* Add a scene object .*/ 125 /* Add a scene object .*/
126 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 126 eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
127 127
128 /* Add the root node for the scene. */ 128 /* Add the root node for the scene. */
129 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 129 eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
130 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE)); 130 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
131 131
132 /* Add the camera. */ 132 /* Add the camera. */
133 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 133 eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
134 eo_do(camera, 134 eo_do(camera,
135 evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0)); 135 evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
136 136
137 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 137 eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
138 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 138 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
139 eo_do(camera_node, 139 eo_do(camera_node,
140 evas_canvas3d_node_camera_set(camera)); 140 evas_canvas3d_node_camera_set(camera));
@@ -145,14 +145,14 @@ main(void)
145 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, 145 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
146 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0)); 146 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
147 /* Add the light. */ 147 /* Add the light. */
148 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 148 eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
149 eo_do(light, 149 eo_do(light,
150 evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0), 150 evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
151 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 151 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
152 evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0), 152 evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
153 evas_canvas3d_light_directional_set(EINA_TRUE)); 153 evas_canvas3d_light_directional_set(EINA_TRUE));
154 154
155 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 155 eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
156 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 156 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
157 eo_do(light_node, 157 eo_do(light_node,
158 evas_canvas3d_node_light_set(light), 158 evas_canvas3d_node_light_set(light),
@@ -162,8 +162,8 @@ main(void)
162 eo_do(root_node, 162 eo_do(root_node,
163 evas_canvas3d_node_member_add(light_node)); 163 evas_canvas3d_node_member_add(light_node));
164 164
165 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 165 eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
166 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 166 eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
167 eo_do(texture, 167 eo_do(texture,
168 evas_canvas3d_texture_file_set(image_path, NULL), 168 evas_canvas3d_texture_file_set(image_path, NULL),
169 evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, 169 evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@@ -191,7 +191,7 @@ main(void)
191 /* Add the meshes. */ 191 /* Add the meshes. */
192 for (i = 0; i < NUMBER_OF_MESHES; i++) 192 for (i = 0; i < NUMBER_OF_MESHES; i++)
193 { 193 {
194 mesh[i] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 194 eo_add(mesh[i], EVAS_CANVAS3D_MESH_CLASS, evas);
195 195
196 snprintf(buffer, PATH_MAX, "%s%s", input_template, file_name[i % 8]); 196 snprintf(buffer, PATH_MAX, "%s%s", input_template, file_name[i % 8]);
197 eo_do(mesh[i], 197 eo_do(mesh[i],
@@ -210,7 +210,7 @@ main(void)
210 evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8])); 210 evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
211 } 211 }
212 212
213 mesh_node[i] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 213 eo_add(mesh_node[i], EVAS_CANVAS3D_NODE_CLASS, evas,
214 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); 214 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
215 eo_do(root_node, evas_canvas3d_node_member_add(mesh_node[i])); 215 eo_do(root_node, evas_canvas3d_node_member_add(mesh_node[i]));
216 eo_do(mesh_node[i], 216 eo_do(mesh_node[i],
@@ -225,7 +225,7 @@ main(void)
225 evas_canvas3d_scene_size_set(WIDTH, HEIGHT)); 225 evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
226 226
227 /* Add a background rectangle objects. */ 227 /* Add a background rectangle objects. */
228 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 228 eo_add(background, EVAS_RECTANGLE_CLASS, evas);
229 eo_do(background, 229 eo_do(background,
230 efl_gfx_color_set(100, 100, 100, 255), 230 efl_gfx_color_set(100, 100, 100, 255),
231 efl_gfx_size_set(WIDTH, HEIGHT), 231 efl_gfx_size_set(WIDTH, HEIGHT),