[dali_1.1.27] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / bubble-effect / bubble-emitter-impl.cpp
index aeb1de2..1f5b966 100644 (file)
@@ -32,16 +32,19 @@ namespace
 {
 struct Vertex
 {
-  float index;
-  Dali::Vector2 position;
-  Dali::Vector2 textureCoord;
-
   Vertex()
-  {}
+  : index( 0.0f ), position(), textureCoord()
+  {
+  }
 
   Vertex( float index, const Dali::Vector2& position, const Dali::Vector2& textureCoord )
   : index( index ), position( position ), textureCoord( textureCoord )
-  {}
+  {
+  }
+
+  float index;
+  Dali::Vector2 position;
+  Dali::Vector2 textureCoord;
 };
 
 /**
@@ -223,22 +226,6 @@ void BubbleEmitter::SetBubbleDensity( unsigned int density )
   }
 }
 
-void BubbleEmitter::SetBlendMode( bool enable )
-{
-  if(enable)
-  {
-    // linear overlay
-    mMaterial.SetBlendFunc(BlendingFactor::SRC_ALPHA, BlendingFactor::ONE,
-                           BlendingFactor::ZERO, BlendingFactor::ONE);
-  }
-  else
-  {
-    // using default blend func
-    mMaterial.SetBlendFunc( BlendingFactor::SRC_ALPHA,   BlendingFactor::ONE_MINUS_SRC_ALPHA,
-                            BlendingFactor::ONE, BlendingFactor::ONE_MINUS_SRC_ALPHA );
-  }
-}
-
 // clear the resources created for the off screen rendering
 void BubbleEmitter::OnRenderFinished(RenderTask& source)
 {
@@ -320,13 +307,13 @@ Geometry BubbleEmitter::CreateGeometry( unsigned int numOfPatch )
   vertexFormat["aIndex"] = Property::FLOAT;
   vertexFormat["aPosition"] = Property::VECTOR2;
   vertexFormat["aTexCoord"] = Property::VECTOR2;
-  PropertyBuffer vertices = PropertyBuffer::New( vertexFormat, numVertex  );
-  vertices.SetData( &vertexData[0] );
+  PropertyBuffer vertices = PropertyBuffer::New( vertexFormat );
+  vertices.SetData( &vertexData[0], numVertex );
 
   Property::Map indexFormat;
   indexFormat["indices"] = Property::INTEGER;
-  PropertyBuffer indices = PropertyBuffer::New( indexFormat, numIndex  );
-  indices.SetData( &indexData[0] );
+  PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+  indices.SetData( &indexData[0], numIndex );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertices );