X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Frendering%2Fatlas%2Fatlas-glyph-manager-impl.cpp;h=f40b3a4b07c505e870c01a7757daaecb93503faa;hp=49dd310f93f409fea97e3c062c6916477b2febdb;hb=a2de9cf491172cd5da9dc9ed60b17683dab6d7bc;hpb=a9e64686388c10743bf66a9c5d6e0aa06e198c70 diff --git a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp index 49dd310..f40b3a4 100644 --- a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp @@ -96,12 +96,11 @@ void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph, if ( mAtlasManager.Add( bitmap, slot ) ) { - // A new atlas was created so set the material details for the atlas + // A new atlas was created so set the texture set details for the atlas Dali::Atlas atlas = mAtlasManager.GetAtlasContainer( slot.mAtlasId ); - Pixel::Format pixelFormat = mAtlasManager.GetPixelFormat( slot.mAtlasId ); - Material material = Material::New( pixelFormat == Pixel::L8 ? mShaderL8 : mShaderRgba ); - material.AddTexture( atlas, "sTexture" ); - mAtlasManager.SetMaterial( slot.mAtlasId, material ); + TextureSet textureSet = TextureSet::New(); + textureSet.SetImage( 0u, atlas ); + mAtlasManager.SetTextures( slot.mAtlasId, textureSet ); } GlyphRecordEntry record; @@ -252,9 +251,15 @@ void AtlasGlyphManager::AdjustReferenceCount( Text::FontId fontId, Text::GlyphIn } } -Material AtlasGlyphManager::GetMaterial( uint32_t atlasId ) const +TextureSet AtlasGlyphManager::GetTextures( uint32_t atlasId ) const { - return mAtlasManager.GetMaterial( atlasId ); + return mAtlasManager.GetTextures( atlasId ); +} + +Shader AtlasGlyphManager::GetShader( uint32_t atlasId ) const +{ + Pixel::Format pixelFormat = mAtlasManager.GetPixelFormat( atlasId ); + return pixelFormat == Pixel::L8 ? mShaderL8 : mShaderRgba; } AtlasGlyphManager::~AtlasGlyphManager()