summaryrefslogtreecommitdiff
path: root/src/modules/evas/model_loaders/obj
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/obj
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/obj')
-rw-r--r--src/modules/evas/model_loaders/obj/evas_model_load_obj.c36
1 files changed, 18 insertions, 18 deletions
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 }