summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-3d-cube2.c
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2015-02-20 12:02:08 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-20 12:19:30 +0100
commit175c8cbd63244ba3c50c9f41301e7fedb0427a21 (patch)
tree71672dba56313e9e9d97fb9e33435f577f082d90 /src/examples/evas/evas-3d-cube2.c
parent2ae90fd1ffce5ee5c3cb6ed78766792166290371 (diff)
evas: Evas_3D - add creation of folder for saving and usage of PACKAGE_DATA_DIR to every example of Evas_3D.
Reviewers: cedric, Hermet, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2003 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/examples/evas/evas-3d-cube2.c')
-rw-r--r--src/examples/evas/evas-3d-cube2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index 38a2d4e..3009520 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -1,3 +1,9 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#else
4#define PACKAGE_EXAMPLES_DIR "."
5#endif
6
1#define EFL_EO_API_SUPPORT 7#define EFL_EO_API_SUPPORT
2#define EFL_BETA_API_SUPPORT 8#define EFL_BETA_API_SUPPORT
3 9
@@ -10,6 +16,8 @@
10#define WIDTH 400 16#define WIDTH 400
11#define HEIGHT 400 17#define HEIGHT 400
12 18
19static const char *normal_map_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/normal_lego.png";
20
13typedef struct _Scene_Data 21typedef struct _Scene_Data
14{ 22{
15 Eo *scene; 23 Eo *scene;
@@ -231,7 +239,7 @@ _mesh_setup(Scene_Data *data)
231 evas_3d_texture_data_set(EVAS_3D_COLOR_FORMAT_RGBA, 239 evas_3d_texture_data_set(EVAS_3D_COLOR_FORMAT_RGBA,
232 EVAS_3D_PIXEL_FORMAT_8888, 4, 4, &pixels1[0])); 240 EVAS_3D_PIXEL_FORMAT_8888, 4, 4, &pixels1[0]));
233 eo_do(data->texture_normal, 241 eo_do(data->texture_normal,
234 evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"normal_lego.png", NULL)); 242 evas_3d_texture_file_set(normal_map_path, NULL));
235 243
236 eo_do(data->material0, 244 eo_do(data->material0,
237 evas_3d_material_texture_set(EVAS_3D_MATERIAL_DIFFUSE, data->texture0)); 245 evas_3d_material_texture_set(EVAS_3D_MATERIAL_DIFFUSE, data->texture0));