TextVisual pixel aligned and uses new shader
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / mesh / mesh-visual.cpp
index 3384976..41b99ad 100644 (file)
@@ -28,7 +28,7 @@
 #include <fstream>
 
 //INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visual-factory/devel-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
 
@@ -344,9 +344,11 @@ const char* NORMAL_MAP_FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
 
 } // unnamed namespace
 
-MeshVisualPtr MeshVisual::New( VisualFactoryCache& factoryCache )
+MeshVisualPtr MeshVisual::New( VisualFactoryCache& factoryCache, const Property::Map& properties )
 {
-  return new MeshVisual( factoryCache );
+  MeshVisualPtr meshVisualPtr( new MeshVisual( factoryCache ) );
+  meshVisualPtr->SetProperties( properties );
+  return meshVisualPtr;
 }
 
 MeshVisual::MeshVisual( VisualFactoryCache& factoryCache )
@@ -429,13 +431,6 @@ void MeshVisual::OnSetTransform()
   }
 }
 
-void MeshVisual::SetSize( const Vector2& size )
-{
-  Visual::Base::SetSize( size );
-
-  // ToDo: renderer responds to the size change
-}
-
 void MeshVisual::DoSetOnStage( Actor& actor )
 {
   InitializeRenderer();
@@ -446,7 +441,7 @@ void MeshVisual::DoSetOnStage( Actor& actor )
 void MeshVisual::DoCreatePropertyMap( Property::Map& map ) const
 {
   map.Clear();
-  map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::MESH );
+  map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::MESH );
   map.Insert( Toolkit::MeshVisual::Property::OBJECT_URL, mObjectUrl );
   map.Insert( Toolkit::MeshVisual::Property::MATERIAL_URL, mMaterialUrl );
   map.Insert( Toolkit::MeshVisual::Property::TEXTURES_PATH, mTexturesPath );
@@ -456,17 +451,6 @@ void MeshVisual::DoCreatePropertyMap( Property::Map& map ) const
   map.Insert( Toolkit::MeshVisual::Property::LIGHT_POSITION, mLightPosition );
 }
 
-void MeshVisual::DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue )
-{
-  // TODO
-}
-
-Dali::Property::Value MeshVisual::DoGetProperty( Dali::Property::Index index )
-{
-  // TODO
-  return Dali::Property::Value();
-}
-
 void MeshVisual::InitializeRenderer()
 {
   //Try to load the geometry from the file.