#include <dali-toolkit-test-suite-utils.h>
#include <dali.h>
+#include <dali/devel-api/rendering/renderer.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h>
Image shapeImage = CreateSolidColorImage( application, Color::GREEN, 5, 5 );
BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 150, Vector2( 5.f, 10.f ));
+ DALI_TEST_CHECK(emitter);
Actor root = emitter.GetRootActor();
Stage::GetCurrent().Add( root );
+ root.SetPosition( Vector3::ZERO );
+ root.SetParentOrigin( ParentOrigin::CENTER );
+ root.SetAnchorPoint( AnchorPoint::CENTER );
TestGlAbstraction& gl = application.GetGlAbstraction();
Wait(application);
DALI_TEST_CHECK( gl.GetUniformValue<float>( "uDynamicScale", scaleValue ) );
DALI_TEST_EQUALS( scaleValue, 0.5f, TEST_LOCATION );
+
END_TEST;
}
Image shapeImage = CreateSolidColorImage( application, Color::GREEN, 5, 5 );
BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 150, Vector2( 5.f, 10.f ));
+ DALI_TEST_CHECK(emitter);
Actor root = emitter.GetRootActor();
Stage::GetCurrent().Add( root );
+ root.SetPosition( Vector3::ZERO );
+ root.SetParentOrigin( ParentOrigin::CENTER );
+ root.SetAnchorPoint( AnchorPoint::CENTER );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
Wait(application);
Stage::GetCurrent().Add( root );
DALI_TEST_CHECK( bubbleMesh );
- Property::Index propertyIndex0 = bubbleMesh.GetPropertyIndex( "percentage-0" );
- Property::Index propertyIndex1 = bubbleMesh.GetPropertyIndex( "percentage-1" );
+ Property::Index propertyIndex0 = bubbleMesh.GetPropertyIndex( "uPercentage[0]" );
+ Property::Index propertyIndex1 = bubbleMesh.GetPropertyIndex( "uPercentage[1]" );
float value0, value1;
Animation animation = Animation::New( 0.5f );
animation.Play();
Wait(application, 300);
- propertyIndex0 = bubbleMesh.GetPropertyIndex( "percentage-0" );
- propertyIndex1 = bubbleMesh.GetPropertyIndex( "percentage-1" );
+ propertyIndex0 = bubbleMesh.GetPropertyIndex( "uPercentage[0]" );
+ propertyIndex1 = bubbleMesh.GetPropertyIndex( "uPercentage[1]" );
(bubbleMesh.GetProperty(propertyIndex0)).Get( value0 );
(bubbleMesh.GetProperty(propertyIndex1)).Get( value1 );
DALI_TEST_CHECK( value0 >= 0.6f );
BubbleEmitter emitter = BubbleEmitter::New( Vector2(50.f,50.f),shapeImage, 90, Vector2( 5.f, 10.f ));
Actor root = emitter.GetRootActor();
Stage::GetCurrent().Add( root );
+ root.SetPosition( Vector3::ZERO );
+ root.SetParentOrigin( ParentOrigin::CENTER );
+ root.SetAnchorPoint( AnchorPoint::CENTER );
Actor bubbleMesh = root.GetChildAt( 0 );
Renderer renderer = bubbleMesh.GetRendererAt( 0 );
DALI_TEST_CHECK( gl.GetUniformValue<float>( "uPercentage[0]", percentageValue ) );
DALI_TEST_EQUALS( percentageValue, 0.f, TEST_LOCATION );
- DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uStartAndEndPos[0]", startEndPosValue ) );
+ DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uStartEndPosition[0]", startEndPosValue ) );
DALI_TEST_EQUALS( startEndPosValue.x, 40.f, TEST_LOCATION );
DALI_TEST_EQUALS( startEndPosValue.y, 40.f, TEST_LOCATION );
DALI_TEST_CHECK( gl.GetUniformValue<float>( "uPercentage[0]", percentageValue ) );
DALI_TEST_CHECK( percentageValue < 0.5f && percentageValue >= 0.4);
- DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uStartAndEndPos[0]", startEndPosValue ) );
+ DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uStartEndPosition[0]", startEndPosValue ) );
DALI_TEST_EQUALS( startEndPosValue.x, 40.f, TEST_LOCATION );
DALI_TEST_EQUALS( startEndPosValue.y, 40.f, TEST_LOCATION );
DALI_TEST_CHECK( gl.GetUniformValue<float>( "uPercentage[0]", percentageValue ) );
DALI_TEST_EQUALS( percentageValue, 0.f, TEST_LOCATION );
- DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uStartAndEndPos[0]", startEndPosValue ) );
+ DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uStartEndPosition[0]", startEndPosValue ) );
DALI_TEST_EQUALS( startEndPosValue, Vector4::ZERO, TEST_LOCATION );
+
END_TEST;
}