summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-3d-cube2.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-08-15 14:44:41 +0100
committerTom Hacohen <tom@stosb.com>2016-08-15 15:07:42 +0100
commite65aae994e72c1d3f8ac6b5360d3772f177b77ef (patch)
tree7ecaf136e45470635889191aded2b47057720a98 /src/examples/evas/evas-3d-cube2.c
parent35abb3c34d10a4826c98055fb85ecf93915e5ea8 (diff)
Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for Eo_Event that will follow soon. Obviously breaks both API and ABI.
Diffstat (limited to 'src/examples/evas/evas-3d-cube2.c')
-rw-r--r--src/examples/evas/evas-3d-cube2.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index 07daf19..7f6dbb5 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -111,11 +111,11 @@ _animate_scene(void *data)
111static void 111static void
112_camera_setup(Scene_Data *data) 112_camera_setup(Scene_Data *data)
113{ 113{
114 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 114 data->camera = efl_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
115 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 115 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
116 116
117 data->camera_node = 117 data->camera_node =
118 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eo_self, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 118 efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(efl_self, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
119 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 119 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
120 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0); 120 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0);
121 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); 121 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);
@@ -125,13 +125,13 @@ _camera_setup(Scene_Data *data)
125static void 125static void
126_light_setup(Scene_Data *data) 126_light_setup(Scene_Data *data)
127{ 127{
128 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 128 data->light = efl_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
129 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 129 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
130 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 130 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
131 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 131 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
132 132
133 data->light_node = 133 data->light_node =
134 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eo_self, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 134 efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(efl_self, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
135 evas_canvas3d_node_light_set(data->light_node, data->light); 135 evas_canvas3d_node_light_set(data->light_node, data->light);
136 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 136 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
137 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); 137 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);
@@ -142,8 +142,8 @@ static void
142_mesh_setup(Scene_Data *data) 142_mesh_setup(Scene_Data *data)
143{ 143{
144 /* Setup material. */ 144 /* Setup material. */
145 data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 145 data->material0 = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
146 data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 146 data->material1 = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
147 147
148 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 148 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
149 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 149 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -163,9 +163,9 @@ _mesh_setup(Scene_Data *data)
163 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 163 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
164 evas_canvas3d_material_shininess_set(data->material1, 100.0); 164 evas_canvas3d_material_shininess_set(data->material1, 100.0);
165 165
166 data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 166 data->texture0 = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
167 data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 167 data->texture1 = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
168 data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 168 data->texture_normal = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
169 169
170 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]); 170 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]);
171 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]); 171 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]);
@@ -176,11 +176,11 @@ _mesh_setup(Scene_Data *data)
176 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal); 176 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal);
177 177
178 /* Set data of primitive */ 178 /* Set data of primitive */
179 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 179 data->cube = efl_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
180 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 180 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
181 181
182 /* Setup mesh. */ 182 /* Setup mesh. */
183 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 183 data->mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
184 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 184 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
185 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0); 185 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0);
186 evas_canvas3d_mesh_frame_add(data->mesh, 20); 186 evas_canvas3d_mesh_frame_add(data->mesh, 20);
@@ -188,7 +188,7 @@ _mesh_setup(Scene_Data *data)
188 evas_canvas3d_mesh_shader_mode_set(data->mesh, EVAS_CANVAS3D_SHADER_MODE_NORMAL_MAP); 188 evas_canvas3d_mesh_shader_mode_set(data->mesh, EVAS_CANVAS3D_SHADER_MODE_NORMAL_MAP);
189 189
190 data->mesh_node = 190 data->mesh_node =
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eo_self, EVAS_CANVAS3D_NODE_TYPE_MESH)); 191 efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(efl_self, EVAS_CANVAS3D_NODE_TYPE_MESH));
192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
194} 194}
@@ -196,12 +196,12 @@ _mesh_setup(Scene_Data *data)
196static void 196static void
197_scene_setup(Scene_Data *data) 197_scene_setup(Scene_Data *data)
198{ 198{
199 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 199 data->scene = efl_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
202 202
203 data->root_node = 203 data->root_node =
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eo_self, EVAS_CANVAS3D_NODE_TYPE_NODE)); 204 efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(efl_self, EVAS_CANVAS3D_NODE_TYPE_NODE));
205 205
206 _camera_setup(data); 206 _camera_setup(data);
207 _light_setup(data); 207 _light_setup(data);
@@ -234,13 +234,13 @@ main(void)
234 _scene_setup(&data); 234 _scene_setup(&data);
235 235
236 /* Add a background rectangle objects. */ 236 /* Add a background rectangle objects. */
237 background = eo_add(EFL_CANVAS_RECTANGLE_CLASS, evas); 237 background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
238 efl_gfx_color_set(background, 0, 0, 0, 255); 238 efl_gfx_color_set(background, 0, 0, 0, 255);
239 efl_gfx_size_set(background, WIDTH, HEIGHT); 239 efl_gfx_size_set(background, WIDTH, HEIGHT);
240 efl_gfx_visible_set(background, EINA_TRUE); 240 efl_gfx_visible_set(background, EINA_TRUE);
241 241
242 /* Add an image object for 3D scene rendering. */ 242 /* Add an image object for 3D scene rendering. */
243 image = eo_add(EFL_CANVAS_SCENE3D_CLASS, evas); 243 image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
244 efl_gfx_size_set(image, WIDTH, HEIGHT); 244 efl_gfx_size_set(image, WIDTH, HEIGHT);
245 efl_gfx_visible_set(image, EINA_TRUE); 245 efl_gfx_visible_set(image, EINA_TRUE);
246 246