+ void CreateQuadMorph( Vector3 center, float radius )
+ {
+ Shader shader = CreateShader( 16 );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[0]"), Vector3( -radius, -radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[1]"), Vector3( 0.0f, -radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[2]"), Vector3( radius, -radius, 0.0f ) );
+
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[3]"), Vector3( radius, -radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[4]"), Vector3( radius, 0.0f, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[5]"), Vector3( radius, radius, 0.0f ) );
+
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[6]"), Vector3( radius, radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[7]"), Vector3( 0.0f, radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[8]"), Vector3( -radius, radius, 0.0f ) );
+
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[9]"), Vector3( -radius, radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[10]"), Vector3( -radius, 0.0f, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[11]"), Vector3( -radius, -radius, 0.0f ) );
+
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[12]"), Vector3( -radius, -radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[13]"), Vector3( radius, -radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[14]"), Vector3( radius, radius, 0.0f ) );
+ shader.SetProperty( shader.GetPropertyIndex("uPosition[15]"), Vector3( -radius, radius, 0.0f ) );
+
+ static const Vector3 vertexData[] = { Dali::Vector3( 0.0f, 0.0f, 0.0f ),
+ Dali::Vector3( 0.5f, 0.0f, 1.0f ),
+ Dali::Vector3( 1.0f, 1.0f, 2.0f ),
+
+ Dali::Vector3( 0.0f, 0.0f, 3.0f ),
+ Dali::Vector3( 0.5f, 0.0f, 4.0f ),
+ Dali::Vector3( 1.0f, 1.0f, 5.0f ),
+
+ Dali::Vector3( 0.0f, 0.0f, 6.0f ),
+ Dali::Vector3( 0.5f, 0.0f, 7.0f ),
+ Dali::Vector3( 1.0f, 1.0f, 8.0f ),
+
+ Dali::Vector3( 0.0f, 0.0f, 9.0f ),
+ Dali::Vector3( 0.5f, 0.0f, 10.0f ),
+ Dali::Vector3( 1.0f, 1.0f, 11.0f ),
+
+ Dali::Vector3( 0.0f, 1.0f, 12.0f ),
+ Dali::Vector3( 0.0f, 1.0f, 13.0f ),
+ Dali::Vector3( 0.0f, 1.0f, 14.0f ),
+ Dali::Vector3( 0.0f, 1.0f, 15.0f ) };
+
+ short unsigned int indexData[] = { 0, 2, 1, 3, 5, 4, 6, 8, 7, 9, 11, 10, 12, 15, 14, 12, 14, 13 };
+
+ //Create a vertex buffer for vertex positions and texture coordinates
+ Dali::Property::Map vertexFormat;
+ vertexFormat["aCoefficient"] = Dali::Property::VECTOR3;
+ Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::New( vertexFormat );
+ vertexBuffer.SetData( vertexData, sizeof(vertexData)/sizeof(vertexData[0]));
+
+ //Create the geometry
+ Dali::Geometry geometry = Dali::Geometry::New();
+ geometry.AddVertexBuffer( vertexBuffer );
+ geometry.SetIndexBuffer( indexData, sizeof(indexData)/sizeof(indexData[0]) );
+
+ Renderer renderer = Renderer::New( geometry, shader );
+ renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
+
+ Actor actor = Actor::New();
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, center );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,0.0f,0.0f,1.0f) );
+ actor.AddRenderer( renderer );