summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-3d-aabb.c
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2015-05-29 18:14:08 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-29 18:22:09 +0200
commit0972211144adcf09170d41ceacb62788fb954651 (patch)
tree40145801fa2b10b0b59daddb28b12871f891fbf7 /src/examples/evas/evas-3d-aabb.c
parent9dcb827d12c58ea24d1ad2ce0f6aacb1f57b1146 (diff)
evas: Evas_3D examples use new API for creating primitives.
Summary: Examples changed due to D2516 Reviewers: Oleksander, Hermet, raster, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2517 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.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index 9f9488a..6a9d905 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -5,7 +5,7 @@
5 * Rotate axises (keys 1-4) for model and bounding box view from another angle. 5 * Rotate axises (keys 1-4) for model and bounding box view from another angle.
6 * 6 *
7 * @verbatim 7 * @verbatim
8 * gcc -o evas-3d-aabb evas-3d-aabb.c evas-3d-primitives.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo` -lm 8 * gcc -o evas-3d-aabb evas-3d-aabb.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo` -lm
9 * @endverbatim 9 * @endverbatim
10 */ 10 */
11 11
@@ -22,7 +22,6 @@
22#include <Ecore.h> 22#include <Ecore.h>
23#include <Ecore_Evas.h> 23#include <Ecore_Evas.h>
24#include "evas-common.h" 24#include "evas-common.h"
25#include "evas-3d-primitives.h"
26 25
27#define WIDTH 400 26#define WIDTH 400
28#define HEIGHT 400 27#define HEIGHT 400
@@ -34,7 +33,7 @@ Ecore_Evas *ecore_evas = NULL;
34Evas *evas = NULL; 33Evas *evas = NULL;
35Eo *background = NULL; 34Eo *background = NULL;
36Eo *image = NULL; 35Eo *image = NULL;
37 36Eo *cube = NULL;
38Eo *scene = NULL; 37Eo *scene = NULL;
39Eo *root_node = NULL; 38Eo *root_node = NULL;
40Eo *camera_node = NULL; 39Eo *camera_node = NULL;
@@ -218,12 +217,16 @@ main(void)
218 material_box = eo_add(EVAS_3D_MATERIAL_CLASS, evas); 217 material_box = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
219 eo_do(material_box, evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE, EINA_TRUE)); 218 eo_do(material_box, evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE, EINA_TRUE));
220 219
220 cube = eo_add(EVAS_3D_PRIMITIVE_CLASS, evas);
221 eo_do(cube,
222 evas_3d_primitive_form_set(EVAS_3D_MESH_PRIMITIVE_CUBE));
223
221 mesh_box = eo_add(EVAS_3D_MESH_CLASS, evas); 224 mesh_box = eo_add(EVAS_3D_MESH_CLASS, evas);
222 evas_3d_add_cube_frame(mesh_box, 0);
223 eo_do(mesh_box, 225 eo_do(mesh_box,
224 evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_LINES), 226 evas_3d_mesh_from_primitive_set(0, cube),
225 evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_DIFFUSE), 227 evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_LINES),
226 evas_3d_mesh_frame_material_set(0, material_box)); 228 evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_VERTEX_COLOR),
229 evas_3d_mesh_frame_material_set(0, material_box));
227 _redraw_aabb(); 230 _redraw_aabb();
228 231
229 eo_do(root_node, 232 eo_do(root_node,