aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-01 18:57:22 +1000
committerDavid Walter Seikel2014-05-01 18:57:22 +1000
commit857d5945ade17e3f3e04abe384ae363a1c37cf51 (patch)
tree9bb6ca02093c1ee101ea6004cb52a01d16e0c2b4 /src
parentCrazy TellinBone idea. lol (diff)
downloadSledjHamr-857d5945ade17e3f3e04abe384ae363a1c37cf51.zip
SledjHamr-857d5945ade17e3f3e04abe384ae363a1c37cf51.tar.gz
SledjHamr-857d5945ade17e3f3e04abe384ae363a1c37cf51.tar.bz2
SledjHamr-857d5945ade17e3f3e04abe384ae363a1c37cf51.tar.xz
Update Evas_3d example to match upstream, still doesn't work
Diffstat (limited to 'src')
-rw-r--r--src/GuiLua/GuiLua.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c
index eb185b8..f91cac5 100644
--- a/src/GuiLua/GuiLua.c
+++ b/src/GuiLua/GuiLua.c
@@ -251,12 +251,10 @@ _animate_scene(void *data)
251 ); 251 );
252 252
253 /* Rotate */ 253 /* Rotate */
254 if (angle > 360.0) 254 if (angle > 360.0) angle -= 360.0f;
255 angle -= 360.0f;
256 255
257 frame += 32; 256 frame += 32;
258 if (frame > 256 * 50) 257 if (frame > 256 * 50) frame = 0;
259 frame = 0;
260 258
261 return EINA_TRUE; 259 return EINA_TRUE;
262} 260}
@@ -423,7 +421,7 @@ _scene_setup(globals *ourGlobals, Scene_Data *scene)
423{ 421{
424 scene->scene = eo_add(EVAS_3D_SCENE_CLASS, ourGlobals->evas); 422 scene->scene = eo_add(EVAS_3D_SCENE_CLASS, ourGlobals->evas);
425 eo_do(scene->scene, 423 eo_do(scene->scene,
426 evas_3d_scene_size_set(WIDTH, HEIGHT), 424// evas_3d_scene_size_set(1024, 1024),
427 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0) 425 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0)
428 ); 426 );
429 427
@@ -467,14 +465,16 @@ struct _Widget
467// TODO - Should be able to open external and internal windows, and even switch between them on the fly. 465// TODO - Should be able to open external and internal windows, and even switch between them on the fly.
468static void _on_canvas_resize(Ecore_Evas *ee) 466static void _on_canvas_resize(Ecore_Evas *ee)
469{ 467{
470 int w, h; 468 int w, h;
471 469
472 ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); 470 ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
473 471
474printf("RESIZED!!!\n"); 472printf("RESIZED!!!\n");
475 evas_object_resize(ourGlobals.background, w, h); 473 eo_do(ourGlobals.background, evas_obj_size_set(w, h));
476 evas_object_resize(ourGlobals.image, w, h); 474 eo_do(ourGlobals.image,
477 evas_object_move(ourGlobals.image, 0, 0); 475 evas_obj_size_set(w, h)
476// evas_obj_position_set(0, 0)
477 );
478} 478}
479 479
480static void _on_click(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 480static void _on_click(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
@@ -611,11 +611,12 @@ static int window(lua_State *L)
611 _scene_setup(ourGlobals, &ourScene); 611 _scene_setup(ourGlobals, &ourScene);
612 612
613 /* Add a background rectangle objects. */ 613 /* Add a background rectangle objects. */
614 ourGlobals->background = evas_object_rectangle_add(ourGlobals->evas); 614 ourGlobals->background = eo_add(EVAS_OBJ_RECTANGLE_CLASS, ourGlobals->evas);
615 evas_object_color_set(ourGlobals->background, 255, 0, 255, 255); 615 eo_do(ourGlobals->background,
616 evas_object_move(ourGlobals->background, 0, 0); 616 evas_obj_color_set(0, 0, 0, 255),
617 evas_object_resize(ourGlobals->background, w, h); 617 evas_obj_size_set(w, w),
618 evas_object_show(ourGlobals->background); 618 evas_obj_visibility_set(EINA_TRUE)
619 );
619 620
620 // Add an image object for 3D scene rendering. 621 // Add an image object for 3D scene rendering.
621 wid = calloc(1, sizeof(struct _Widget)); 622 wid = calloc(1, sizeof(struct _Widget));
@@ -698,6 +699,7 @@ static int closeWindow(lua_State *L)
698 { 699 {
699 eo_unref(wid->obj); 700 eo_unref(wid->obj);
700 } 701 }
702 eo_unref(ourGlobals->background);
701 evas_object_del(ourGlobals->win); 703 evas_object_del(ourGlobals->win);
702 } 704 }
703 705