summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorperepelits.m <perepelits.m@samsung.com>2016-01-04 12:31:20 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-04 12:31:23 -0800
commit2c9131ac66b8a62be7a7a5c6cd6bc70f8b4d8939 (patch)
treefa29f3161c6d9f61b02d3a7bef92d56e0fae4687
parent4ecb51025b4983334d6ba984236dae1db674fbff (diff)
evas: fix ply example after adding of new savers and loaders.
Summary: Before adding of new saver and loader for ply format we had a chance to set EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR for every mesh, now we save only existing atributes and there are a lot of meshes we have to set EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR. [FIX] Reviewers: cedric, raster, Hermet Subscribers: jpeg, artem.popov Differential Revision: https://phab.enlightenment.org/D3412 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/examples/evas/evas-3d-ply.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 10881aa731..25e3288aab 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -43,7 +43,14 @@ static const char *file_name[8] = {"Normal_UVs_Colors.ply",
43 "NoNormal_NoUVs_Colors.ply", 43 "NoNormal_NoUVs_Colors.ply",
44 "NoNormal_NoUVs_NoColors.ply"}; 44 "NoNormal_NoUVs_NoColors.ply"};
45 45
46int draw_mode[2] = {EVAS_CANVAS3D_SHADE_MODE_PHONG, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR}; 46int draw_mode[8] = {EVAS_CANVAS3D_SHADE_MODE_PHONG,
47 EVAS_CANVAS3D_SHADE_MODE_PHONG,
48 EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR,
49 EVAS_CANVAS3D_SHADE_MODE_SHADOW_MAP_RENDER,
50 EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR,
51 EVAS_CANVAS3D_SHADE_MODE_SHADOW_MAP_RENDER,
52 EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR,
53 EVAS_CANVAS3D_SHADE_MODE_SHADOW_MAP_RENDER};
47 54
48Ecore_Evas *ecore_evas = NULL; 55Ecore_Evas *ecore_evas = NULL;
49Evas *evas = NULL; 56Evas *evas = NULL;
@@ -197,7 +204,7 @@ main(void)
197 eo_do(mesh[i], 204 eo_do(mesh[i],
198 efl_file_set(buffer, NULL), 205 efl_file_set(buffer, NULL),
199 evas_canvas3d_mesh_frame_material_set(0, material), 206 evas_canvas3d_mesh_frame_material_set(0, material),
200 evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8])); 207 evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 8)]));
201 208
202 snprintf(buffer, PATH_MAX, "%s%s", output_template, file_name[i % 8]); 209 snprintf(buffer, PATH_MAX, "%s%s", output_template, file_name[i % 8]);
203 eo_do(mesh[i], efl_file_save(buffer, NULL, NULL)); 210 eo_do(mesh[i], efl_file_save(buffer, NULL, NULL));
@@ -207,7 +214,7 @@ main(void)
207 eo_do(mesh[i], 214 eo_do(mesh[i],
208 efl_file_set(buffer, NULL), 215 efl_file_set(buffer, NULL),
209 evas_canvas3d_mesh_frame_material_set(0, material), 216 evas_canvas3d_mesh_frame_material_set(0, material),
210 evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8])); 217 evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 8)]));
211 } 218 }
212 219
213 mesh_node[i] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 220 mesh_node[i] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,