2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
23 #include <dali/dali.h>
24 #include <dali/devel-api/rendering/renderer.h>
25 #include <dali-toolkit/dali-toolkit.h>
27 #include "shared/view.h"
30 using namespace Dali::Toolkit;
34 const char * const BACKGROUND_IMAGE( DEMO_IMAGE_DIR "background-2.jpg" );
35 const char * const TOOLBAR_IMAGE( DEMO_IMAGE_DIR "top-bar.png" );
37 const float GRAVITY_X(0);
38 const float GRAVITY_Y(-0.09);
41 #define METABALL_NUMBER 6
44 const char*const METABALL_VERTEX_SHADER = DALI_COMPOSE_SHADER (
45 attribute mediump vec2 aPosition;\n
46 attribute mediump vec2 aTexture;\n
47 uniform mediump mat4 uMvpMatrix;\n
48 uniform mediump vec3 uSize;\n
49 uniform lowp vec4 uColor;\n
50 varying mediump vec2 vTexCoord;\n
54 vTexCoord = aTexture;\n
55 mediump vec4 vertexPosition = vec4(aPosition.x, aPosition.y, 0.0, 1.0);\n
56 gl_Position = uMvpMatrix * vertexPosition;\n
61 const char*const METABALL_FRAG_SHADER = DALI_COMPOSE_SHADER (
62 precision mediump float;\n
63 varying vec2 vTexCoord;\n
64 uniform vec2 uPositionMetaball;\n
65 uniform vec2 uPositionVar;\n
66 uniform vec2 uGravityVector;\n
67 uniform float uRadius;\n
68 uniform float uRadiusVar;\n
71 vec2 adjustedCoords = vTexCoord * 2.0 - 1.0;\n
72 vec2 finalMetaballPosition = uPositionMetaball + uGravityVector + uPositionVar;\n
74 float finalRadius = uRadius + uRadiusVar;\n
75 vec2 distanceVec = adjustedCoords - finalMetaballPosition;\n
76 float result = dot(distanceVec, distanceVec);\n
77 float color = inversesqrt(result) * finalRadius;\n
79 gl_FragColor = vec4(color,color,color,1.0);\n
83 const char*const REFRACTION_FRAG_SHADER = DALI_COMPOSE_SHADER (
84 precision highp float;\n
85 varying vec2 vTexCoord;\n
86 uniform sampler2D sTexture;\n
87 uniform sampler2D sEffect;\n
88 uniform vec2 uPositionMetaball;\n
92 vec3 normal = vec3(0.0,0.0,1.0);\n
93 vec2 fakePos = vec2(0.0,0.0);\n
94 vec3 color = vec3(1.0, 1.0, 1.0);
97 vec4 metaColor = texture2D(sEffect, vTexCoord);\n
99 vec2 adjustedCoords = vTexCoord.xy * vec2(2.0) - vec2(1.0);\n
100 fakePos = adjustedCoords.xy - vec2(uPositionMetaball.x, -uPositionMetaball.y);
101 float len = length(fakePos) + 0.01;\n
102 vec3 colorPos = vec3(0,0,1);
104 if (metaColor.r > 0.85)\n
106 zoomCoords = ((vTexCoord - 0.5) * 0.9);\n
107 zoomCoords = zoomCoords + 0.5;\n
109 float interpNormal = mix(0.7, 1.0, (metaColor.r - 0.85) * 4.);\n
110 normal.xyz = vec3(fakePos.x * (1.0 - interpNormal) / len, fakePos.y * (1.0 - interpNormal) / len, interpNormal);\n
111 normal.xyz = normalize(normal.xyz);\n
112 color = vec3(0.65, 1.0, 0);\n
113 colorPos = vec3(fakePos.x,fakePos.y,0);
115 else if (metaColor.r > 0.75)\n
117 float interpolation = mix(0.9, 1.15, (0.85 - metaColor.r) * 10.0);\n
118 zoomCoords = ((vTexCoord - 0.5) * interpolation);\n
119 zoomCoords = zoomCoords + 0.5;\n
121 float interpNormal = mix(0.7, 0.0, (0.85 - metaColor.r) * 10.0);\n
122 normal.xyz = vec3(fakePos.x * (1.0 - interpNormal) / len, fakePos.y * (1.0 - interpNormal) / len, interpNormal);\n
123 normal.xyz = normalize(normal.xyz);\n
124 color = vec3(0.65, 1.0, 0);\n
125 colorPos = vec3(fakePos.x,fakePos.y,0);
129 zoomCoords = vTexCoord;\n
130 normal = vec3(0,0,0);\n
134 vec3 lightPosition = vec3(-750.0,-1000.0,2000.0);\n
135 vec3 vertex = vec3(adjustedCoords.x,adjustedCoords.y,0.0);\n
137 vec3 vecToLight = normalize( lightPosition - vertex );\n
139 float lightDiffuse = dot( vecToLight, normal );\n
140 lightDiffuse = max(0.0,lightDiffuse);\n
141 lightDiffuse = lightDiffuse * 0.5 + 0.5;
143 vec3 vertexToEye = vec3(0,0,1) - vertex;\n
144 vertexToEye = normalize(vertexToEye);
145 vec3 lightReflect = normalize(reflect(-vecToLight, normal));\n
146 float specularFactor = max(0.0,dot(vertexToEye, lightReflect));\n
147 specularFactor = pow(specularFactor, 32.0) * 0.7;
149 vec4 texColor = texture2D(sTexture, zoomCoords);\n
150 gl_FragColor.rgb = texColor.rgb * ambient + color.rgb * texColor.rgb * lightDiffuse + vec3(specularFactor);\n
151 gl_FragColor.a = 1.0;
155 const char*const FRAG_SHADER = DALI_COMPOSE_SHADER (
156 precision mediump float;\n
159 gl_FragColor = texture2D(sTexture, vTexCoord);\n
172 Property::Index positionIndex;
173 Property::Index positionVarIndex;
177 /**************************************************************************/
178 /* Demo using Metaballs ***********/
179 /* When the metaball is clicked it explodes in different balls ***********/
180 /**************************************************************************/
181 class MetaballExplosionController : public ConnectionTracker
184 MetaballExplosionController( Application& application );
185 ~MetaballExplosionController();
188 * Main create function, it creates the metaballs and all the related data
190 void Create( Application& app );
193 * Touch event function
195 bool OnTouch( Actor actor, const TouchEvent& touch );
200 void OnKeyEvent(const KeyEvent& event);
204 Application& mApplication;
210 FrameBufferImage mMetaballFBO;
213 MetaballInfo mMetaballs[METABALL_NUMBER];
215 Property::Index mPositionIndex;
216 Actor mCompositionActor;
219 Vector2 mCurrentTouchPosition;
220 Vector2 mMetaballPosVariation;
221 Vector2 mMetaballPosVariationFrom;
222 Vector2 mMetaballPosVariationTo;
223 Vector2 mMetaballCenter;
226 Animation mPositionVarAnimation[METABALL_NUMBER];
229 Animation mDispersionAnimation[METABALL_NUMBER];
231 Timer mTimerDispersion;
238 * Create a mesh data with the geometry for the metaball rendering
240 Geometry CreateGeometry();
243 * Create a mesh data with the geometry for the final composition
245 Geometry CreateGeometryComposition();
248 * Create a mesh actor for the metaballs
250 void CreateMetaballActors();
253 * Create the render task and FBO to render the metaballs into a texture
255 void CreateMetaballImage();
258 * Create a mesh image to render the final composition
260 void AddRefractionImage();
263 * Function to create animations for the small variations of position inside the metaball
265 void CreateAnimations();
268 * Function to reset metaball state
270 void ResetMetaballs(bool resetAnims);
273 * Function to create disperse each of the ball that compose the metaball when exploding
275 void DisperseBallAnimation(int ball);
278 * Function to make metaballs come back to reset position
280 void LaunchResetMetaballPosition(Animation &source);
283 * Function to set things at the end of the animation
285 void EndDisperseAnimation(Animation &source);
288 * Function to init dispersion of the metaballs one by one using a timer
289 * (so not all the balls begin moving at the same time)
291 bool OnTimerDispersionTick();
294 * Function to set the actual position of the metaballs when the user clicks the screen
296 void SetPositionToMetaballs(Vector2 & metaballCenter);
300 //-----------------------------------------------------------------------------------------------
306 MetaballExplosionController::MetaballExplosionController( Application& application )
307 : mApplication( application )
309 // Connect to the Application's Init signal
310 mApplication.InitSignal().Connect( this, &MetaballExplosionController::Create );
313 MetaballExplosionController::~MetaballExplosionController()
315 // Nothing to do here;
318 void MetaballExplosionController::Create( Application& app )
320 Stage stage = Stage::GetCurrent();
322 stage.KeyEventSignal().Connect(this, &MetaballExplosionController::OnKeyEvent);
324 mScreenSize = stage.GetSize();
328 stage.SetBackgroundColor(Color::BLACK);
330 //Set background image for the view
331 mBackImage = ResourceImage::New( BACKGROUND_IMAGE );
333 srand((unsigned)time(0));
335 //Create internal data
336 CreateMetaballActors();
337 CreateMetaballImage();
338 AddRefractionImage();
343 mTimerDispersion = Timer::New( 150 );
344 mTimerDispersion.TickSignal().Connect(this, &MetaballExplosionController::OnTimerDispersionTick);
346 // Connect the callback to the touch signal on the mesh actor
347 stage.GetRootLayer().TouchedSignal().Connect( this, &MetaballExplosionController::OnTouch );
350 Geometry MetaballExplosionController::CreateGeometry()
352 float aspect = (float)mScreenSize.y / (float)mScreenSize.x;
354 // Create vertices and specify their color
355 float xsize = mScreenSize.x * 0.5;
357 //We create the meshdata for the metaballs
358 struct VertexPosition { Vector2 position; };
359 struct VertexTexture { Vector2 texture; };
360 struct VertexNormal { Vector3 normal; };
362 VertexPosition vertices[] = {
363 { Vector2( -xsize, -xsize * aspect) },
364 { Vector2( xsize, -xsize * aspect) },
365 { Vector2( -xsize, xsize * aspect) },
366 { Vector2( xsize, xsize * aspect) }
369 VertexTexture textures[] = {
370 { Vector2(0.0f, 0.0f) },
371 { Vector2(1.0f, 0.0f) },
372 { Vector2(0.0f, 1.0f * aspect) },
373 { Vector2(1.0f, 1.0f * aspect) }
376 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
379 Property::Map positionVertexFormat;
380 positionVertexFormat["aPosition"] = Property::VECTOR2;
381 PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
382 positionVertices.SetData( vertices, numberOfVertices );
385 Property::Map textureVertexFormat;
386 textureVertexFormat["aTexture"] = Property::VECTOR2;
387 PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
388 textureVertices.SetData( textures, numberOfVertices );
391 unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
393 // Create the geometry object
394 Geometry texturedQuadGeometry = Geometry::New();
395 texturedQuadGeometry.AddVertexBuffer( positionVertices );
396 texturedQuadGeometry.AddVertexBuffer( textureVertices );
398 texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
400 return texturedQuadGeometry;
403 Geometry MetaballExplosionController::CreateGeometryComposition()
405 float aspect = (float)mScreenSize.y / (float)mScreenSize.x;
407 // Create vertices and specify their color
408 float xsize = mScreenSize.x * 0.5;
410 //We create the meshdata for the metaballs
411 struct VertexPosition { Vector2 position; };
412 struct VertexTexture { Vector2 texture; };
413 struct VertexNormal { Vector3 normal; };
415 VertexPosition vertices[] = {
416 { Vector2( -xsize, -xsize * aspect) },
417 { Vector2( xsize, -xsize * aspect) },
418 { Vector2( -xsize, xsize * aspect) },
419 { Vector2( xsize, xsize * aspect) }
422 VertexTexture textures[] = {
423 { Vector2(0.0f, 0.0f) },
424 { Vector2(1.0f, 0.0f) },
425 { Vector2(0.0f, 1.0f) },
426 { Vector2(1.0f, 1.0f) }
429 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
432 Property::Map positionVertexFormat;
433 positionVertexFormat["aPosition"] = Property::VECTOR2;
434 PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
435 positionVertices.SetData( vertices, numberOfVertices );
438 Property::Map textureVertexFormat;
439 textureVertexFormat["aTexture"] = Property::VECTOR2;
440 PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
441 textureVertices.SetData( textures, numberOfVertices );
444 unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
446 // Create the geometry object
447 Geometry texturedQuadGeometry = Geometry::New();
448 texturedQuadGeometry.AddVertexBuffer( positionVertices );
449 texturedQuadGeometry.AddVertexBuffer( textureVertices );
451 texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
453 return texturedQuadGeometry;
456 float randomNumber(float lowest, float highest)
458 float range=(highest-lowest);
459 return lowest+range*rand()/RAND_MAX;
462 void MetaballExplosionController::CreateMetaballActors()
464 //Create the shader for the metaballs
465 Shader shader = Shader::New( METABALL_VERTEX_SHADER, METABALL_FRAG_SHADER );
467 Geometry metaballGeom = CreateGeometry();
468 Renderer renderer = Renderer::New( metaballGeom, shader );
469 renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
470 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB, BlendFactor::ONE );
471 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB, BlendFactor::ONE );
472 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_ALPHA, BlendFactor::ONE );
473 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_ALPHA, BlendFactor::ONE );
475 //Initialization of each of the metaballs
476 for( int i = 0; i < METABALL_NUMBER; i++ )
478 mMetaballs[i].position = Vector2(0.0f, 0.0f);
479 mMetaballs[i].radius = mMetaballs[i].initRadius = randomNumber(0.05f,0.07f);
481 mMetaballs[i].actor = Actor::New( );
482 mMetaballs[i].actor.SetName("Metaball");
483 mMetaballs[i].actor.SetScale( 1.0f );
484 mMetaballs[i].actor.SetParentOrigin( ParentOrigin::CENTER );
485 mMetaballs[i].actor.AddRenderer( renderer );
487 mMetaballs[i].positionIndex = mMetaballs[i].actor.RegisterProperty( "uPositionMetaball", mMetaballs[i].position );
489 mMetaballs[i].positionVarIndex = mMetaballs[i].actor.RegisterProperty( "uPositionVar", Vector2(0.f,0.f) );
491 mMetaballs[i].actor.RegisterProperty( "uGravityVector", Vector2(randomNumber(-0.2,0.2),randomNumber(-0.2,0.2)) );
493 mMetaballs[i].actor.RegisterProperty( "uRadius", mMetaballs[i].radius );
495 mMetaballs[i].actor.RegisterProperty( "uRadiusVar", 0.f );
497 mMetaballs[i].actor.SetSize(400, 400);
501 mMetaballRoot = Actor::New();
502 mMetaballRoot.SetParentOrigin( ParentOrigin::CENTER );
503 for( int i = 0; i < METABALL_NUMBER; i++ )
505 mMetaballRoot.Add( mMetaballs[i].actor );
508 //Initialization of variables related to metaballs
509 mMetaballPosVariation = Vector2(0,0);
510 mMetaballPosVariationFrom = Vector2(0,0);
511 mMetaballPosVariationTo = Vector2(0,0);
512 mCurrentTouchPosition = Vector2(0,0);
515 void MetaballExplosionController::CreateMetaballImage()
517 //We create an FBO and a render task to create to render the metaballs with a fragment shader
518 Stage stage = Stage::GetCurrent();
519 mMetaballFBO = FrameBufferImage::New(mScreenSize.x, mScreenSize.y, Pixel::RGBA8888, RenderBuffer::COLOR_DEPTH);
522 stage.Add(mMetaballRoot);
524 //Creation of the render task used to render the metaballs
525 RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
526 RenderTask task = taskList.CreateTask();
527 task.SetRefreshRate( RenderTask::REFRESH_ALWAYS );
528 task.SetSourceActor( mMetaballRoot );
529 task.SetExclusive(true);
530 task.SetClearColor( Color::BLACK );
531 task.SetClearEnabled( true );
532 task.SetTargetFrameBuffer( mMetaballFBO );
535 void MetaballExplosionController::AddRefractionImage()
537 //Create Gaussian blur for the rendered image
538 FrameBufferImage fbo;
539 fbo = FrameBufferImage::New( mScreenSize.x, mScreenSize.y, Pixel::RGBA8888, RenderBuffer::COLOR_DEPTH);
541 GaussianBlurView gbv = GaussianBlurView::New(5, 2.0f, Pixel::RGBA8888, 0.5f, 0.5f, true);
542 gbv.SetBackgroundColor(Color::TRANSPARENT);
543 gbv.SetUserImageAndOutputRenderTarget( mMetaballFBO, fbo );
544 gbv.SetSize(mScreenSize.x, mScreenSize.y);
545 Stage::GetCurrent().Add(gbv);
549 Shader shader = Shader::New( METABALL_VERTEX_SHADER, REFRACTION_FRAG_SHADER );
551 //Create new texture set
552 TextureSet textureSet = TextureSet::New();
553 textureSet.SetImage( 0u, mBackImage );
554 textureSet.SetImage( 1u, fbo );
557 Geometry metaballGeom = CreateGeometryComposition();
559 Renderer mRenderer = Renderer::New( metaballGeom, shader );
560 mRenderer.SetTextures( textureSet );
562 mCompositionActor = Actor::New( );
563 mCompositionActor.SetParentOrigin(ParentOrigin::CENTER);
564 mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
565 mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y);
567 mCompositionActor.AddRenderer( mRenderer );
569 Vector2 metaballCenter(0.0,0);
570 metaballCenter.x = metaballCenter.x * 0.5;
571 metaballCenter.y = metaballCenter.y * 0.5;
573 mPositionIndex = mCompositionActor.RegisterProperty( "uPositionMetaball", metaballCenter );
575 SetPositionToMetaballs(metaballCenter);
577 mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y);
579 Stage stage = Stage::GetCurrent();
580 stage.Add( mCompositionActor );
583 void MetaballExplosionController::CreateAnimations()
587 for( int i = 0; i < METABALL_NUMBER; i++ )
590 KeyFrames keySinCosVariation = KeyFrames::New();
591 Vector2 sinCosVariation(0,0);
593 direction.x = randomNumber(-100.f,100.f);
594 direction.y = randomNumber(-100.f,100.f);
596 direction.Normalize();
599 for( int j = 0; j < 360; j++ )
601 sinCosVariation.x = sin(j * Math::PI/180.f) * direction.x;
602 sinCosVariation.y = cos(j * Math::PI/180.f) * direction.y;
604 keySinCosVariation.Add(key, sinCosVariation);
607 mPositionVarAnimation[i] = Animation::New(3.f);
608 mPositionVarAnimation[i].AnimateBetween(Property( mMetaballs[i].actor, mMetaballs[i].positionVarIndex ), keySinCosVariation);
609 mPositionVarAnimation[i].SetLooping( true );
610 mPositionVarAnimation[i].Play();
614 void MetaballExplosionController::ResetMetaballs(bool resetAnims)
616 for( int i = 0; i < METABALL_NUMBER; i++ )
618 if (mDispersionAnimation[i])
619 mDispersionAnimation[i].Clear();
621 mMetaballs[i].position = Vector2(0.0f, 0.0f);
622 mMetaballs[i].actor.SetProperty(mMetaballs[i].positionIndex, mMetaballs[i].position);
624 mTimerDispersion.Stop();
627 mCompositionActor.SetProperty( mPositionIndex, Vector2(0,0) );
630 void MetaballExplosionController::DisperseBallAnimation(int ball)
633 position.x = randomNumber(-1.5f,1.5f);
634 position.y = randomNumber(-1.5f,1.5f);
636 mDispersionAnimation[ball] = Animation::New(2.0f * mTimeMult);
637 mDispersionAnimation[ball].AnimateTo( Property(mMetaballs[ball].actor, mMetaballs[ball].positionIndex), position);
638 mDispersionAnimation[ball].Play();
640 if( ball == METABALL_NUMBER - 1 )
641 mDispersionAnimation[ball].FinishedSignal().Connect( this, &MetaballExplosionController::LaunchResetMetaballPosition );
644 void MetaballExplosionController::LaunchResetMetaballPosition(Animation &source)
646 for( int i = 0; i < METABALL_NUMBER; i++ )
648 mDispersionAnimation[i] = Animation::New(1.5f + i*0.25f*mTimeMult);
649 mDispersionAnimation[i].AnimateTo(Property(mMetaballs[i].actor, mMetaballs[i].positionIndex), Vector2(0,0));
650 mDispersionAnimation[i].Play();
652 if( i == METABALL_NUMBER - 1 )
653 mDispersionAnimation[i].FinishedSignal().Connect( this, &MetaballExplosionController::EndDisperseAnimation );
657 void MetaballExplosionController::EndDisperseAnimation(Animation &source)
659 mCompositionActor.SetProperty( mPositionIndex, Vector2(0,0) );
662 bool MetaballExplosionController::OnTimerDispersionTick()
664 if( mDispersion < METABALL_NUMBER )
666 DisperseBallAnimation(mDispersion);
672 void MetaballExplosionController::SetPositionToMetaballs(Vector2 & metaballCenter)
674 //We set the position for the metaballs based on click position
675 for( int i = 0; i < METABALL_NUMBER; i++ )
677 mMetaballs[i].position = metaballCenter;
678 mMetaballs[i].actor.SetProperty(mMetaballs[i].positionIndex, mMetaballs[i].position);
681 mCompositionActor.SetProperty( mPositionIndex, metaballCenter );
684 bool MetaballExplosionController::OnTouch( Actor actor, const TouchEvent& touch )
686 const TouchPoint &point = touch.GetPoint(0);
687 float aspectR = mScreenSize.y / mScreenSize.x;
689 switch( point.state )
691 case TouchPoint::Down:
693 ResetMetaballs(true);
695 Vector2 metaballCenter = Vector2((point.screen.x / mScreenSize.x) - 0.5, (aspectR * (mScreenSize.y - point.screen.y) / mScreenSize.y) - 0.5) * 2.0;
696 SetPositionToMetaballs(metaballCenter);
700 case TouchPoint::Motion:
702 Vector2 metaballCenter = Vector2((point.screen.x / mScreenSize.x) - 0.5, (aspectR * (mScreenSize.y - point.screen.y) / mScreenSize.y) - 0.5) * 2.0;
703 SetPositionToMetaballs(metaballCenter);
707 case TouchPoint::Leave:
708 case TouchPoint::Interrupted:
710 mTimerDispersion.Start();
719 void MetaballExplosionController::OnKeyEvent(const KeyEvent& event)
721 if(event.state == KeyEvent::Down)
723 if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) )
731 //-----------------------------------------------------------------------------------------------
735 //-----------------------------------------------------------------------------------------------
737 void RunTest( Application& application )
739 MetaballExplosionController test( application );
741 application.MainLoop();
744 // Entry point for Linux & Tizen applications
746 int DALI_EXPORT_API main( int argc, char **argv )
748 Application application = Application::New( &argc, &argv );
750 RunTest( application );