summaryrefslogtreecommitdiff
path: root/src/modules/evas/model_loaders
diff options
context:
space:
mode:
authorOleksandr Shcherbina <o.shcherbina@samsung.com>2015-06-17 16:31:14 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-17 17:52:17 +0200
commitd409df1caa38ae7eac87f85ff4113484bc5b2099 (patch)
tree2adcbeadf2f4b2e7f4e7ba327a574c6620c23663 /src/modules/evas/model_loaders
parent9bf6f14a8a59195fe9be004aaff446c51474fc5d (diff)
evas: change interface evas_3d to evas_canvas3d
Summary: Regard to https://phab.enlightenment.org/T2479 it is need for right generation Eolian files Reviewers: cedric Subscribers: cedric, tasn Differential Revision: https://phab.enlightenment.org/D2711 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/modules/evas/model_loaders')
-rw-r--r--src/modules/evas/model_loaders/eet/evas_model_load_eet.c74
-rw-r--r--src/modules/evas/model_loaders/md2/evas_model_load_md2.c38
-rw-r--r--src/modules/evas/model_loaders/obj/evas_model_load_obj.c36
-rw-r--r--src/modules/evas/model_loaders/ply/evas_model_load_ply.c50
4 files changed, 99 insertions, 99 deletions
diff --git a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
index 815b9f1..803846d 100644
--- a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
+++ b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
@@ -7,33 +7,33 @@
7#include "evas_common_private.h" 7#include "evas_common_private.h"
8#include "evas_private.h" 8#include "evas_private.h"
9 9
10extern Evas_3D_File_Eet* eet_file; 10extern Evas_Canvas3D_File_Eet* eet_file;
11extern const char EVAS_3D_FILE_CACHE_FILE_ENTRY[]; 11extern const char EVAS_CANVAS3D_FILE_CACHE_FILE_ENTRY[];
12extern Eet_Data_Descriptor *_file_descriptor; 12extern Eet_Data_Descriptor *_file_descriptor;
13 13
14void 14void
15_set_geometry_to_mesh_from_eet_file(Evas_3D_Mesh *mesh, 15_set_geometry_to_mesh_from_eet_file(Evas_Canvas3D_Mesh *mesh,
16 Evas_3D_Mesh_Eet *eet_mesh) 16 Evas_Canvas3D_Mesh_Eet *eet_mesh)
17{ 17{
18 float *pos, *nor, *tex; 18 float *pos, *nor, *tex;
19 int stride_pos, stride_nor, stride_tex, j; 19 int stride_pos, stride_nor, stride_tex, j;
20 20
21 eo_do(mesh, 21 eo_do(mesh,
22 evas_3d_mesh_vertex_count_set(eet_mesh->geometries->vertices_count), 22 evas_canvas3d_mesh_vertex_count_set(eet_mesh->geometries->vertices_count),
23 evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES), 23 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
24 evas_3d_mesh_frame_add(0), 24 evas_canvas3d_mesh_frame_add(0),
25 25
26 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_POSITION, 0, NULL), 26 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
27 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_NORMAL, 0, NULL), 27 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
28 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_TEXCOORD, 0, NULL), 28 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
29 29
30 pos = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_POSITION), 30 pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_POSITION),
31 nor = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_NORMAL), 31 nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_NORMAL),
32 tex = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_TEXCOORD), 32 tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
33 33
34 stride_pos = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_POSITION), 34 stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_POSITION),
35 stride_nor = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_NORMAL), 35 stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_NORMAL),
36 stride_tex = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_TEXCOORD)); 36 stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
37 37
38 if (stride_pos == 0) stride_pos = sizeof(float) * 3; 38 if (stride_pos == 0) stride_pos = sizeof(float) * 3;
39 if (stride_nor == 0) stride_nor = sizeof(float) * 3; 39 if (stride_nor == 0) stride_nor = sizeof(float) * 3;
@@ -62,71 +62,71 @@ _set_geometry_to_mesh_from_eet_file(Evas_3D_Mesh *mesh,
62 62
63 /* unmap vertex buffer */ 63 /* unmap vertex buffer */
64 eo_do(mesh, 64 eo_do(mesh,
65 evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_POSITION), 65 evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_POSITION),
66 evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_NORMAL), 66 evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_NORMAL),
67 evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_TEXCOORD)); 67 evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
68} 68}
69 69
70void 70void
71_set_material_to_mesh_from_eet_file(Evas_3D_Mesh *mesh, 71_set_material_to_mesh_from_eet_file(Evas_Canvas3D_Mesh *mesh,
72 Evas_3D_Mesh_Eet *eet_mesh) 72 Evas_Canvas3D_Mesh_Eet *eet_mesh)
73{ 73{
74 Evas_3D_Object_Data *pd = eo_data_scope_get(mesh, EVAS_3D_OBJECT_CLASS); 74 Evas_Canvas3D_Object_Data *pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_OBJECT_CLASS);
75 Eo *material = NULL; 75 Eo *material = NULL;
76 material = eo_add(EVAS_3D_MATERIAL_CLASS, pd->evas); 76 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, pd->evas);
77 77
78 eo_do(material, 78 eo_do(material,
79 evas_3d_material_enable_set(EVAS_3D_MATERIAL_AMBIENT, 79 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_AMBIENT,
80 !!(eet_mesh->materials->colors[0].a > 0)), 80 !!(eet_mesh->materials->colors[0].a > 0)),
81 evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE, 81 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_DIFFUSE,
82 !!(eet_mesh->materials->colors[1].a > 0)), 82 !!(eet_mesh->materials->colors[1].a > 0)),
83 evas_3d_material_enable_set(EVAS_3D_MATERIAL_SPECULAR, 83 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_SPECULAR,
84 !!(eet_mesh->materials->colors[2].a > 0)), 84 !!(eet_mesh->materials->colors[2].a > 0)),
85 evas_3d_material_enable_set(EVAS_3D_MATERIAL_NORMAL, EINA_TRUE), 85 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_NORMAL, EINA_TRUE),
86 evas_3d_material_color_set(EVAS_3D_MATERIAL_AMBIENT, 86 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_AMBIENT,
87 eet_mesh->materials->colors[0].r, 87 eet_mesh->materials->colors[0].r,
88 eet_mesh->materials->colors[0].g, 88 eet_mesh->materials->colors[0].g,
89 eet_mesh->materials->colors[0].b, 89 eet_mesh->materials->colors[0].b,
90 eet_mesh->materials->colors[0].a), 90 eet_mesh->materials->colors[0].a),
91 evas_3d_material_color_set(EVAS_3D_MATERIAL_DIFFUSE, 91 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_DIFFUSE,
92 eet_mesh->materials->colors[1].r, 92 eet_mesh->materials->colors[1].r,
93 eet_mesh->materials->colors[1].g, 93 eet_mesh->materials->colors[1].g,
94 eet_mesh->materials->colors[1].b, 94 eet_mesh->materials->colors[1].b,
95 eet_mesh->materials->colors[1].a), 95 eet_mesh->materials->colors[1].a),
96 evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR, 96 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_SPECULAR,
97 eet_mesh->materials->colors[2].r, 97 eet_mesh->materials->colors[2].r,
98 eet_mesh->materials->colors[2].g, 98 eet_mesh->materials->colors[2].g,
99 eet_mesh->materials->colors[2].b, 99 eet_mesh->materials->colors[2].b,
100 eet_mesh->materials->colors[2].a), 100 eet_mesh->materials->colors[2].a),
101 evas_3d_material_shininess_set(eet_mesh->materials->shininess)); 101 evas_canvas3d_material_shininess_set(eet_mesh->materials->shininess));
102 102
103 eo_do(mesh, evas_3d_mesh_frame_material_set(0, material)); 103 eo_do(mesh, evas_canvas3d_mesh_frame_material_set(0, material));
104} 104}
105 105
106void 106void
107evas_model_load_file_eet(Evas_3D_Mesh *mesh, Eina_File *file) 107evas_model_load_file_eet(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
108{ 108{
109 Eet_File *ef; 109 Eet_File *ef;
110 110
111 _evas_3d_eet_file_init(); 111 _evas_canvas3d_eet_file_init();
112 ef = eet_mmap(file); 112 ef = eet_mmap(file);
113 eet_file = eet_data_read(ef, 113 eet_file = eet_data_read(ef,
114 _file_descriptor, 114 _file_descriptor,
115 EVAS_3D_FILE_CACHE_FILE_ENTRY); 115 EVAS_CANVAS3D_FILE_CACHE_FILE_ENTRY);
116 116
117 eet_close(ef); 117 eet_close(ef);
118 118
119 if ((eet_file->mesh == NULL) || (eet_file->header == NULL)) 119 if ((eet_file->mesh == NULL) || (eet_file->header == NULL))
120 { 120 {
121 ERR("Reading of file is failed."); 121 ERR("Reading of file is failed.");
122 _evas_3d_eet_file_free(); 122 _evas_canvas3d_eet_file_free();
123 return; 123 return;
124 } 124 }
125 125
126 _set_geometry_to_mesh_from_eet_file(mesh, eet_file->mesh); 126 _set_geometry_to_mesh_from_eet_file(mesh, eet_file->mesh);
127 _set_material_to_mesh_from_eet_file(mesh, eet_file->mesh); 127 _set_material_to_mesh_from_eet_file(mesh, eet_file->mesh);
128 128
129 _evas_3d_eet_file_free(); 129 _evas_canvas3d_eet_file_free();
130} 130}
131 131
132 132
diff --git a/src/modules/evas/model_loaders/md2/evas_model_load_md2.c b/src/modules/evas/model_loaders/md2/evas_model_load_md2.c
index 98989ab..169b7f6 100644
--- a/src/modules/evas/model_loaders/md2/evas_model_load_md2.c
+++ b/src/modules/evas/model_loaders/md2/evas_model_load_md2.c
@@ -318,14 +318,14 @@ error:
318} 318}
319 319
320void 320void
321evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file) 321evas_model_load_file_md2(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
322{ 322{
323 MD2_Loader loader; 323 MD2_Loader loader;
324 int i, j, k; 324 int i, j, k;
325 float *pos, *nor, *tex; 325 float *pos, *nor, *tex;
326 int stride_pos, stride_nor, stride_tex; 326 int stride_pos, stride_nor, stride_tex;
327 float s_scale, t_scale; 327 float s_scale, t_scale;
328 Evas_3D_Mesh_Data *pd; 328 Evas_Canvas3D_Mesh_Data *pd;
329 329
330 /* Initialize MD2 loader (Open file and read MD2 head ant etc) */ 330 /* Initialize MD2 loader (Open file and read MD2 head ant etc) */
331 if (!_md2_loader_init(&loader, file)) 331 if (!_md2_loader_init(&loader, file))
@@ -338,8 +338,8 @@ evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
338 t_scale = 1.0 / (float)(loader.skin_height - 1); 338 t_scale = 1.0 / (float)(loader.skin_height - 1);
339 339
340 eo_do(mesh, 340 eo_do(mesh,
341 evas_3d_mesh_vertex_count_set(loader.triangle_count * 3), 341 evas_canvas3d_mesh_vertex_count_set(loader.triangle_count * 3),
342 evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES)); 342 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES));
343 343
344 /* Load frames */ 344 /* Load frames */
345 for (i = 0; i < loader.frame_count; i++) 345 for (i = 0; i < loader.frame_count; i++)
@@ -349,21 +349,21 @@ evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
349 349
350 eo_do(mesh, 350 eo_do(mesh,
351 /* Add a mesh frame. */ 351 /* Add a mesh frame. */
352 evas_3d_mesh_frame_add(f), 352 evas_canvas3d_mesh_frame_add(f),
353 353
354 /* Allocate vertex buffer for the frame. */ 354 /* Allocate vertex buffer for the frame. */
355 evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_POSITION, 0, NULL), 355 evas_canvas3d_mesh_frame_vertex_data_copy_set(f, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
356 evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_NORMAL, 0, NULL), 356 evas_canvas3d_mesh_frame_vertex_data_copy_set(f, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
357 evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_TEXCOORD, 0, NULL), 357 evas_canvas3d_mesh_frame_vertex_data_copy_set(f, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
358 358
359 /* Map vertex buffer. */ 359 /* Map vertex buffer. */
360 pos = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_POSITION), 360 pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(f, EVAS_CANVAS3D_VERTEX_POSITION),
361 nor = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_NORMAL), 361 nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(f, EVAS_CANVAS3D_VERTEX_NORMAL),
362 tex = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_TEXCOORD), 362 tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(f, EVAS_CANVAS3D_VERTEX_TEXCOORD),
363 363
364 stride_pos = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_POSITION), 364 stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(f, EVAS_CANVAS3D_VERTEX_POSITION),
365 stride_nor = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_NORMAL), 365 stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(f, EVAS_CANVAS3D_VERTEX_NORMAL),
366 stride_tex = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_TEXCOORD)); 366 stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(f, EVAS_CANVAS3D_VERTEX_TEXCOORD));
367 367
368 if (stride_pos == 0) 368 if (stride_pos == 0)
369 stride_pos = sizeof(float) * 3; 369 stride_pos = sizeof(float) * 3;
@@ -405,13 +405,13 @@ evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
405 405
406 /* Unmap vertex buffer. */ 406 /* Unmap vertex buffer. */
407 eo_do(mesh, 407 eo_do(mesh,
408 evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_POSITION), 408 evas_canvas3d_mesh_frame_vertex_data_unmap(f, EVAS_CANVAS3D_VERTEX_POSITION),
409 evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_NORMAL), 409 evas_canvas3d_mesh_frame_vertex_data_unmap(f, EVAS_CANVAS3D_VERTEX_NORMAL),
410 evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_TEXCOORD)); 410 evas_canvas3d_mesh_frame_vertex_data_unmap(f, EVAS_CANVAS3D_VERTEX_TEXCOORD));
411 411
412 pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); 412 pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
413 413
414 if (!evas_3d_mesh_aabb_add_to_frame(pd, f, stride_pos)) 414 if (!evas_canvas3d_mesh_aabb_add_to_frame(pd, f, stride_pos))
415 { 415 {
416 ERR("Axis-Aligned Bounding Box wasn't added in frame %d ", f); 416 ERR("Axis-Aligned Bounding Box wasn't added in frame %d ", f);
417 } 417 }
diff --git a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
index e1fdf48..ccb65ea 100644
--- a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
+++ b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
@@ -217,7 +217,7 @@ _read_point(int *triangles,
217} 217}
218 218
219void 219void
220evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file) 220evas_model_load_file_obj(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
221{ 221{
222 long i; 222 long i;
223 OBJ_Counts counts;//count elements of mesh in .obj 223 OBJ_Counts counts;//count elements of mesh in .obj
@@ -373,24 +373,24 @@ evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file)
373 373
374 /* prepare of mesh and take pointers to data which must be read */ 374 /* prepare of mesh and take pointers to data which must be read */
375 eo_do(mesh, 375 eo_do(mesh,
376 evas_3d_mesh_vertex_count_set(counts._triangles_counter * 3), 376 evas_canvas3d_mesh_vertex_count_set(counts._triangles_counter * 3),
377 evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES), 377 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
378 evas_3d_mesh_frame_add(0), 378 evas_canvas3d_mesh_frame_add(0),
379 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_POSITION, 0, NULL), 379 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
380 pos = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_POSITION), 380 pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_POSITION),
381 stride_pos = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_POSITION)); 381 stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_POSITION));
382 382
383 if (counts.existence_of_normal) 383 if (counts.existence_of_normal)
384 eo_do(mesh, 384 eo_do(mesh,
385 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_NORMAL, 0, NULL), 385 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
386 nor = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_NORMAL), 386 nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_NORMAL),
387 stride_nor = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_NORMAL)); 387 stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_NORMAL));
388 388
389 if (counts.existence_of_tex_point) 389 if (counts.existence_of_tex_point)
390 eo_do(mesh, 390 eo_do(mesh,
391 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_TEXCOORD, 0, NULL), 391 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
392 tex = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_TEXCOORD), 392 tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
393 stride_tex = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_TEXCOORD)); 393 stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
394 394
395 if (stride_pos == 0) stride_pos = sizeof(float) * 3; 395 if (stride_pos == 0) stride_pos = sizeof(float) * 3;
396 if ((counts.existence_of_normal) && (stride_nor == 0)) 396 if ((counts.existence_of_normal) && (stride_nor == 0))
@@ -437,15 +437,15 @@ evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file)
437 free(_triangles); 437 free(_triangles);
438 438
439 /* Unmap vertex buffer. */ 439 /* Unmap vertex buffer. */
440 eo_do(mesh, evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_POSITION)); 440 eo_do(mesh, evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_POSITION));
441 if (counts.existence_of_normal) 441 if (counts.existence_of_normal)
442 eo_do(mesh, evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_NORMAL)); 442 eo_do(mesh, evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_NORMAL));
443 if (counts.existence_of_tex_point) 443 if (counts.existence_of_tex_point)
444 eo_do(mesh, evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_TEXCOORD)); 444 eo_do(mesh, evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
445 445
446 Evas_3D_Mesh_Data *pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); 446 Evas_Canvas3D_Mesh_Data *pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
447 447
448 if (!evas_3d_mesh_aabb_add_to_frame(pd, 0, stride_pos)) 448 if (!evas_canvas3d_mesh_aabb_add_to_frame(pd, 0, stride_pos))
449 { 449 {
450 ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0); 450 ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0);
451 } 451 }
diff --git a/src/modules/evas/model_loaders/ply/evas_model_load_ply.c b/src/modules/evas/model_loaders/ply/evas_model_load_ply.c
index 0eac908..7812780 100644
--- a/src/modules/evas/model_loaders/ply/evas_model_load_ply.c
+++ b/src/modules/evas/model_loaders/ply/evas_model_load_ply.c
@@ -178,9 +178,9 @@ _read_header(char *map)//Check properties of mesh in .ply file.
178} 178}
179 179
180void 180void
181evas_model_load_file_ply(Evas_3D_Mesh *mesh, Eina_File *file) 181evas_model_load_file_ply(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
182{ 182{
183 Evas_3D_Mesh_Data *pd; 183 Evas_Canvas3D_Mesh_Data *pd;
184 int i = 0, j = 0, k = 0, count_of_triangles_in_line = 0; 184 int i = 0, j = 0, k = 0, count_of_triangles_in_line = 0;
185 float *pos, *nor, *tex, *col; 185 float *pos, *nor, *tex, *col;
186 int stride_pos, stride_nor, stride_tex, stride_col; 186 int stride_pos, stride_nor, stride_tex, stride_col;
@@ -275,23 +275,23 @@ evas_model_load_file_ply(Evas_3D_Mesh *mesh, Eina_File *file)
275 275
276 /* prepare of mesh and take pointers to data which must be read */ 276 /* prepare of mesh and take pointers to data which must be read */
277 eo_do(mesh, 277 eo_do(mesh,
278 evas_3d_mesh_vertex_count_set(header.triangles_count * 3), 278 evas_canvas3d_mesh_vertex_count_set(header.triangles_count * 3),
279 evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES), 279 evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
280 evas_3d_mesh_frame_add(0), 280 evas_canvas3d_mesh_frame_add(0),
281 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_POSITION, 0, NULL), 281 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
282 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_NORMAL, 0, NULL), 282 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
283 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_TEXCOORD, 0, NULL), 283 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
284 evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_COLOR, 0, NULL), 284 evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_COLOR, 0, NULL),
285 285
286 pos = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_POSITION), 286 pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_POSITION),
287 nor = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_NORMAL), 287 nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_NORMAL),
288 tex = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_TEXCOORD), 288 tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
289 col = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_COLOR), 289 col = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_COLOR),
290 290
291 stride_pos = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_POSITION), 291 stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_POSITION),
292 stride_nor = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_NORMAL), 292 stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_NORMAL),
293 stride_tex = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_TEXCOORD), 293 stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
294 stride_col = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_COLOR)); 294 stride_col = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_COLOR));
295 295
296 if (stride_pos == 0) stride_pos = sizeof(float) * 3; 296 if (stride_pos == 0) stride_pos = sizeof(float) * 3;
297 if (stride_nor == 0) stride_nor = sizeof(float) * 3; 297 if (stride_nor == 0) stride_nor = sizeof(float) * 3;
@@ -366,14 +366,14 @@ evas_model_load_file_ply(Evas_3D_Mesh *mesh, Eina_File *file)
366 366
367 /* Unmap vertex buffer. */ 367 /* Unmap vertex buffer. */
368 eo_do(mesh, 368 eo_do(mesh,
369 evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_POSITION), 369 evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_POSITION),
370 evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_NORMAL), 370 evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_NORMAL),
371 evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_TEXCOORD), 371 evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
372 evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_COLOR)); 372 evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_COLOR));
373 373
374 pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); 374 pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
375 375
376 if (!evas_3d_mesh_aabb_add_to_frame(pd, 0, stride_pos)) 376 if (!evas_canvas3d_mesh_aabb_add_to_frame(pd, 0, stride_pos))
377 { 377 {
378 ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0); 378 ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0);
379 } 379 }