X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fpoint-mesh%2Fpoint-mesh-example.cpp;h=126b9d61920b37bcdcf01ff3526f30a1a05fe8f9;hb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;hp=9ab923bc776b55535bf3e4db4c8442affbe6d5a7;hpb=ff961cccdcbf1c30b0f53b0da027df855cde2b63;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/point-mesh/point-mesh-example.cpp b/examples/point-mesh/point-mesh-example.cpp index 9ab923b..126b9d6 100644 --- a/examples/point-mesh/point-mesh-example.cpp +++ b/examples/point-mesh/point-mesh-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ */ // EXTERNAL INCLUDES -#include #include // INTERNAL INCLUDES @@ -83,7 +82,7 @@ Geometry CreateGeometry() // Create vertices struct Vertex { Vector2 position; float hue; }; - unsigned int numSides = 20; + const unsigned int numSides = 20; Vertex polyhedraVertexData[numSides]; float angle=0; float sectorAngle = 2.0f * Math::PI / (float) numSides; @@ -105,7 +104,7 @@ Geometry CreateGeometry() // Create the geometry object Geometry polyhedraGeometry = Geometry::New(); polyhedraGeometry.AddVertexBuffer( polyhedraVertices ); - polyhedraGeometry.SetGeometryType( Geometry::POINTS ); + polyhedraGeometry.SetType( Geometry::POINTS ); return polyhedraGeometry; } @@ -169,7 +168,7 @@ public: mMeshActor = Actor::New(); mMeshActor.AddRenderer( mRenderer ); - mMeshActor.SetSize(400, 400); + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); mMeshActor.RegisterProperty( "uFadeColor", Color::GREEN ); @@ -177,8 +176,8 @@ public: mRenderer.RegisterProperty( "uPointSize", 80.0f ); mRenderer.SetProperty( Renderer::Property::DEPTH_INDEX, 0 ); - mMeshActor.SetParentOrigin( ParentOrigin::CENTER ); - mMeshActor.SetAnchorPoint( AnchorPoint::CENTER ); + mMeshActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + mMeshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); stage.Add( mMeshActor ); Animation animation = Animation::New(15); @@ -228,20 +227,10 @@ private: Timer mChangeImageTimer; }; -void RunTest( Application& application ) -{ - ExampleController test( application ); - - application.MainLoop(); -} - -// Entry point for Linux & SLP applications -// int DALI_EXPORT_API main( int argc, char **argv ) { Application application = Application::New( &argc, &argv ); - - RunTest( application ); - + ExampleController test( application ); + application.MainLoop(); return 0; }