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"
28 #include "shared/utility.h"
31 using namespace Dali::Toolkit;
35 const char * const BACKGROUND_IMAGE( DEMO_IMAGE_DIR "background-2.jpg" );
36 const char * const TOOLBAR_IMAGE( DEMO_IMAGE_DIR "top-bar.png" );
38 const float GRAVITY_X(0);
39 const float GRAVITY_Y(-0.09);
42 #define METABALL_NUMBER 6
45 const char*const METABALL_VERTEX_SHADER = DALI_COMPOSE_SHADER (
46 attribute mediump vec2 aPosition;\n
47 attribute mediump vec2 aTexture;\n
48 uniform mediump mat4 uMvpMatrix;\n
49 uniform mediump vec3 uSize;\n
50 uniform lowp vec4 uColor;\n
51 varying mediump vec2 vTexCoord;\n
55 vTexCoord = aTexture;\n
56 mediump vec4 vertexPosition = vec4(aPosition.x, aPosition.y, 0.0, 1.0);\n
57 gl_Position = uMvpMatrix * vertexPosition;\n
62 const char*const METABALL_FRAG_SHADER = DALI_COMPOSE_SHADER (
63 precision mediump float;\n
64 varying vec2 vTexCoord;\n
65 uniform vec2 uPositionMetaball;\n
66 uniform vec2 uPositionVar;\n
67 uniform vec2 uGravityVector;\n
68 uniform float uRadius;\n
69 uniform float uRadiusVar;\n
72 vec2 adjustedCoords = vTexCoord * 2.0 - 1.0;\n
73 vec2 finalMetaballPosition = uPositionMetaball + uGravityVector + uPositionVar;\n
75 float finalRadius = uRadius + uRadiusVar;\n
76 vec2 distanceVec = adjustedCoords - finalMetaballPosition;\n
77 float result = dot(distanceVec, distanceVec);\n
78 float color = inversesqrt(result) * finalRadius;\n
80 gl_FragColor = vec4(color,color,color,1.0);\n
84 const char*const REFRACTION_FRAG_SHADER = DALI_COMPOSE_SHADER (
85 precision highp float;\n
86 varying vec2 vTexCoord;\n
87 uniform sampler2D sTexture;\n
88 uniform sampler2D sEffect;\n
89 uniform vec2 uPositionMetaball;\n
93 vec3 normal = vec3(0.0,0.0,1.0);\n
94 vec2 fakePos = vec2(0.0,0.0);\n
95 vec3 color = vec3(1.0, 1.0, 1.0);
98 vec4 metaColor = texture2D(sEffect, vTexCoord);\n
100 vec2 adjustedCoords = vTexCoord.xy * vec2(2.0) - vec2(1.0);\n
101 fakePos = adjustedCoords.xy - vec2(uPositionMetaball.x, -uPositionMetaball.y);
102 float len = length(fakePos) + 0.01;\n
103 vec3 colorPos = vec3(0,0,1);
105 if (metaColor.r > 0.85)\n
107 zoomCoords = ((vTexCoord - 0.5) * 0.9);\n
108 zoomCoords = zoomCoords + 0.5;\n
110 float interpNormal = mix(0.7, 1.0, (metaColor.r - 0.85) * 4.);\n
111 normal.xyz = vec3(fakePos.x * (1.0 - interpNormal) / len, fakePos.y * (1.0 - interpNormal) / len, interpNormal);\n
112 normal.xyz = normalize(normal.xyz);\n
113 color = vec3(0.65, 1.0, 0);\n
114 colorPos = vec3(fakePos.x,fakePos.y,0);
116 else if (metaColor.r > 0.75)\n
118 float interpolation = mix(0.9, 1.15, (0.85 - metaColor.r) * 10.0);\n
119 zoomCoords = ((vTexCoord - 0.5) * interpolation);\n
120 zoomCoords = zoomCoords + 0.5;\n
122 float interpNormal = mix(0.7, 0.0, (0.85 - metaColor.r) * 10.0);\n
123 normal.xyz = vec3(fakePos.x * (1.0 - interpNormal) / len, fakePos.y * (1.0 - interpNormal) / len, interpNormal);\n
124 normal.xyz = normalize(normal.xyz);\n
125 color = vec3(0.65, 1.0, 0);\n
126 colorPos = vec3(fakePos.x,fakePos.y,0);
130 zoomCoords = vTexCoord;\n
131 normal = vec3(0,0,0);\n
135 vec3 lightPosition = vec3(-750.0,-1000.0,2000.0);\n
136 vec3 vertex = vec3(adjustedCoords.x,adjustedCoords.y,0.0);\n
138 vec3 vecToLight = normalize( lightPosition - vertex );\n
140 float lightDiffuse = dot( vecToLight, normal );\n
141 lightDiffuse = max(0.0,lightDiffuse);\n
142 lightDiffuse = lightDiffuse * 0.5 + 0.5;
144 vec3 vertexToEye = vec3(0,0,1) - vertex;\n
145 vertexToEye = normalize(vertexToEye);
146 vec3 lightReflect = normalize(reflect(-vecToLight, normal));\n
147 float specularFactor = max(0.0,dot(vertexToEye, lightReflect));\n
148 specularFactor = pow(specularFactor, 32.0) * 0.7;
150 vec4 texColor = texture2D(sTexture, zoomCoords);\n
151 gl_FragColor.rgb = texColor.rgb * ambient + color.rgb * texColor.rgb * lightDiffuse + vec3(specularFactor);\n
152 gl_FragColor.a = 1.0;
156 const char*const FRAG_SHADER = DALI_COMPOSE_SHADER (
157 precision mediump float;\n
160 gl_FragColor = texture2D(sTexture, vTexCoord);\n
173 Property::Index positionIndex;
174 Property::Index positionVarIndex;
178 /**************************************************************************/
179 /* Demo using Metaballs ***********/
180 /* When the metaball is clicked it explodes in different balls ***********/
181 /**************************************************************************/
182 class MetaballExplosionController : public ConnectionTracker
185 MetaballExplosionController( Application& application );
186 ~MetaballExplosionController();
189 * Main create function, it creates the metaballs and all the related data
191 void Create( Application& app );
194 * Touch event function
196 bool OnTouch( Actor actor, const TouchData& touch );
201 void OnKeyEvent(const KeyEvent& event);
205 Application& mApplication;
211 FrameBufferImage mMetaballFBO;
214 MetaballInfo mMetaballs[METABALL_NUMBER];
216 Property::Index mPositionIndex;
217 Actor mCompositionActor;
220 Vector2 mCurrentTouchPosition;
221 Vector2 mMetaballPosVariation;
222 Vector2 mMetaballPosVariationFrom;
223 Vector2 mMetaballPosVariationTo;
224 Vector2 mMetaballCenter;
227 Animation mPositionVarAnimation[METABALL_NUMBER];
230 Animation mDispersionAnimation[METABALL_NUMBER];
232 Timer mTimerDispersion;
239 * Create a mesh data with the geometry for the metaball rendering
241 Geometry CreateGeometry();
244 * Create a mesh data with the geometry for the final composition
246 Geometry CreateGeometryComposition();
249 * Create a mesh actor for the metaballs
251 void CreateMetaballActors();
254 * Create the render task and FBO to render the metaballs into a texture
256 void CreateMetaballImage();
259 * Create a mesh image to render the final composition
261 void AddRefractionImage();
264 * Function to create animations for the small variations of position inside the metaball
266 void CreateAnimations();
269 * Function to reset metaball state
271 void ResetMetaballs(bool resetAnims);
274 * Function to create disperse each of the ball that compose the metaball when exploding
276 void DisperseBallAnimation(int ball);
279 * Function to make metaballs come back to reset position
281 void LaunchResetMetaballPosition(Animation &source);
284 * Function to set things at the end of the animation
286 void EndDisperseAnimation(Animation &source);
289 * Function to init dispersion of the metaballs one by one using a timer
290 * (so not all the balls begin moving at the same time)
292 bool OnTimerDispersionTick();
295 * Function to set the actual position of the metaballs when the user clicks the screen
297 void SetPositionToMetaballs(Vector2 & metaballCenter);
301 //-----------------------------------------------------------------------------------------------
307 MetaballExplosionController::MetaballExplosionController( Application& application )
308 : mApplication( application )
310 // Connect to the Application's Init signal
311 mApplication.InitSignal().Connect( this, &MetaballExplosionController::Create );
314 MetaballExplosionController::~MetaballExplosionController()
316 // Nothing to do here;
319 void MetaballExplosionController::Create( Application& app )
321 Stage stage = Stage::GetCurrent();
323 stage.KeyEventSignal().Connect(this, &MetaballExplosionController::OnKeyEvent);
325 mScreenSize = stage.GetSize();
329 stage.SetBackgroundColor(Color::BLACK);
331 //Set background image for the view
332 mBackImage = DemoHelper::LoadImage( BACKGROUND_IMAGE );
334 srand((unsigned)time(0));
336 //Create internal data
337 CreateMetaballActors();
338 CreateMetaballImage();
339 AddRefractionImage();
344 mTimerDispersion = Timer::New( 150 );
345 mTimerDispersion.TickSignal().Connect(this, &MetaballExplosionController::OnTimerDispersionTick);
347 // Connect the callback to the touch signal on the mesh actor
348 stage.GetRootLayer().TouchSignal().Connect( this, &MetaballExplosionController::OnTouch );
351 Geometry MetaballExplosionController::CreateGeometry()
353 float aspect = (float)mScreenSize.y / (float)mScreenSize.x;
355 // Create vertices and specify their color
356 float xsize = mScreenSize.x * 0.5;
358 //We create the meshdata for the metaballs
359 struct VertexPosition { Vector2 position; };
360 struct VertexTexture { Vector2 texture; };
361 struct VertexNormal { Vector3 normal; };
363 VertexPosition vertices[] = {
364 { Vector2( -xsize, -xsize * aspect) },
365 { Vector2( xsize, -xsize * aspect) },
366 { Vector2( -xsize, xsize * aspect) },
367 { Vector2( xsize, xsize * aspect) }
370 VertexTexture textures[] = {
371 { Vector2(0.0f, 0.0f) },
372 { Vector2(1.0f, 0.0f) },
373 { Vector2(0.0f, 1.0f * aspect) },
374 { Vector2(1.0f, 1.0f * aspect) }
377 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
380 Property::Map positionVertexFormat;
381 positionVertexFormat["aPosition"] = Property::VECTOR2;
382 PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
383 positionVertices.SetData( vertices, numberOfVertices );
386 Property::Map textureVertexFormat;
387 textureVertexFormat["aTexture"] = Property::VECTOR2;
388 PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
389 textureVertices.SetData( textures, numberOfVertices );
392 unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
394 // Create the geometry object
395 Geometry texturedQuadGeometry = Geometry::New();
396 texturedQuadGeometry.AddVertexBuffer( positionVertices );
397 texturedQuadGeometry.AddVertexBuffer( textureVertices );
399 texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
401 return texturedQuadGeometry;
404 Geometry MetaballExplosionController::CreateGeometryComposition()
406 float aspect = (float)mScreenSize.y / (float)mScreenSize.x;
408 // Create vertices and specify their color
409 float xsize = mScreenSize.x * 0.5;
411 //We create the meshdata for the metaballs
412 struct VertexPosition { Vector2 position; };
413 struct VertexTexture { Vector2 texture; };
414 struct VertexNormal { Vector3 normal; };
416 VertexPosition vertices[] = {
417 { Vector2( -xsize, -xsize * aspect) },
418 { Vector2( xsize, -xsize * aspect) },
419 { Vector2( -xsize, xsize * aspect) },
420 { Vector2( xsize, xsize * aspect) }
423 VertexTexture textures[] = {
424 { Vector2(0.0f, 0.0f) },
425 { Vector2(1.0f, 0.0f) },
426 { Vector2(0.0f, 1.0f) },
427 { Vector2(1.0f, 1.0f) }
430 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
433 Property::Map positionVertexFormat;
434 positionVertexFormat["aPosition"] = Property::VECTOR2;
435 PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat );
436 positionVertices.SetData( vertices, numberOfVertices );
439 Property::Map textureVertexFormat;
440 textureVertexFormat["aTexture"] = Property::VECTOR2;
441 PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat );
442 textureVertices.SetData( textures, numberOfVertices );
445 unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
447 // Create the geometry object
448 Geometry texturedQuadGeometry = Geometry::New();
449 texturedQuadGeometry.AddVertexBuffer( positionVertices );
450 texturedQuadGeometry.AddVertexBuffer( textureVertices );
452 texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
454 return texturedQuadGeometry;
457 float randomNumber(float lowest, float highest)
459 float range=(highest-lowest);
460 return lowest+range*rand()/RAND_MAX;
463 void MetaballExplosionController::CreateMetaballActors()
465 //Create the shader for the metaballs
466 Shader shader = Shader::New( METABALL_VERTEX_SHADER, METABALL_FRAG_SHADER );
468 Geometry metaballGeom = CreateGeometry();
469 Renderer renderer = Renderer::New( metaballGeom, shader );
470 renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
471 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB, BlendFactor::ONE );
472 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB, BlendFactor::ONE );
473 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_ALPHA, BlendFactor::ONE );
474 renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_ALPHA, BlendFactor::ONE );
476 //Initialization of each of the metaballs
477 for( int i = 0; i < METABALL_NUMBER; i++ )
479 mMetaballs[i].position = Vector2(0.0f, 0.0f);
480 mMetaballs[i].radius = mMetaballs[i].initRadius = randomNumber(0.05f,0.07f);
482 mMetaballs[i].actor = Actor::New( );
483 mMetaballs[i].actor.SetName("Metaball");
484 mMetaballs[i].actor.SetScale( 1.0f );
485 mMetaballs[i].actor.SetParentOrigin( ParentOrigin::CENTER );
486 mMetaballs[i].actor.AddRenderer( renderer );
488 mMetaballs[i].positionIndex = mMetaballs[i].actor.RegisterProperty( "uPositionMetaball", mMetaballs[i].position );
490 mMetaballs[i].positionVarIndex = mMetaballs[i].actor.RegisterProperty( "uPositionVar", Vector2(0.f,0.f) );
492 mMetaballs[i].actor.RegisterProperty( "uGravityVector", Vector2(randomNumber(-0.2,0.2),randomNumber(-0.2,0.2)) );
494 mMetaballs[i].actor.RegisterProperty( "uRadius", mMetaballs[i].radius );
496 mMetaballs[i].actor.RegisterProperty( "uRadiusVar", 0.f );
498 mMetaballs[i].actor.SetSize(400, 400);
502 mMetaballRoot = Actor::New();
503 mMetaballRoot.SetParentOrigin( ParentOrigin::CENTER );
504 for( int i = 0; i < METABALL_NUMBER; i++ )
506 mMetaballRoot.Add( mMetaballs[i].actor );
509 //Initialization of variables related to metaballs
510 mMetaballPosVariation = Vector2(0,0);
511 mMetaballPosVariationFrom = Vector2(0,0);
512 mMetaballPosVariationTo = Vector2(0,0);
513 mCurrentTouchPosition = Vector2(0,0);
516 void MetaballExplosionController::CreateMetaballImage()
518 //We create an FBO and a render task to create to render the metaballs with a fragment shader
519 Stage stage = Stage::GetCurrent();
520 mMetaballFBO = FrameBufferImage::New(mScreenSize.x, mScreenSize.y, Pixel::RGBA8888, RenderBuffer::COLOR_DEPTH);
523 stage.Add(mMetaballRoot);
525 //Creation of the render task used to render the metaballs
526 RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
527 RenderTask task = taskList.CreateTask();
528 task.SetRefreshRate( RenderTask::REFRESH_ALWAYS );
529 task.SetSourceActor( mMetaballRoot );
530 task.SetExclusive(true);
531 task.SetClearColor( Color::BLACK );
532 task.SetClearEnabled( true );
533 task.SetTargetFrameBuffer( mMetaballFBO );
536 void MetaballExplosionController::AddRefractionImage()
538 //Create Gaussian blur for the rendered image
539 FrameBufferImage fbo;
540 fbo = FrameBufferImage::New( mScreenSize.x, mScreenSize.y, Pixel::RGBA8888, RenderBuffer::COLOR_DEPTH);
542 GaussianBlurView gbv = GaussianBlurView::New(5, 2.0f, Pixel::RGBA8888, 0.5f, 0.5f, true);
543 gbv.SetBackgroundColor(Color::TRANSPARENT);
544 gbv.SetUserImageAndOutputRenderTarget( mMetaballFBO, fbo );
545 gbv.SetSize(mScreenSize.x, mScreenSize.y);
546 Stage::GetCurrent().Add(gbv);
550 Shader shader = Shader::New( METABALL_VERTEX_SHADER, REFRACTION_FRAG_SHADER );
552 //Create new texture set
553 TextureSet textureSet = TextureSet::New();
554 textureSet.SetImage( 0u, mBackImage );
555 textureSet.SetImage( 1u, fbo );
558 Geometry metaballGeom = CreateGeometryComposition();
560 Renderer mRenderer = Renderer::New( metaballGeom, shader );
561 mRenderer.SetTextures( textureSet );
563 mCompositionActor = Actor::New( );
564 mCompositionActor.SetParentOrigin(ParentOrigin::CENTER);
565 mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
566 mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y);
568 mCompositionActor.AddRenderer( mRenderer );
570 Vector2 metaballCenter(0.0,0);
571 metaballCenter.x = metaballCenter.x * 0.5;
572 metaballCenter.y = metaballCenter.y * 0.5;
574 mPositionIndex = mCompositionActor.RegisterProperty( "uPositionMetaball", metaballCenter );
576 SetPositionToMetaballs(metaballCenter);
578 mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y);
580 Stage stage = Stage::GetCurrent();
581 stage.Add( mCompositionActor );
584 void MetaballExplosionController::CreateAnimations()
588 for( int i = 0; i < METABALL_NUMBER; i++ )
591 KeyFrames keySinCosVariation = KeyFrames::New();
592 Vector2 sinCosVariation(0,0);
594 direction.x = randomNumber(-100.f,100.f);
595 direction.y = randomNumber(-100.f,100.f);
597 direction.Normalize();
600 for( int j = 0; j < 360; j++ )
602 sinCosVariation.x = sin(j * Math::PI/180.f) * direction.x;
603 sinCosVariation.y = cos(j * Math::PI/180.f) * direction.y;
605 keySinCosVariation.Add(key, sinCosVariation);
608 mPositionVarAnimation[i] = Animation::New(3.f);
609 mPositionVarAnimation[i].AnimateBetween(Property( mMetaballs[i].actor, mMetaballs[i].positionVarIndex ), keySinCosVariation);
610 mPositionVarAnimation[i].SetLooping( true );
611 mPositionVarAnimation[i].Play();
615 void MetaballExplosionController::ResetMetaballs(bool resetAnims)
617 for( int i = 0; i < METABALL_NUMBER; i++ )
619 if (mDispersionAnimation[i])
620 mDispersionAnimation[i].Clear();
622 mMetaballs[i].position = Vector2(0.0f, 0.0f);
623 mMetaballs[i].actor.SetProperty(mMetaballs[i].positionIndex, mMetaballs[i].position);
625 mTimerDispersion.Stop();
628 mCompositionActor.SetProperty( mPositionIndex, Vector2(0,0) );
631 void MetaballExplosionController::DisperseBallAnimation(int ball)
634 position.x = randomNumber(-1.5f,1.5f);
635 position.y = randomNumber(-1.5f,1.5f);
637 mDispersionAnimation[ball] = Animation::New(2.0f * mTimeMult);
638 mDispersionAnimation[ball].AnimateTo( Property(mMetaballs[ball].actor, mMetaballs[ball].positionIndex), position);
639 mDispersionAnimation[ball].Play();
641 if( ball == METABALL_NUMBER - 1 )
642 mDispersionAnimation[ball].FinishedSignal().Connect( this, &MetaballExplosionController::LaunchResetMetaballPosition );
645 void MetaballExplosionController::LaunchResetMetaballPosition(Animation &source)
647 for( int i = 0; i < METABALL_NUMBER; i++ )
649 mDispersionAnimation[i] = Animation::New(1.5f + i*0.25f*mTimeMult);
650 mDispersionAnimation[i].AnimateTo(Property(mMetaballs[i].actor, mMetaballs[i].positionIndex), Vector2(0,0));
651 mDispersionAnimation[i].Play();
653 if( i == METABALL_NUMBER - 1 )
654 mDispersionAnimation[i].FinishedSignal().Connect( this, &MetaballExplosionController::EndDisperseAnimation );
658 void MetaballExplosionController::EndDisperseAnimation(Animation &source)
660 mCompositionActor.SetProperty( mPositionIndex, Vector2(0,0) );
663 bool MetaballExplosionController::OnTimerDispersionTick()
665 if( mDispersion < METABALL_NUMBER )
667 DisperseBallAnimation(mDispersion);
673 void MetaballExplosionController::SetPositionToMetaballs(Vector2 & metaballCenter)
675 //We set the position for the metaballs based on click position
676 for( int i = 0; i < METABALL_NUMBER; i++ )
678 mMetaballs[i].position = metaballCenter;
679 mMetaballs[i].actor.SetProperty(mMetaballs[i].positionIndex, mMetaballs[i].position);
682 mCompositionActor.SetProperty( mPositionIndex, metaballCenter );
685 bool MetaballExplosionController::OnTouch( Actor actor, const TouchData& touch )
687 float aspectR = mScreenSize.y / mScreenSize.x;
689 switch( touch.GetState( 0 ) )
691 case PointState::DOWN:
693 ResetMetaballs(true);
695 const Vector2 screen = touch.GetScreenPosition( 0 );
696 Vector2 metaballCenter = Vector2((screen.x / mScreenSize.x) - 0.5, (aspectR * (mScreenSize.y - screen.y) / mScreenSize.y) - 0.5) * 2.0;
697 SetPositionToMetaballs(metaballCenter);
701 case PointState::MOTION:
703 const Vector2 screen = touch.GetScreenPosition( 0 );
704 Vector2 metaballCenter = Vector2((screen.x / mScreenSize.x) - 0.5, (aspectR * (mScreenSize.y - screen.y) / mScreenSize.y) - 0.5) * 2.0;
705 SetPositionToMetaballs(metaballCenter);
709 case PointState::LEAVE:
710 case PointState::INTERRUPTED:
712 mTimerDispersion.Start();
721 void MetaballExplosionController::OnKeyEvent(const KeyEvent& event)
723 if(event.state == KeyEvent::Down)
725 if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) )
733 //-----------------------------------------------------------------------------------------------
737 //-----------------------------------------------------------------------------------------------
739 void RunTest( Application& application )
741 MetaballExplosionController test( application );
743 application.MainLoop();
746 // Entry point for Linux & Tizen applications
748 int DALI_EXPORT_API main( int argc, char **argv )
750 Application application = Application::New( &argc, &argv );
752 RunTest( application );