Text Atlas Renderer Fixes
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / atlas-manager / atlas-manager-impl.cpp
index 4a55e59..d58daa9 100644 (file)
@@ -150,7 +150,6 @@ Toolkit::AtlasManager::AtlasId AtlasManager::CreateAtlas( const Toolkit::AtlasMa
   atlas.Upload( atlasDescriptor.mFilledPixelImage, 0, 0 );
 
   Sampler sampler = Sampler::New( atlas, "sTexture" );
   atlas.Upload( atlasDescriptor.mFilledPixelImage, 0, 0 );
 
   Sampler sampler = Sampler::New( atlas, "sTexture" );
-  sampler.SetFilterMode( Sampler::NEAREST, Sampler::NEAREST );
   sampler.SetProperty( Sampler::Property::AFFECTS_TRANSPARENCY, true );
   Shader shader;
   if ( pixelformat == Pixel::BGRA8888 )
   sampler.SetProperty( Sampler::Property::AFFECTS_TRANSPARENCY, true );
   Shader shader;
   if ( pixelformat == Pixel::BGRA8888 )
@@ -163,6 +162,7 @@ Toolkit::AtlasManager::AtlasId AtlasManager::CreateAtlas( const Toolkit::AtlasMa
   }
   atlasDescriptor.mMaterial = Material::New( shader );
   atlasDescriptor.mMaterial.AddSampler( sampler );
   }
   atlasDescriptor.mMaterial = Material::New( shader );
   atlasDescriptor.mMaterial.AddSampler( sampler );
+  atlasDescriptor.mSampler = sampler;
   atlasDescriptor.mMaterial.SetBlendMode( BlendingMode::ON );
   mAtlasList.push_back( atlasDescriptor );
   return mAtlasList.size();
   atlasDescriptor.mMaterial.SetBlendMode( BlendingMode::ON );
   mAtlasList.push_back( atlasDescriptor );
   return mAtlasList.size();
@@ -840,6 +840,16 @@ Material AtlasManager::GetMaterial( AtlasId atlas ) const
   return null;
 }
 
   return null;
 }
 
+Sampler AtlasManager::GetSampler( AtlasId atlas ) const
+{
+  if ( atlas && atlas <= mAtlasList.size() )
+  {
+    return mAtlasList[ atlas -1u ].mSampler;
+  }
+  Sampler null;
+  return null;
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
 } // namespace Internal
 
 } // namespace Toolkit