summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-3d-aabb.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-aabb.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-aabb.c')
-rw-r--r--src/examples/evas/evas-3d-aabb.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index 722796c..ef3e079 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -6,6 +6,12 @@
6 * Compile with "gcc -o evas-3d-aabb evas-3d-aabb.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`" 6 * Compile with "gcc -o evas-3d-aabb evas-3d-aabb.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`"
7 */ 7 */
8 8
9#ifdef HAVE_CONFIG_H
10#include "config.h"
11#else
12#define PACKAGE_EXAMPLES_DIR "."
13#endif
14
9#define EFL_EO_API_SUPPORT 15#define EFL_EO_API_SUPPORT
10#define EFL_BETA_API_SUPPORT 16#define EFL_BETA_API_SUPPORT
11 17
@@ -18,6 +24,9 @@
18#define WIDTH 400 24#define WIDTH 400
19#define HEIGHT 400 25#define HEIGHT 400
20 26
27static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_3D_MODEL_FOLDER "/sonic.md2";
28static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_3D_IMAGE_FOLDER "/sonic.png";
29
21Ecore_Evas *ecore_evas = NULL; 30Ecore_Evas *ecore_evas = NULL;
22Evas *evas = NULL; 31Evas *evas = NULL;
23Eo *background = NULL; 32Eo *background = NULL;
@@ -228,13 +237,13 @@ main(void)
228 material = eo_add(EVAS_3D_MATERIAL_CLASS, evas); 237 material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
229 238
230 eo_do(mesh, 239 eo_do(mesh,
231 efl_file_set(EVAS_3D_MODEL_FOLDER"sonic.md2", NULL), 240 efl_file_set(model_path, NULL),
232 evas_3d_mesh_frame_material_set(0, material), 241 evas_3d_mesh_frame_material_set(0, material),
233 evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG)); 242 evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG));
234 243
235 texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas); 244 texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
236 eo_do(texture, 245 eo_do(texture,
237 evas_3d_texture_file_set(EVAS_3D_IMAGE_FOLDER"sonic.png", NULL), 246 evas_3d_texture_file_set(image_path, NULL),
238 evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST, 247 evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
239 EVAS_3D_TEXTURE_FILTER_NEAREST), 248 EVAS_3D_TEXTURE_FILTER_NEAREST),
240 evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT, 249 evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,