summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-3d-parallax-occlusion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/evas/evas-3d-parallax-occlusion.c')
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c186
1 files changed, 80 insertions, 106 deletions
diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c
index fd1e8ce..ff20dfe 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -62,10 +62,10 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
62 Evas_Event_Key_Down *ev = event_info; 62 Evas_Event_Key_Down *ev = event_info;
63 63
64 if (!strcmp("n", ev->key)) 64 if (!strcmp("n", ev->key))
65 eo_do(scene->mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP)); 65 evas_canvas3d_mesh_shade_mode_set(scene->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
66 66
67 if (!strcmp("p", ev->key)) 67 if (!strcmp("p", ev->key))
68 eo_do(scene->mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION)); 68 evas_canvas3d_mesh_shade_mode_set(scene->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION);
69} 69}
70 70
71static void 71static void
@@ -80,8 +80,8 @@ _on_canvas_resize(Ecore_Evas *ee)
80 int w, h; 80 int w, h;
81 81
82 ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); 82 ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
83 eo_do(background, efl_gfx_size_set(w, h)); 83 efl_gfx_size_set(background, w, h);
84 eo_do(image, efl_gfx_size_set(w, h)); 84 efl_gfx_size_set(image, w, h);
85} 85}
86 86
87static Eina_Bool 87static Eina_Bool
@@ -92,10 +92,9 @@ _animate_scene(void *data)
92 92
93 angle += 0.5; 93 angle += 0.5;
94 94
95 eo_do(scene->mesh_node, 95 evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 0.0, 1.0, 0.0);
96 evas_canvas3d_node_orientation_angle_axis_set(angle, 0.0, 1.0, 0.0));
97 96
98 eo_do(scene->mesh_node, evas_canvas3d_node_mesh_frame_set(scene->mesh, 50 * (1 + sin(angle / 180.0 * M_PI)))); 97 evas_canvas3d_node_mesh_frame_set(scene->mesh_node, scene->mesh, 50 * (1 + sin(angle / 180.0 * M_PI)));
99 /* Rotate */ 98 /* Rotate */
100 if (angle > 360.0) angle = 0.0f; 99 if (angle > 360.0) angle = 0.0f;
101 100
@@ -107,36 +106,28 @@ _camera_setup(Scene_Data *data)
107{ 106{
108 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 107 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
109 108
110 eo_do(data->camera, 109 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
111 evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0)); 110
112 111 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
113 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 112 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
114 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 113 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
115 eo_do(data->camera_node, 114 evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
116 evas_canvas3d_node_camera_set(data->camera), 115 evas_canvas3d_node_member_add(data->root_node, data->camera_node);
117 evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
118 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
119 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
120 eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
121} 116}
122 117
123static void 118static void
124_light_setup(Scene_Data *data) 119_light_setup(Scene_Data *data)
125{ 120{
126 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 121 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
127 eo_do(data->light, 122 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
128 evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0), 123 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
129 evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 124 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
130 evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); 125
131 126 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
132 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 127 evas_canvas3d_node_light_set(data->light_node, data->light);
133 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 128 evas_canvas3d_node_position_set(data->light_node, -20.0, 20.0, 50.0);
134 eo_do(data->light_node, 129 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
135 evas_canvas3d_node_light_set(data->light), 130 evas_canvas3d_node_member_add(data->root_node, data->light_node);
136 evas_canvas3d_node_position_set(-20.0, 20.0, 50.0),
137 evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
138 EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
139 eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
140} 131}
141 132
142static void 133static void
@@ -147,95 +138,80 @@ _mesh_setup(Scene_Data *data)
147 138
148 data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 139 data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
149 data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 140 data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
150 eo_do(data->texture_rocks, evas_canvas3d_texture_file_set(rock_diffuse, NULL), 141 evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL);
151 evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, 142 evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
152 EVAS_CANVAS3D_WRAP_MODE_REPEAT)); 143 evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL);
153 eo_do(data->texture_rocks_n, evas_canvas3d_texture_file_set(rock_n_and_height_map, NULL), 144 evas_canvas3d_texture_wrap_set(data->texture_rocks_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
154 evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, 145
155 EVAS_CANVAS3D_WRAP_MODE_REPEAT)); 146 evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_rocks_n);
156 147 evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_rocks);
157 eo_do(data->material_rocks, 148 evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_rocks);
158 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_rocks_n), 149 evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_rocks);
159 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_rocks), 150 evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
160 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_rocks), 151 evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
161 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_rocks), 152 evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
162 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 153 evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
163 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE), 154 evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0);
164 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 155 evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
165 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 156 evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
166 157 evas_canvas3d_material_shininess_set(data->material_rocks, 100.0);
167 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0),
168 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0),
169 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
170 evas_canvas3d_material_shininess_set(100.0));
171 158
172 data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 159 data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
173 160
174 data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
175 data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 162 data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
176 eo_do(data->texture_wood, evas_canvas3d_texture_file_set(wood_diffuse, NULL), 163 evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL);
177 evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, 164 evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
178 EVAS_CANVAS3D_WRAP_MODE_REPEAT)); 165 evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL);
179 eo_do(data->texture_four_n, evas_canvas3d_texture_file_set(wood_n_and_height_map, NULL), 166 evas_canvas3d_texture_wrap_set(data->texture_four_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
180 evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, 167
181 EVAS_CANVAS3D_WRAP_MODE_REPEAT)); 168 evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_four_n);
182 169 evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_wood);
183 eo_do(data->material_wood, 170 evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_wood);
184 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_four_n), 171 evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_wood);
185 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_wood), 172 evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
186 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_wood), 173 evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
187 evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_wood), 174 evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
188 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 175 evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
189 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE), 176 evas_canvas3d_material_color_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0);
190 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 177 evas_canvas3d_material_color_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
191 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 178 evas_canvas3d_material_color_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
192 179 evas_canvas3d_material_shininess_set(data->material_wood, 100.0);
193 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0),
194 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0),
195 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
196 evas_canvas3d_material_shininess_set(100.0));
197 180
198 /* Set data of primitive */ 181 /* Set data of primitive */
199 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 182 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
200 eo_do(data->cube, 183 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
201 evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
202 184
203 /* Setup mesh. */ 185 /* Setup mesh. */
204 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 186 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
205 eo_do(data->mesh, 187 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
206 evas_canvas3d_mesh_from_primitive_set(0, data->cube), 188 evas_canvas3d_mesh_from_primitive_set(data->mesh, 100, data->cube);
207 evas_canvas3d_mesh_from_primitive_set(100, data->cube), 189 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION);
208 evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION), 190 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material_rocks);
209 evas_canvas3d_mesh_frame_material_set(0, data->material_rocks)); 191
210 192 evas_canvas3d_mesh_frame_material_set(data->mesh, 100, data->material_wood);
211 eo_do(data->mesh, 193
212 evas_canvas3d_mesh_frame_material_set(100, data->material_wood)); 194 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
213 195 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
214 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 196 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
215 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); 197 evas_canvas3d_node_scale_set(data->mesh_node, 3, 3, 3);
216 eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
217 eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh),
218 evas_canvas3d_node_scale_set(3, 3, 3));
219} 198}
220 199
221static void 200static void
222_scene_setup(Scene_Data *data) 201_scene_setup(Scene_Data *data)
223{ 202{
224 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 203 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
225 eo_do(data->scene, 204 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
226 evas_canvas3d_scene_size_set(WIDTH, HEIGHT); 205 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
227 evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
228 206
229 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, 207 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
230 evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
231 208
232 _camera_setup(data); 209 _camera_setup(data);
233 _light_setup(data); 210 _light_setup(data);
234 _mesh_setup(data); 211 _mesh_setup(data);
235 212
236 eo_do(data->scene, 213 evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
237 evas_canvas3d_scene_root_node_set(data->root_node), 214 evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
238 evas_canvas3d_scene_camera_node_set(data->camera_node));
239} 215}
240 216
241int 217int
@@ -262,20 +238,18 @@ main(void)
262 238
263 /* Add a background rectangle objects. */ 239 /* Add a background rectangle objects. */
264 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 240 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
265 eo_do(background, 241 efl_gfx_color_set(background, 0, 0, 0, 255);
266 efl_gfx_color_set(0, 0, 0, 255), 242 efl_gfx_size_set(background, WIDTH, HEIGHT);
267 efl_gfx_size_set(WIDTH, HEIGHT), 243 efl_gfx_visible_set(background, EINA_TRUE);
268 efl_gfx_visible_set(EINA_TRUE));
269 244
270 /* Add an image object for 3D scene rendering. */ 245 /* Add an image object for 3D scene rendering. */
271 image = evas_object_image_filled_add(evas); 246 image = evas_object_image_filled_add(evas);
272 eo_do(image, 247 efl_gfx_size_set(image, WIDTH, HEIGHT);
273 efl_gfx_size_set(WIDTH, HEIGHT), 248 efl_gfx_visible_set(image, EINA_TRUE);
274 efl_gfx_visible_set(EINA_TRUE), 249 evas_object_focus_set(image, image, EINA_TRUE);
275 evas_object_focus_set(image, EINA_TRUE));
276 250
277 /* Set the image object as render target for 3D scene. */ 251 /* Set the image object as render target for 3D scene. */
278 eo_do(image, evas_obj_image_scene_set(data.scene)); 252 evas_obj_image_scene_set(image, data.scene);
279 253
280 /* Add animation timer callback. */ 254 /* Add animation timer callback. */
281 ecore_timer_add(0.01, _animate_scene, &data); 255 ecore_timer_add(0.01, _animate_scene, &data);