Updated visuals to separate alpha channel from mixColor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / wireframe / wireframe-visual.cpp
index 5fd3160..764ba27 100644 (file)
@@ -67,11 +67,13 @@ void main()\n
 );
 
 const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(\n
-uniform lowp vec4 uColor;\n
+  uniform lowp vec4 uColor;\n
+  uniform lowp vec3 mixColor;\n
+  uniform lowp float opacity;\n
 \n
 void main()\n
 {\n
-  gl_FragColor = uColor;\n
+  gl_FragColor = uColor * vec4( mixColor, opacity );\n
 }\n
 );
 
@@ -153,7 +155,13 @@ void WireframeVisual::DoCreatePropertyMap( Property::Map& map ) const
 
 void WireframeVisual::DoSetProperties( const Property::Map& propertyMap )
 {
-  // no properties supported at the moment
+  Property::Value* mixValue = propertyMap.Find( Toolkit::DevelVisual::Property::MIX_COLOR, MIX_COLOR );
+  if( mixValue )
+  {
+    Vector4 mixColor;
+    mixValue->Get( mixColor );
+    SetMixColor( mixColor );
+  }
 }
 
 void WireframeVisual::DoSetOnStage( Actor& actor )