aboutsummaryrefslogtreecommitdiffstats
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
parenteina: add eina_quaternion_set (diff)
downloadefl-d409df1caa38ae7eac87f85ff4113484bc5b2099.tar.gz
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 815b9f1d50..803846d244 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 @@
#include "evas_common_private.h"
#include "evas_private.h"
-extern Evas_3D_File_Eet* eet_file;
-extern const char EVAS_3D_FILE_CACHE_FILE_ENTRY[];
+extern Evas_Canvas3D_File_Eet* eet_file;
+extern const char EVAS_CANVAS3D_FILE_CACHE_FILE_ENTRY[];
extern Eet_Data_Descriptor *_file_descriptor;
void
-_set_geometry_to_mesh_from_eet_file(Evas_3D_Mesh *mesh,
- Evas_3D_Mesh_Eet *eet_mesh)
+_set_geometry_to_mesh_from_eet_file(Evas_Canvas3D_Mesh *mesh,
+ Evas_Canvas3D_Mesh_Eet *eet_mesh)
{
float *pos, *nor, *tex;
int stride_pos, stride_nor, stride_tex, j;
eo_do(mesh,
- evas_3d_mesh_vertex_count_set(eet_mesh->geometries->vertices_count),
- evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES),
- evas_3d_mesh_frame_add(0),
+ evas_canvas3d_mesh_vertex_count_set(eet_mesh->geometries->vertices_count),
+ evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
+ evas_canvas3d_mesh_frame_add(0),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_POSITION, 0, NULL),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_NORMAL, 0, NULL),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_TEXCOORD, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
- pos = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_POSITION),
- nor = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_NORMAL),
- tex = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_TEXCOORD),
+ pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_POSITION),
+ nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_NORMAL),
+ tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
- stride_pos = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_POSITION),
- stride_nor = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_NORMAL),
- stride_tex = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_TEXCOORD));
+ stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_POSITION),
+ stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_NORMAL),
+ stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
if (stride_pos == 0) stride_pos = sizeof(float) * 3;
if (stride_nor == 0) stride_nor = sizeof(float) * 3;
@@ -62,71 +62,71 @@ _set_geometry_to_mesh_from_eet_file(Evas_3D_Mesh *mesh,
/* unmap vertex buffer */
eo_do(mesh,
- evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_POSITION),
- evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_NORMAL),
- evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_TEXCOORD));
+ evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_POSITION),
+ evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_NORMAL),
+ evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
}
void
-_set_material_to_mesh_from_eet_file(Evas_3D_Mesh *mesh,
- Evas_3D_Mesh_Eet *eet_mesh)
+_set_material_to_mesh_from_eet_file(Evas_Canvas3D_Mesh *mesh,
+ Evas_Canvas3D_Mesh_Eet *eet_mesh)
{
- Evas_3D_Object_Data *pd = eo_data_scope_get(mesh, EVAS_3D_OBJECT_CLASS);
+ Evas_Canvas3D_Object_Data *pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_OBJECT_CLASS);
Eo *material = NULL;
- material = eo_add(EVAS_3D_MATERIAL_CLASS, pd->evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, pd->evas);
eo_do(material,
- evas_3d_material_enable_set(EVAS_3D_MATERIAL_AMBIENT,
+ evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_AMBIENT,
!!(eet_mesh->materials->colors[0].a > 0)),
- evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE,
+ evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_DIFFUSE,
!!(eet_mesh->materials->colors[1].a > 0)),
- evas_3d_material_enable_set(EVAS_3D_MATERIAL_SPECULAR,
+ evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_SPECULAR,
!!(eet_mesh->materials->colors[2].a > 0)),
- evas_3d_material_enable_set(EVAS_3D_MATERIAL_NORMAL, EINA_TRUE),
- evas_3d_material_color_set(EVAS_3D_MATERIAL_AMBIENT,
+ evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_NORMAL, EINA_TRUE),
+ evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_AMBIENT,
eet_mesh->materials->colors[0].r,
eet_mesh->materials->colors[0].g,
eet_mesh->materials->colors[0].b,
eet_mesh->materials->colors[0].a),
- evas_3d_material_color_set(EVAS_3D_MATERIAL_DIFFUSE,
+ evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_DIFFUSE,
eet_mesh->materials->colors[1].r,
eet_mesh->materials->colors[1].g,
eet_mesh->materials->colors[1].b,
eet_mesh->materials->colors[1].a),
- evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR,
+ evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_SPECULAR,
eet_mesh->materials->colors[2].r,
eet_mesh->materials->colors[2].g,
eet_mesh->materials->colors[2].b,
eet_mesh->materials->colors[2].a),
- evas_3d_material_shininess_set(eet_mesh->materials->shininess));
+ evas_canvas3d_material_shininess_set(eet_mesh->materials->shininess));
- eo_do(mesh, evas_3d_mesh_frame_material_set(0, material));
+ eo_do(mesh, evas_canvas3d_mesh_frame_material_set(0, material));
}
void
-evas_model_load_file_eet(Evas_3D_Mesh *mesh, Eina_File *file)
+evas_model_load_file_eet(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
{
Eet_File *ef;
- _evas_3d_eet_file_init();
+ _evas_canvas3d_eet_file_init();
ef = eet_mmap(file);
eet_file = eet_data_read(ef,
_file_descriptor,
- EVAS_3D_FILE_CACHE_FILE_ENTRY);
+ EVAS_CANVAS3D_FILE_CACHE_FILE_ENTRY);
eet_close(ef);
if ((eet_file->mesh == NULL) || (eet_file->header == NULL))
{
ERR("Reading of file is failed.");
- _evas_3d_eet_file_free();
+ _evas_canvas3d_eet_file_free();
return;
}
_set_geometry_to_mesh_from_eet_file(mesh, eet_file->mesh);
_set_material_to_mesh_from_eet_file(mesh, eet_file->mesh);
- _evas_3d_eet_file_free();
+ _evas_canvas3d_eet_file_free();
}
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 98989abed1..169b7f6023 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:
}
void
-evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
+evas_model_load_file_md2(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
{
MD2_Loader loader;
int i, j, k;
float *pos, *nor, *tex;
int stride_pos, stride_nor, stride_tex;
float s_scale, t_scale;
- Evas_3D_Mesh_Data *pd;
+ Evas_Canvas3D_Mesh_Data *pd;
/* Initialize MD2 loader (Open file and read MD2 head ant etc) */
if (!_md2_loader_init(&loader, file))
@@ -338,8 +338,8 @@ evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
t_scale = 1.0 / (float)(loader.skin_height - 1);
eo_do(mesh,
- evas_3d_mesh_vertex_count_set(loader.triangle_count * 3),
- evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES));
+ evas_canvas3d_mesh_vertex_count_set(loader.triangle_count * 3),
+ evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES));
/* Load frames */
for (i = 0; i < loader.frame_count; i++)
@@ -349,21 +349,21 @@ evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
eo_do(mesh,
/* Add a mesh frame. */
- evas_3d_mesh_frame_add(f),
+ evas_canvas3d_mesh_frame_add(f),
/* Allocate vertex buffer for the frame. */
- evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_POSITION, 0, NULL),
- evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_NORMAL, 0, NULL),
- evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_TEXCOORD, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(f, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(f, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(f, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
/* Map vertex buffer. */
- pos = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_POSITION),
- nor = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_NORMAL),
- tex = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_TEXCOORD),
+ pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(f, EVAS_CANVAS3D_VERTEX_POSITION),
+ nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(f, EVAS_CANVAS3D_VERTEX_NORMAL),
+ tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(f, EVAS_CANVAS3D_VERTEX_TEXCOORD),
- stride_pos = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_POSITION),
- stride_nor = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_NORMAL),
- stride_tex = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_TEXCOORD));
+ stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(f, EVAS_CANVAS3D_VERTEX_POSITION),
+ stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(f, EVAS_CANVAS3D_VERTEX_NORMAL),
+ stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(f, EVAS_CANVAS3D_VERTEX_TEXCOORD));
if (stride_pos == 0)
stride_pos = sizeof(float) * 3;
@@ -405,13 +405,13 @@ evas_model_load_file_md2(Evas_3D_Mesh *mesh, Eina_File *file)
/* Unmap vertex buffer. */
eo_do(mesh,
- evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_POSITION),
- evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_NORMAL),
- evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_TEXCOORD));
+ evas_canvas3d_mesh_frame_vertex_data_unmap(f, EVAS_CANVAS3D_VERTEX_POSITION),
+ evas_canvas3d_mesh_frame_vertex_data_unmap(f, EVAS_CANVAS3D_VERTEX_NORMAL),
+ evas_canvas3d_mesh_frame_vertex_data_unmap(f, EVAS_CANVAS3D_VERTEX_TEXCOORD));
- pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS);
+ pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
- if (!evas_3d_mesh_aabb_add_to_frame(pd, f, stride_pos))
+ if (!evas_canvas3d_mesh_aabb_add_to_frame(pd, f, stride_pos))
{
ERR("Axis-Aligned Bounding Box wasn't added in frame %d ", f);
}
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 e1fdf48dbd..ccb65ea48d 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,
}
void
-evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file)
+evas_model_load_file_obj(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
{
long i;
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)
/* prepare of mesh and take pointers to data which must be read */
eo_do(mesh,
- evas_3d_mesh_vertex_count_set(counts._triangles_counter * 3),
- evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES),
- evas_3d_mesh_frame_add(0),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_POSITION, 0, NULL),
- pos = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_POSITION),
- stride_pos = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_POSITION));
+ evas_canvas3d_mesh_vertex_count_set(counts._triangles_counter * 3),
+ evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
+ evas_canvas3d_mesh_frame_add(0),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
+ pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_POSITION),
+ stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_POSITION));
if (counts.existence_of_normal)
eo_do(mesh,
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_NORMAL, 0, NULL),
- nor = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_NORMAL),
- stride_nor = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_NORMAL));
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
+ nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_NORMAL),
+ stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_NORMAL));
if (counts.existence_of_tex_point)
eo_do(mesh,
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_TEXCOORD, 0, NULL),
- tex = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_TEXCOORD),
- stride_tex = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_TEXCOORD));
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
+ tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
+ stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
if (stride_pos == 0) stride_pos = sizeof(float) * 3;
if ((counts.existence_of_normal) && (stride_nor == 0))
@@ -437,15 +437,15 @@ evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file)
free(_triangles);
/* Unmap vertex buffer. */
- eo_do(mesh, evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_POSITION));
+ eo_do(mesh, evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_POSITION));
if (counts.existence_of_normal)
- eo_do(mesh, evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_NORMAL));
+ eo_do(mesh, evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_NORMAL));
if (counts.existence_of_tex_point)
- eo_do(mesh, evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_TEXCOORD));
+ eo_do(mesh, evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_TEXCOORD));
- Evas_3D_Mesh_Data *pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS);
+ Evas_Canvas3D_Mesh_Data *pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
- if (!evas_3d_mesh_aabb_add_to_frame(pd, 0, stride_pos))
+ if (!evas_canvas3d_mesh_aabb_add_to_frame(pd, 0, stride_pos))
{
ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0);
}
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 0eac908dd8..7812780fb7 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.
}
void
-evas_model_load_file_ply(Evas_3D_Mesh *mesh, Eina_File *file)
+evas_model_load_file_ply(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
{
- Evas_3D_Mesh_Data *pd;
+ Evas_Canvas3D_Mesh_Data *pd;
int i = 0, j = 0, k = 0, count_of_triangles_in_line = 0;
float *pos, *nor, *tex, *col;
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)
/* prepare of mesh and take pointers to data which must be read */
eo_do(mesh,
- evas_3d_mesh_vertex_count_set(header.triangles_count * 3),
- evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES),
- evas_3d_mesh_frame_add(0),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_POSITION, 0, NULL),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_NORMAL, 0, NULL),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_TEXCOORD, 0, NULL),
- evas_3d_mesh_frame_vertex_data_copy_set(0, EVAS_3D_VERTEX_COLOR, 0, NULL),
-
- pos = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_POSITION),
- nor = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_NORMAL),
- tex = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_TEXCOORD),
- col = (float *)evas_3d_mesh_frame_vertex_data_map(0, EVAS_3D_VERTEX_COLOR),
-
- stride_pos = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_POSITION),
- stride_nor = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_NORMAL),
- stride_tex = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_TEXCOORD),
- stride_col = evas_3d_mesh_frame_vertex_stride_get(0, EVAS_3D_VERTEX_COLOR));
+ evas_canvas3d_mesh_vertex_count_set(header.triangles_count * 3),
+ evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
+ evas_canvas3d_mesh_frame_add(0),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_POSITION, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_NORMAL, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_TEXCOORD, 0, NULL),
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_COLOR, 0, NULL),
+
+ pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_POSITION),
+ nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_NORMAL),
+ tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
+ col = (float *)evas_canvas3d_mesh_frame_vertex_data_map(0, EVAS_CANVAS3D_VERTEX_COLOR),
+
+ stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_POSITION),
+ stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_NORMAL),
+ stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
+ stride_col = evas_canvas3d_mesh_frame_vertex_stride_get(0, EVAS_CANVAS3D_VERTEX_COLOR));
if (stride_pos == 0) stride_pos = sizeof(float) * 3;
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)
/* Unmap vertex buffer. */
eo_do(mesh,
- evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_POSITION),
- evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_NORMAL),
- evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_TEXCOORD),
- evas_3d_mesh_frame_vertex_data_unmap(0, EVAS_3D_VERTEX_COLOR));
+ evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_POSITION),
+ evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_NORMAL),
+ evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_TEXCOORD),
+ evas_canvas3d_mesh_frame_vertex_data_unmap(0, EVAS_CANVAS3D_VERTEX_COLOR));
- pd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS);
+ pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
- if (!evas_3d_mesh_aabb_add_to_frame(pd, 0, stride_pos))
+ if (!evas_canvas3d_mesh_aabb_add_to_frame(pd, 0, stride_pos))
{
ERR("Axis-Aligned Bounding Box wan't added in frame %d ", 0);
}