aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/extantz/Evas_3D_demo.c2
-rw-r--r--src/extantz/extantz.h2
-rw-r--r--src/extantz/scenri.c18
3 files changed, 11 insertions, 11 deletions
diff --git a/src/extantz/Evas_3D_demo.c b/src/extantz/Evas_3D_demo.c
index dbc589d..46d2693 100644
--- a/src/extantz/Evas_3D_demo.c
+++ b/src/extantz/Evas_3D_demo.c
@@ -448,7 +448,7 @@ static void _earth_setup(globals *ourGlobals, Scene_Data *scene)
448 448
449void Evas_3D_Demo_add(globals *ourGlobals) 449void Evas_3D_Demo_add(globals *ourGlobals)
450{ 450{
451 ourGlobals->scene = scenriAdd(ourGlobals); 451 ourGlobals->scene = scenriAdd(ourGlobals->evas, ourGlobals->win);
452 452
453 _cube_setup(ourGlobals, ourGlobals->scene); 453 _cube_setup(ourGlobals, ourGlobals->scene);
454 _sonic_setup(ourGlobals, ourGlobals->scene); 454 _sonic_setup(ourGlobals, ourGlobals->scene);
diff --git a/src/extantz/extantz.h b/src/extantz/extantz.h
index 1c12843..aab5de5 100644
--- a/src/extantz/extantz.h
+++ b/src/extantz/extantz.h
@@ -254,7 +254,7 @@ EAPI void Evas_3D_Demo_add(globals *ourGlobals);
254Eina_Bool _animate_scene(globals *ourGlobals); 254Eina_Bool _animate_scene(globals *ourGlobals);
255void Evas_3D_Demo_fini(globals *ourGlobals); 255void Evas_3D_Demo_fini(globals *ourGlobals);
256 256
257Scene_Data *scenriAdd(globals *ourGlobals); 257Scene_Data *scenriAdd(Evas *evas, Evas_Object *win);
258Evas_3D_Node *cameraAdd(Evas *evas, Scene_Data *scene, Evas_Object *win); 258Evas_3D_Node *cameraAdd(Evas *evas, Scene_Data *scene, Evas_Object *win);
259Eina_Bool animateCamera(Scene_Data *scene); 259Eina_Bool animateCamera(Scene_Data *scene);
260 260
diff --git a/src/extantz/scenri.c b/src/extantz/scenri.c
index 0c71ba2..8258cf4 100644
--- a/src/extantz/scenri.c
+++ b/src/extantz/scenri.c
@@ -85,7 +85,7 @@ static void _on_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o, void
85 ev->output.x, ev->output.y, ev->canvas.x, ev->canvas.y, obj_x, obj_y, scene_x, scene_y, s, t, n, name, m); 85 ev->output.x, ev->output.y, ev->canvas.x, ev->canvas.y, obj_x, obj_y, scene_x, scene_y, s, t, n, name, m);
86} 86}
87 87
88Scene_Data *scenriAdd(globals *ourGlobals) 88Scene_Data *scenriAdd(Evas *evas, Evas_Object *win)
89{ 89{
90 Scene_Data *scene; 90 Scene_Data *scene;
91 Evas_Object *obj, *temp; 91 Evas_Object *obj, *temp;
@@ -94,17 +94,17 @@ Scene_Data *scenriAdd(globals *ourGlobals)
94 94
95 // TODO - I have no idea how this should work. 95 // TODO - I have no idea how this should work.
96 // It seems the people that wrote the examples don't know either. lol 96 // It seems the people that wrote the examples don't know either. lol
97// scene->root_node = eo_add(EVAS_3D_NODE_CLASS, ourGlobals->evas, EVAS_3D_NODE_TYPE_NODE); 97// scene->root_node = eo_add(EVAS_3D_NODE_CLASS, evas, EVAS_3D_NODE_TYPE_NODE);
98 scene->root_node = evas_3d_node_add(ourGlobals->evas, EVAS_3D_NODE_TYPE_NODE); 98 scene->root_node = evas_3d_node_add(evas, EVAS_3D_NODE_TYPE_NODE);
99 99
100 scene->scene = eo_add(EVAS_3D_SCENE_CLASS, ourGlobals->evas, 100 scene->scene = eo_add(EVAS_3D_SCENE_CLASS, evas,
101 evas_3d_scene_root_node_set(scene->root_node), 101 evas_3d_scene_root_node_set(scene->root_node),
102 evas_3d_scene_size_set(512, 512), 102 evas_3d_scene_size_set(512, 512),
103 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0) 103 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0)
104 ); 104 );
105 105
106 // Add an image object for 3D scene rendering. 106 // Add an image object for 3D scene rendering.
107 obj = eo_add(ELM_OBJ_IMAGE_CLASS, ourGlobals->win, 107 obj = eo_add(ELM_OBJ_IMAGE_CLASS, win,
108 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 108 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
109 elm_obj_image_fill_outside_set(EINA_TRUE), 109 elm_obj_image_fill_outside_set(EINA_TRUE),
110 evas_obj_visibility_set(EINA_TRUE), 110 evas_obj_visibility_set(EINA_TRUE),
@@ -113,16 +113,16 @@ Scene_Data *scenriAdd(globals *ourGlobals)
113 elm_object_tooltip_text_set(obj, ""); 113 elm_object_tooltip_text_set(obj, "");
114 elm_object_tooltip_hide(obj); 114 elm_object_tooltip_hide(obj);
115 scene->image = obj; 115 scene->image = obj;
116 scene->camera_node = cameraAdd(ourGlobals->evas, scene, obj); 116 scene->camera_node = cameraAdd(evas, scene, obj);
117 117
118 scene->light = eo_add(EVAS_3D_LIGHT_CLASS, ourGlobals->evas, 118 scene->light = eo_add(EVAS_3D_LIGHT_CLASS, evas,
119 evas_3d_light_ambient_set(1.0, 1.0, 1.0, 1.0), 119 evas_3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
120 evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 120 evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
121 evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0), 121 evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
122 evas_3d_light_directional_set(EINA_TRUE) 122 evas_3d_light_directional_set(EINA_TRUE)
123 ); 123 );
124 124
125 scene->light_node = evas_3d_node_add(ourGlobals->evas, EVAS_3D_NODE_TYPE_LIGHT); 125 scene->light_node = evas_3d_node_add(evas, EVAS_3D_NODE_TYPE_LIGHT);
126 eo_do(scene->light_node, 126 eo_do(scene->light_node,
127 evas_3d_node_light_set(scene->light), 127 evas_3d_node_light_set(scene->light),
128 evas_3d_node_position_set(1000.0, 0.0, 1000.0), 128 evas_3d_node_position_set(1000.0, 0.0, 1000.0),
@@ -136,7 +136,7 @@ Scene_Data *scenriAdd(globals *ourGlobals)
136 evas_object_event_callback_add(temp, EVAS_CALLBACK_MOUSE_MOVE, _on_mouse_move, scene); 136 evas_object_event_callback_add(temp, EVAS_CALLBACK_MOUSE_MOVE, _on_mouse_move, scene);
137 evas_object_event_callback_add(temp, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, scene); 137 evas_object_event_callback_add(temp, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, scene);
138 138
139 elm_win_resize_object_add(ourGlobals->win, obj); 139 elm_win_resize_object_add(win, obj);
140 140
141 return scene; 141 return scene;
142} 142}