cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=303a6a87d039a7ba49831bb910b6570c3d7d5c93

commit 303a6a87d039a7ba49831bb910b6570c3d7d5c93
Author: Bogdan Devichev <b.devic...@samsung.com>
Date:   Wed Feb 18 22:21:47 2015 +0100

    evas: Evas_3D - regularize resource for 3D examples.
    
    Summary: This commit makes folder of examples for evas more ordered.
    
    Reviewers: raster, Hermet, cedric
    
    Subscribers: artem.popov, cedric
    
    Differential Revision: https://phab.enlightenment.org/D1985
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/examples/evas/evas-3d-aabb.c                   |   5 +++--
 src/examples/evas/evas-3d-colorpick.c              |  10 ++++++----
 src/examples/evas/evas-3d-common.h                 |   3 +++
 src/examples/evas/evas-3d-cube2.c                  |   4 +++-
 src/examples/evas/evas-3d-eet.c                    |   7 ++++---
 src/examples/evas/evas-3d-frustum.c                |   5 +++--
 src/examples/evas/evas-3d-md2.c                    |   5 +++--
 src/examples/evas/evas-3d-mmap-set.c               |   4 +++-
 src/examples/evas/evas-3d-moon-space.c             |   7 ++++---
 src/examples/evas/evas-3d-obj.c                    |  22 +++++++++++----------
 src/examples/evas/evas-3d-pick.c                   |   3 ++-
 src/examples/evas/evas-3d-ply.c                    |  20 +++++++------------
 src/examples/evas/evas-3d-shadows.c                |   5 +++--
 .../evas/{ => resources/images}/EarthDiffuse.png   | Bin
 src/examples/evas/{ => resources/images}/M15.png   | Bin
 src/examples/evas/{ => resources/images}/M15_1.png | Bin
 .../evas/{ => resources/images}/bg_space.jpg       | Bin
 src/examples/evas/{ => resources/images}/eagle.png | Bin
 src/examples/evas/{ => resources/images}/moon.png  | Bin
 .../evas/{ => resources/images}/normal_lego.png    | Bin
 src/examples/evas/{ => resources/images}/sonic.png | Bin
 .../{ => resources/images}/sweet_home_reversed.png | Bin
 src/examples/evas/{ => resources/models}/M15.mtl   |   0
 src/examples/evas/{ => resources/models}/M15.obj   |   0
 .../models}/NoNormal_NoUVs_Colors.ply              |   0
 .../models}/NoNormal_NoUVs_NoColors.ply            |   0
 .../models}/NoNormal_UVs_Colors.ply                |   0
 .../models}/NoNormal_UVs_NoColors.ply              |   0
 .../models}/Normal_NoUVs_Colors.ply                |   0
 .../models}/Normal_NoUVs_NoColors.ply              |   0
 .../models}/Normal_UVs_Colors.ply                  |   0
 .../models}/Normal_UVs_NoColors.ply                |   0
 src/examples/evas/{ => resources/models}/eagle.md2 | Bin
 .../models/mesh_for_mmap.eet}                      | Bin
 .../models/mesh_for_mmap.md2}                      | Bin
 .../models/mesh_for_mmap.mtl}                      |   0
 .../models/mesh_for_mmap.obj}                      |   0
 .../models/mesh_for_mmap.ply}                      |   0
 src/examples/evas/{ => resources/models}/sonic.md2 | Bin
 .../{obj_files => resources/models}/sweet_home.mtl |   0
 .../{obj_files => resources/models}/sweet_home.obj |   0
 .../models}/sweet_home_only_vertex_coords.mtl      |   0
 .../models}/sweet_home_only_vertex_coords.obj      |   0
 .../models}/sweet_home_without_normals.mtl         |   0
 .../models}/sweet_home_without_normals.obj         |   0
 .../models}/sweet_home_without_tex_coords.mtl      |   0
 .../models}/sweet_home_without_tex_coords.obj      |   0
 src/examples/evas/sonic.eet                        | Bin 132670 -> 0 bytes
 48 files changed, 56 insertions(+), 44 deletions(-)

diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index 7fd8d98..722796c 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -13,6 +13,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH 400
 #define  HEIGHT 400
@@ -227,13 +228,13 @@ main(void)
    material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
 
    eo_do(mesh,
-         efl_file_set("sonic.md2", NULL),
+         efl_file_set(EVAS_3D_MODEL_FOLDER"sonic.md2", NULL),
          evas_3d_mesh_frame_material_set(0, material),
          evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
 
    texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
    eo_do(texture,
-         evas_3d_texture_file_set("sonic.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"sonic.png", NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
                                     EVAS_3D_TEXTURE_FILTER_NEAREST),
          evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
diff --git a/src/examples/evas/evas-3d-colorpick.c 
b/src/examples/evas/evas-3d-colorpick.c
index 4f00846..2dce999 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -7,8 +7,9 @@
  * Use key LEFT/RIGHT for scale each node
  * Use shortcut parameters of commanline: r - rows of objects, c - columns of 
objects, m - path for model name,
  * f - path for first texture, s - path for second texture.
- * Compile with "gcc -o evas-3d-colorpick evas-3d-colorpick.c `pkg-config 
--libs --cflags evas ecore ecore-evas eo eina efl`
+ * Compile with "gcc -o evas-3d-colorpick evas-3d-colorpick.c `pkg-config 
--libs --cflags evas ecore ecore-evas eo eina efl`"
  */
+//TODO new resources
 
 #define EFL_EO_API_SUPPORT
 #define EFL_BETA_API_SUPPORT
@@ -18,6 +19,7 @@
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_Getopt.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH 800
 #define  HEIGHT 600
@@ -442,9 +444,9 @@ int main(int argc, char **argv)
 
    if (!row) row = 2;
    if (!col) col = 5;
-   if (!model) model = "M15.obj";
-   if (!texture1) texture1 = "M15.png";
-   if (!texture2) texture2 = "M15_1.png";
+   if (!model) model = EVAS_3D_MODEL_FOLDER"M15.obj";
+   if (!texture1) texture1 = EVAS_3D_IMAGE_FOLDER"M15.png";
+   if (!texture2) texture2 = EVAS_3D_IMAGE_FOLDER"M15_1.png";
 
    fprintf(stdout, "row - %d, col - %d, model - %s, texture1 - %s, texture2 - 
%s\n",
            row, col, model, texture1, texture2);
diff --git a/src/examples/evas/evas-3d-common.h 
b/src/examples/evas/evas-3d-common.h
new file mode 100644
index 0000000..065b544
--- /dev/null
+++ b/src/examples/evas/evas-3d-common.h
@@ -0,0 +1,3 @@
+#define EVAS_3D_IMAGE_FOLDER "resources/images/"
+#define EVAS_3D_MODEL_FOLDER "resources/models/"
+#define EVAS_3D_SAVED_FILES "saved_files/"
diff --git a/src/examples/evas/evas-3d-cube2.c 
b/src/examples/evas/evas-3d-cube2.c
index 5eee582..38a2d4e 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -5,6 +5,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH          400
 #define  HEIGHT         400
@@ -229,7 +230,8 @@ _mesh_setup(Scene_Data *data)
    eo_do(data->texture1,
          evas_3d_texture_data_set(EVAS_3D_COLOR_FORMAT_RGBA,
                                   EVAS_3D_PIXEL_FORMAT_8888, 4, 4, 
&pixels1[0]));
-   eo_do(data->texture_normal, evas_3d_texture_file_set("normal_lego.png", 
NULL));
+   eo_do(data->texture_normal,
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"normal_lego.png", 
NULL));
 
    eo_do(data->material0,
          evas_3d_material_texture_set(EVAS_3D_MATERIAL_DIFFUSE, 
data->texture0));
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index b9c11e4..b6966bb 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -20,6 +20,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH 1024
 #define  HEIGHT 1024
@@ -151,7 +152,7 @@ main(void)
    material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
 
    eo_do(mesh,
-         efl_file_set("sonic.md2", NULL),
+         efl_file_set(EVAS_3D_MODEL_FOLDER"sonic.md2", NULL),
          evas_3d_mesh_frame_material_set(0, material),
          evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
 
@@ -168,10 +169,10 @@ main(void)
                                     0.50, 0.00, 0.50, 0.30),
          evas_3d_material_shininess_set(50.0));
 
-   eo_do(mesh, efl_file_save("saved_Sonic_EET.eet", NULL, NULL));
+   eo_do(mesh, efl_file_save(EVAS_3D_SAVED_FILES"saved_Sonic_EET.eet", NULL, 
NULL));
 
    eo_do(mesh2,
-         efl_file_set("saved_Sonic_EET.eet", NULL),
+         efl_file_set(EVAS_3D_SAVED_FILES"saved_Sonic_EET.eet", NULL),
          evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
 
    mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas,
diff --git a/src/examples/evas/evas-3d-frustum.c 
b/src/examples/evas/evas-3d-frustum.c
index fc14fb8..75c936a 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -19,6 +19,7 @@
 #include <Evas.h>
 #include <Eo.h>
 #include <math.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH          800
 #define  HEIGHT         600
@@ -452,7 +453,7 @@ _mesh_setup_model(Scene_Data *data)
    data->texture_model = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
 
    eo_do(data->texture_model,
-         evas_3d_texture_file_set("eagle.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"eagle.png", NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST, 
EVAS_3D_TEXTURE_FILTER_NEAREST),
          evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT, 
EVAS_3D_WRAP_MODE_REPEAT));
 
@@ -469,7 +470,7 @@ _mesh_setup_model(Scene_Data *data)
          evas_3d_material_shininess_set(100.0));
 
    eo_do(data->mesh_model,
-         efl_file_set("eagle.md2", NULL),
+         efl_file_set(EVAS_3D_MODEL_FOLDER"eagle.md2", NULL),
          evas_3d_mesh_frame_material_set(0, data->material_model),
          evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_DIFFUSE));
 }
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index b22c76e..76546cd 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -5,6 +5,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH 400
 #define  HEIGHT 400
@@ -120,13 +121,13 @@ main(void)
    material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
 
    eo_do(mesh,
-         efl_file_set("sonic.md2", NULL),
+         efl_file_set(EVAS_3D_MODEL_FOLDER"sonic.md2", NULL),
          evas_3d_mesh_frame_material_set(0, material),
          evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
 
    texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
    eo_do(texture,
-         evas_3d_texture_file_set("sonic.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"sonic.png", NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
                                     EVAS_3D_TEXTURE_FILTER_NEAREST),
          evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
diff --git a/src/examples/evas/evas-3d-mmap-set.c 
b/src/examples/evas/evas-3d-mmap-set.c
index 33c0d18..501046d 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -17,6 +17,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #include <math.h>
 
@@ -24,7 +25,8 @@
 #define  HEIGHT 1000
 
 #define LOAD_AND_ADD_MESH(extention, number)                                   
       \
-   extention##_file = eina_file_open("mesh_mmap_set/mesh."#extention, 0);      
       \
+   extention##_file =                                                          
       \
+      eina_file_open(EVAS_3D_MODEL_FOLDER"mesh_for_mmap."#extention, 0);       
       \
    mesh_##extention = eo_add(EVAS_3D_MESH_CLASS, evas);                        
       \
    eo_do(mesh_##extention,                                                     
       \
          evas_3d_mesh_mmap_set(extention##_file, NULL),                        
       \
diff --git a/src/examples/evas/evas-3d-moon-space.c 
b/src/examples/evas/evas-3d-moon-space.c
index fbaec2a..87d8bb1 100644
--- a/src/examples/evas/evas-3d-moon-space.c
+++ b/src/examples/evas/evas-3d-moon-space.c
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <Eo.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH          1024
 #define  HEIGHT         1024
@@ -447,7 +448,7 @@ _mesh_setup(Scene_Data *data)
 
    /* Setup material and texture for planet. */
    eo_do(data->texture_diffuse_planet,
-         evas_3d_texture_file_set("EarthDiffuse.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"EarthDiffuse.png", 
NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_LINEAR, 
EVAS_3D_TEXTURE_FILTER_LINEAR));
 
    eo_do(data->material_planet,
@@ -462,7 +463,7 @@ _mesh_setup(Scene_Data *data)
 
    /* Setup material and texture for moon. */
    eo_do(data->texture_diffuse_moon,
-         evas_3d_texture_file_set("moon.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"moon.png", NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_LINEAR, 
EVAS_3D_TEXTURE_FILTER_LINEAR));
 
    eo_do(data->material_moon,
@@ -732,7 +733,7 @@ main(void)
 
    /* Add evas objects. */
    background = evas_object_image_filled_add(evas);
-   evas_object_image_file_set(background, "bg_space.jpg", NULL),
+   evas_object_image_file_set(background, EVAS_3D_IMAGE_FOLDER"bg_space.jpg", 
NULL),
    evas_object_resize(background, WIDTH, HEIGHT),
    evas_object_show(background);
 
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index 639babc..b0203d3 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -4,8 +4,8 @@
 *
 * Read mesh from "sweet_home(parameters).obj".
 * After that cheange some properties of material.
-* After that save material to "saved_home(parameters).mtl"
-* and geometry to "saved_home(parameters).obj".
+* After that save material to "saved_files/saved_home(parameters).mtl"
+* and geometry to "saved_files/saved_home(parameters).obj".
 * If material was not set it will be not saved.
 *
 * @verbatim
@@ -20,6 +20,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH 1900
 #define  HEIGHT 1080
@@ -36,12 +37,10 @@
 #define GRID_SIZE 6
 #define NUMBER_OF_MESHES 8
 
-#define RESOURCE_FOLDER "obj_files/"
-
 #define ADD_OBJ_MESH(path, Y, Z, num, shade_mode, name_of_material)            
     \
    mesh[num] = eo_add(EVAS_3D_MESH_CLASS, evas);                               
     \
    eo_do(mesh[num],                                                            
     \
-         efl_file_set(RESOURCE_FOLDER#path".obj", NULL),                       
     \
+         efl_file_set(path".obj", NULL),                                       
     \
          evas_3d_mesh_frame_material_set(0, name_of_material),                 
     \
          evas_3d_mesh_shade_mode_set(shade_mode));                             
     \
    mesh_node[num] = eo_add(EVAS_3D_NODE_CLASS, evas,                           
     \
@@ -52,10 +51,13 @@
          evas_3d_node_mesh_add(mesh[num]),                                     
     \
          evas_3d_node_position_set(0, Y, Z));                                  
     \
 
-#define ADD_OBJ_MESH_AND_SAVED_COPY(path, Y, Z, num, shade_mode, 
name_of_material)      \
-   ADD_OBJ_MESH(sweet_##path, Y, Z, num, shade_mode, name_of_material)         
         \
-   eo_do(mesh[num], efl_file_save(RESOURCE_FOLDER"saved_"#path".obj", NULL, 
NULL));     \
-   ADD_OBJ_MESH(saved_##path, Y + COPY_OFFSET, Z, num + 4, shade_mode, 
name_of_material)
+#define ADD_OBJ_MESH_AND_SAVED_COPY(path, Y, Z, num, shade_mode, 
name_of_material)  \
+   ADD_OBJ_MESH(EVAS_3D_MODEL_FOLDER"sweet_"#path,                             
     \
+                Y, Z, num, shade_mode, name_of_material)                       
     \
+   eo_do(mesh[num], efl_file_save(EVAS_3D_SAVED_FILES"saved_"#path".obj",      
     \
+                                  NULL, NULL));                                
     \
+   ADD_OBJ_MESH(EVAS_3D_SAVED_FILES"saved_"#path,                              
     \
+                Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material)
 
 #define ADD_TEXTURE(name, path)                                       \
    name = eo_add(EVAS_3D_TEXTURE_CLASS, evas);                        \
@@ -191,7 +193,7 @@ main(void)
    eo_do(root_node,
          evas_3d_node_member_add(light_node));
 
-   ADD_TEXTURE(texture, "sweet_home_reversed.png")
+   ADD_TEXTURE(texture, EVAS_3D_IMAGE_FOLDER"sweet_home_reversed.png")
 
    ADD_MATERIAL(material)
 
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index 9ac4cf9..f983146 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -6,6 +6,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH          400
 #define  HEIGHT         400
@@ -343,7 +344,7 @@ main(void)
 
    texture_diffuse = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
    eo_do(texture_diffuse,
-         evas_3d_texture_file_set("EarthDiffuse.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"EarthDiffuse.png", 
NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_LINEAR,
                                     EVAS_3D_TEXTURE_FILTER_LINEAR));
    eo_do(material,
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index ed8209e..d6102f9 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -10,6 +10,7 @@
 * gcc -o evas-3d-ply evas-3d-ply.c `pkg-config --libs --cflags efl evas ecore 
ecore-evas eo`
 * @endverbatim
 */
+//TODO new resources
 
 #define EFL_EO_API_SUPPORT
 #define EFL_BETA_API_SUPPORT
@@ -18,6 +19,7 @@
 #include <Evas.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
+#include "evas-3d-common.h"
 
 #define  WIDTH 1024
 #define  HEIGHT 1024
@@ -45,15 +47,6 @@ Eo *texture = NULL;
 Eo *light = NULL;
 Ecore_Animator *anim = NULL;
 
-char *folder = "ply_files";
-char *path_file[8] = {"ply_files/Normal_UVs_Colors.ply",
-                      "ply_files/Normal_UVs_NoColors.ply",
-                      "ply_files/Normal_NoUVs_Colors.ply",
-                      "ply_files/Normal_NoUVs_NoColors.ply",
-                      "ply_files/NoNormal_UVs_Colors.ply",
-                      "ply_files/NoNormal_UVs_NoColors.ply",
-                      "ply_files/NoNormal_NoUVs_Colors.ply",
-                      "ply_files/NoNormal_NoUVs_NoColors.ply"};
 char *file_name[8] = {"Normal_UVs_Colors.ply",
                       "Normal_UVs_NoColors.ply",
                       "Normal_NoUVs_Colors.ply",
@@ -164,7 +157,7 @@ main(void)
    material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
    texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
    eo_do(texture,
-         evas_3d_texture_file_set("indian_DIFF3.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"normal_lego.png", NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
                                     EVAS_3D_TEXTURE_FILTER_NEAREST),
          evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
@@ -188,18 +181,19 @@ main(void)
      {
         mesh[i] = eo_add(EVAS_3D_MESH_CLASS, evas);
 
+        snprintf(buffer, PATH_MAX, "%s%s", EVAS_3D_MODEL_FOLDER, file_name[i % 
8]);
         eo_do(mesh[i],
-              efl_file_set(path_file[i % 8], NULL),
+              efl_file_set(buffer, NULL),
               evas_3d_mesh_frame_material_set(0, material),
               evas_3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
 
-        snprintf(buffer, PATH_MAX, "%s/Saved_%s", folder, file_name[i % 8]);
+        snprintf(buffer, PATH_MAX, "%s%s", EVAS_3D_SAVED_FILES, file_name[i % 
8]);
         eo_do(mesh[i], efl_file_save(buffer, NULL, NULL));
 
         if (i > 15)
           {
              eo_do(mesh[i],
-                   efl_file_set(path_file[i % 8], NULL),
+                   efl_file_set(buffer, NULL),
                    evas_3d_mesh_frame_material_set(0, material),
                    evas_3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
           }
diff --git a/src/examples/evas/evas-3d-shadows.c 
b/src/examples/evas/evas-3d-shadows.c
index ec37f2e..df5184b 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -18,6 +18,7 @@
 #include <Eina.h>
 #include <math.h>
 #include "evas-3d-primitives.c"
+#include "evas-3d-common.h"
 
 #define  WIDTH 1024
 #define  HEIGHT 1024
@@ -236,7 +237,7 @@ _model_setup(Body_3D *model)
 {
    Eo *texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
    eo_do(texture,
-         evas_3d_texture_file_set("sonic.png", NULL),
+         evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"sonic.png", NULL),
          evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
                                     EVAS_3D_TEXTURE_FILTER_NEAREST),
          evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
@@ -255,7 +256,7 @@ _model_setup(Body_3D *model)
    model->mesh = eo_add(EVAS_3D_MESH_CLASS, evas);
 
    eo_do(model->mesh,
-         efl_file_set("sonic.md2", NULL),
+         efl_file_set(EVAS_3D_MODEL_FOLDER"sonic.md2", NULL),
          evas_3d_mesh_frame_material_set(0, model->material),
          evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
 
diff --git a/src/examples/evas/EarthDiffuse.png 
b/src/examples/evas/resources/images/EarthDiffuse.png
similarity index 100%
rename from src/examples/evas/EarthDiffuse.png
rename to src/examples/evas/resources/images/EarthDiffuse.png
diff --git a/src/examples/evas/M15.png 
b/src/examples/evas/resources/images/M15.png
similarity index 100%
rename from src/examples/evas/M15.png
rename to src/examples/evas/resources/images/M15.png
diff --git a/src/examples/evas/M15_1.png 
b/src/examples/evas/resources/images/M15_1.png
similarity index 100%
rename from src/examples/evas/M15_1.png
rename to src/examples/evas/resources/images/M15_1.png
diff --git a/src/examples/evas/bg_space.jpg 
b/src/examples/evas/resources/images/bg_space.jpg
similarity index 100%
rename from src/examples/evas/bg_space.jpg
rename to src/examples/evas/resources/images/bg_space.jpg
diff --git a/src/examples/evas/eagle.png 
b/src/examples/evas/resources/images/eagle.png
similarity index 100%
rename from src/examples/evas/eagle.png
rename to src/examples/evas/resources/images/eagle.png
diff --git a/src/examples/evas/moon.png 
b/src/examples/evas/resources/images/moon.png
similarity index 100%
rename from src/examples/evas/moon.png
rename to src/examples/evas/resources/images/moon.png
diff --git a/src/examples/evas/normal_lego.png 
b/src/examples/evas/resources/images/normal_lego.png
similarity index 100%
rename from src/examples/evas/normal_lego.png
rename to src/examples/evas/resources/images/normal_lego.png
diff --git a/src/examples/evas/sonic.png 
b/src/examples/evas/resources/images/sonic.png
similarity index 100%
rename from src/examples/evas/sonic.png
rename to src/examples/evas/resources/images/sonic.png
diff --git a/src/examples/evas/sweet_home_reversed.png 
b/src/examples/evas/resources/images/sweet_home_reversed.png
similarity index 100%
rename from src/examples/evas/sweet_home_reversed.png
rename to src/examples/evas/resources/images/sweet_home_reversed.png
diff --git a/src/examples/evas/M15.mtl 
b/src/examples/evas/resources/models/M15.mtl
similarity index 100%
rename from src/examples/evas/M15.mtl
rename to src/examples/evas/resources/models/M15.mtl
diff --git a/src/examples/evas/M15.obj 
b/src/examples/evas/resources/models/M15.obj
similarity index 100%
rename from src/examples/evas/M15.obj
rename to src/examples/evas/resources/models/M15.obj
diff --git a/src/examples/evas/ply_files/NoNormal_NoUVs_Colors.ply 
b/src/examples/evas/resources/models/NoNormal_NoUVs_Colors.ply
similarity index 100%
rename from src/examples/evas/ply_files/NoNormal_NoUVs_Colors.ply
rename to src/examples/evas/resources/models/NoNormal_NoUVs_Colors.ply
diff --git a/src/examples/evas/ply_files/NoNormal_NoUVs_NoColors.ply 
b/src/examples/evas/resources/models/NoNormal_NoUVs_NoColors.ply
similarity index 100%
rename from src/examples/evas/ply_files/NoNormal_NoUVs_NoColors.ply
rename to src/examples/evas/resources/models/NoNormal_NoUVs_NoColors.ply
diff --git a/src/examples/evas/ply_files/NoNormal_UVs_Colors.ply 
b/src/examples/evas/resources/models/NoNormal_UVs_Colors.ply
similarity index 100%
rename from src/examples/evas/ply_files/NoNormal_UVs_Colors.ply
rename to src/examples/evas/resources/models/NoNormal_UVs_Colors.ply
diff --git a/src/examples/evas/ply_files/NoNormal_UVs_NoColors.ply 
b/src/examples/evas/resources/models/NoNormal_UVs_NoColors.ply
similarity index 100%
rename from src/examples/evas/ply_files/NoNormal_UVs_NoColors.ply
rename to src/examples/evas/resources/models/NoNormal_UVs_NoColors.ply
diff --git a/src/examples/evas/ply_files/Normal_NoUVs_Colors.ply 
b/src/examples/evas/resources/models/Normal_NoUVs_Colors.ply
similarity index 100%
rename from src/examples/evas/ply_files/Normal_NoUVs_Colors.ply
rename to src/examples/evas/resources/models/Normal_NoUVs_Colors.ply
diff --git a/src/examples/evas/ply_files/Normal_NoUVs_NoColors.ply 
b/src/examples/evas/resources/models/Normal_NoUVs_NoColors.ply
similarity index 100%
rename from src/examples/evas/ply_files/Normal_NoUVs_NoColors.ply
rename to src/examples/evas/resources/models/Normal_NoUVs_NoColors.ply
diff --git a/src/examples/evas/ply_files/Normal_UVs_Colors.ply 
b/src/examples/evas/resources/models/Normal_UVs_Colors.ply
similarity index 100%
rename from src/examples/evas/ply_files/Normal_UVs_Colors.ply
rename to src/examples/evas/resources/models/Normal_UVs_Colors.ply
diff --git a/src/examples/evas/ply_files/Normal_UVs_NoColors.ply 
b/src/examples/evas/resources/models/Normal_UVs_NoColors.ply
similarity index 100%
rename from src/examples/evas/ply_files/Normal_UVs_NoColors.ply
rename to src/examples/evas/resources/models/Normal_UVs_NoColors.ply
diff --git a/src/examples/evas/eagle.md2 
b/src/examples/evas/resources/models/eagle.md2
similarity index 100%
rename from src/examples/evas/eagle.md2
rename to src/examples/evas/resources/models/eagle.md2
diff --git a/src/examples/evas/mesh_mmap_set/mesh.eet 
b/src/examples/evas/resources/models/mesh_for_mmap.eet
similarity index 100%
rename from src/examples/evas/mesh_mmap_set/mesh.eet
rename to src/examples/evas/resources/models/mesh_for_mmap.eet
diff --git a/src/examples/evas/mesh_mmap_set/mesh.md2 
b/src/examples/evas/resources/models/mesh_for_mmap.md2
similarity index 100%
rename from src/examples/evas/mesh_mmap_set/mesh.md2
rename to src/examples/evas/resources/models/mesh_for_mmap.md2
diff --git a/src/examples/evas/mesh_mmap_set/mesh.mtl 
b/src/examples/evas/resources/models/mesh_for_mmap.mtl
similarity index 100%
rename from src/examples/evas/mesh_mmap_set/mesh.mtl
rename to src/examples/evas/resources/models/mesh_for_mmap.mtl
diff --git a/src/examples/evas/mesh_mmap_set/mesh.obj 
b/src/examples/evas/resources/models/mesh_for_mmap.obj
similarity index 100%
rename from src/examples/evas/mesh_mmap_set/mesh.obj
rename to src/examples/evas/resources/models/mesh_for_mmap.obj
diff --git a/src/examples/evas/mesh_mmap_set/mesh.ply 
b/src/examples/evas/resources/models/mesh_for_mmap.ply
similarity index 100%
rename from src/examples/evas/mesh_mmap_set/mesh.ply
rename to src/examples/evas/resources/models/mesh_for_mmap.ply
diff --git a/src/examples/evas/sonic.md2 
b/src/examples/evas/resources/models/sonic.md2
similarity index 100%
rename from src/examples/evas/sonic.md2
rename to src/examples/evas/resources/models/sonic.md2
diff --git a/src/examples/evas/obj_files/sweet_home.mtl 
b/src/examples/evas/resources/models/sweet_home.mtl
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home.mtl
rename to src/examples/evas/resources/models/sweet_home.mtl
diff --git a/src/examples/evas/obj_files/sweet_home.obj 
b/src/examples/evas/resources/models/sweet_home.obj
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home.obj
rename to src/examples/evas/resources/models/sweet_home.obj
diff --git a/src/examples/evas/obj_files/sweet_home_only_vertex_coords.mtl 
b/src/examples/evas/resources/models/sweet_home_only_vertex_coords.mtl
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home_only_vertex_coords.mtl
rename to src/examples/evas/resources/models/sweet_home_only_vertex_coords.mtl
diff --git a/src/examples/evas/obj_files/sweet_home_only_vertex_coords.obj 
b/src/examples/evas/resources/models/sweet_home_only_vertex_coords.obj
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home_only_vertex_coords.obj
rename to src/examples/evas/resources/models/sweet_home_only_vertex_coords.obj
diff --git a/src/examples/evas/obj_files/sweet_home_without_normals.mtl 
b/src/examples/evas/resources/models/sweet_home_without_normals.mtl
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home_without_normals.mtl
rename to src/examples/evas/resources/models/sweet_home_without_normals.mtl
diff --git a/src/examples/evas/obj_files/sweet_home_without_normals.obj 
b/src/examples/evas/resources/models/sweet_home_without_normals.obj
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home_without_normals.obj
rename to src/examples/evas/resources/models/sweet_home_without_normals.obj
diff --git a/src/examples/evas/obj_files/sweet_home_without_tex_coords.mtl 
b/src/examples/evas/resources/models/sweet_home_without_tex_coords.mtl
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home_without_tex_coords.mtl
rename to src/examples/evas/resources/models/sweet_home_without_tex_coords.mtl
diff --git a/src/examples/evas/obj_files/sweet_home_without_tex_coords.obj 
b/src/examples/evas/resources/models/sweet_home_without_tex_coords.obj
similarity index 100%
rename from src/examples/evas/obj_files/sweet_home_without_tex_coords.obj
rename to src/examples/evas/resources/models/sweet_home_without_tex_coords.obj
diff --git a/src/examples/evas/sonic.eet b/src/examples/evas/sonic.eet
deleted file mode 100644
index e1fa9ef..0000000
Binary files a/src/examples/evas/sonic.eet and /dev/null differ

-- 


Reply via email to