Changes following "Remove Sampler scene object" 19/49119/6
authorFerran Sole <ferran.sole@samsung.com>
Tue, 6 Oct 2015 15:50:53 +0000 (16:50 +0100)
committerFerran Sole <ferran.sole@samsung.com>
Tue, 13 Oct 2015 14:28:10 +0000 (15:28 +0100)
Change-Id: I7934f6d0c516687c252f49509812f2a87becff3a

16 files changed:
automated-tests/src/dali-toolkit/utc-Dali-RendererFactory.cpp
dali-toolkit/internal/atlas-manager/atlas-manager-impl.cpp
dali-toolkit/internal/atlas-manager/atlas-manager-impl.h
dali-toolkit/internal/atlas-manager/atlas-manager.cpp
dali-toolkit/internal/atlas-manager/atlas-manager.h
dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp
dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h
dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp
dali-toolkit/internal/controls/renderers/gradient/gradient-renderer.cpp
dali-toolkit/internal/controls/renderers/image/image-renderer.cpp
dali-toolkit/internal/controls/renderers/npatch/npatch-renderer.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.h
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp

index 391bc74..9cc604b 100644 (file)
@@ -173,7 +173,7 @@ void TestControlRendererRender( ToolkitTestApplication& application, Actor& acto
   controlRenderer.SetOnStage( actor );
 
   DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
   controlRenderer.SetOnStage( actor );
 
   DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
-  DALI_TEST_CHECK( actor.GetRendererAt(0u).GetMaterial().GetNumberOfSamplers() == expectedSamplers );
+  DALI_TEST_CHECK( actor.GetRendererAt(0u).GetMaterial().GetNumberOfTextures() == expectedSamplers );
 
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
@@ -804,8 +804,6 @@ int UtcDaliRendererFactoryResetRenderer1(void)
   controlRenderer.SetOnStage( actor2 );
   application.SendNotification();
   application.Render(0);
   controlRenderer.SetOnStage( actor2 );
   application.SendNotification();
   application.Render(0);
-  Image samplerImage = actor2.GetRendererAt(0u).GetMaterial().GetSamplerAt(0u).GetImage();
-  DALI_TEST_CHECK( BufferImage::DownCast( samplerImage ) );
 
   END_TEST;
 }
 
   END_TEST;
 }
@@ -830,16 +828,12 @@ int UtcDaliRendererFactoryResetRenderer2(void)
 
   application.SendNotification();
   application.Render(0);
 
   application.SendNotification();
   application.Render(0);
-  Image samplerImage = actor.GetRendererAt(0u).GetMaterial().GetSamplerAt(0u).GetImage();
-  DALI_TEST_CHECK( ResourceImage::DownCast( samplerImage ) );
 
   Image bufferImage = CreateBufferImage( 100, 200, Vector4( 1.f, 1.f, 1.f, 1.f ) );
   bool isNewRenderer = factory.ResetRenderer( controlRenderer, bufferImage );
   DALI_TEST_CHECK( !isNewRenderer );
   application.SendNotification();
   application.Render(0);
 
   Image bufferImage = CreateBufferImage( 100, 200, Vector4( 1.f, 1.f, 1.f, 1.f ) );
   bool isNewRenderer = factory.ResetRenderer( controlRenderer, bufferImage );
   DALI_TEST_CHECK( !isNewRenderer );
   application.SendNotification();
   application.Render(0);
-  samplerImage = actor.GetRendererAt(0u).GetMaterial().GetSamplerAt(0u).GetImage();
-  DALI_TEST_CHECK( BufferImage::DownCast( samplerImage ) );
 
   isNewRenderer = factory.ResetRenderer( controlRenderer, Color::RED );
   DALI_TEST_CHECK( isNewRenderer );
 
   isNewRenderer = factory.ResetRenderer( controlRenderer, Color::RED );
   DALI_TEST_CHECK( isNewRenderer );
index 832e5d9..5a524d2 100644 (file)
@@ -159,11 +159,9 @@ Toolkit::AtlasManager::AtlasId AtlasManager::CreateAtlas( const Toolkit::AtlasMa
   memset( buffer, 0xFF, filledPixelImage.GetBufferSize() );
   atlas.Upload( filledPixelImage, 0, 0 );
 
   memset( buffer, 0xFF, filledPixelImage.GetBufferSize() );
   atlas.Upload( filledPixelImage, 0, 0 );
 
-  Sampler sampler = Sampler::New( atlas, "sTexture" );
-  sampler.SetProperty( Sampler::Property::AFFECTS_TRANSPARENCY, true );
   atlasDescriptor.mMaterial = Material::New( pixelformat == Pixel::L8 ? mShaderL8 : mShaderRgba );
   atlasDescriptor.mMaterial = Material::New( pixelformat == Pixel::L8 ? mShaderL8 : mShaderRgba );
-  atlasDescriptor.mMaterial.AddSampler( sampler );
-  atlasDescriptor.mSampler = sampler;
+  atlasDescriptor.mMaterial.AddTexture(atlas, "sTexture" );
+  atlasDescriptor.mImage = atlas;
   atlasDescriptor.mMaterial.SetBlendMode( BlendingMode::ON );
   mAtlasList.push_back( atlasDescriptor );
   return mAtlasList.size();
   atlasDescriptor.mMaterial.SetBlendMode( BlendingMode::ON );
   mAtlasList.push_back( atlasDescriptor );
   return mAtlasList.size();
@@ -792,13 +790,13 @@ Material AtlasManager::GetMaterial( AtlasId atlas ) const
   return null;
 }
 
   return null;
 }
 
-Sampler AtlasManager::GetSampler( AtlasId atlas ) const
+Image AtlasManager::GetImage( AtlasId atlas ) const
 {
   if ( atlas && atlas-- <= mAtlasList.size() )
   {
 {
   if ( atlas && atlas-- <= mAtlasList.size() )
   {
-    return mAtlasList[ atlas ].mSampler;
+    return mAtlasList[ atlas ].mImage;
   }
   }
-  Sampler null;
+  Image null;
   return null;
 }
 
   return null;
 }
 
index 5b301f0..5f940a6 100644 (file)
@@ -65,7 +65,7 @@ public:
     BufferImage mHorizontalStrip;                                       // Image used to pad upload
     BufferImage mVerticalStrip;                                         // Image used to pad upload
     Material mMaterial;                                                 // material used for atlas texture
     BufferImage mHorizontalStrip;                                       // Image used to pad upload
     BufferImage mVerticalStrip;                                         // Image used to pad upload
     Material mMaterial;                                                 // material used for atlas texture
-    Sampler mSampler;                                                   // sampler used for atlas texture
+    Image mImage;
     SizeType mTotalBlocks;                                              // total number of blocks in atlas
     SizeType mAvailableBlocks;                                          // number of blocks available in atlas
     Dali::Vector< SizeType > mFreeBlocksList;                           // unless there are any previously freed blocks
     SizeType mTotalBlocks;                                              // total number of blocks in atlas
     SizeType mAvailableBlocks;                                          // number of blocks available in atlas
     Dali::Vector< SizeType > mFreeBlocksList;                           // unless there are any previously freed blocks
@@ -177,9 +177,9 @@ public:
   Material GetMaterial( AtlasId atlas ) const;
 
 /**
   Material GetMaterial( AtlasId atlas ) const;
 
 /**
-   * @copydoc Toolkit::AtlasManager::GetSampler
+   * @copydoc Toolkit::AtlasManager::GetImage
    */
    */
-  Sampler GetSampler( AtlasId atlas ) const;
+  Image GetImage( AtlasId atlas ) const;
 
 private:
 
 
 private:
 
index 849b27d..987f1f1 100644 (file)
@@ -130,9 +130,9 @@ Material AtlasManager::GetMaterial( AtlasId atlas ) const
   return GetImplementation(*this).GetMaterial( atlas );
 }
 
   return GetImplementation(*this).GetMaterial( atlas );
 }
 
-Sampler AtlasManager::GetSampler( AtlasId atlas ) const
+Image AtlasManager::GetImage( AtlasId atlas ) const
 {
 {
-  return GetImplementation(*this).GetSampler( atlas );
+  return GetImplementation(*this).GetImage( atlas );
 }
 
 } // namespace Toolkit
 }
 
 } // namespace Toolkit
index 2c7f192..6d41419 100644 (file)
@@ -389,13 +389,13 @@ public:
   Material GetMaterial( AtlasId atlas ) const;
 
  /**
   Material GetMaterial( AtlasId atlas ) const;
 
  /**
-   * @brief Get Sampler used by atlas
+   * @brief Get Image used by atlas
    *
    * @param atlas[in] atlas AtlasId
    *
    * @return Sampler used by atlas
    */
    *
    * @param atlas[in] atlas AtlasId
    *
    * @return Sampler used by atlas
    */
-  Sampler GetSampler( AtlasId atlas ) const;
+  Image GetImage( AtlasId atlas ) const;
 private:
 
   explicit DALI_INTERNAL AtlasManager(Internal::AtlasManager *impl);
 private:
 
   explicit DALI_INTERNAL AtlasManager(Internal::AtlasManager *impl);
index 9fed7cc..aeb1de2 100644 (file)
@@ -132,16 +132,14 @@ void BubbleEmitter::OnInitialize()
   // Prepare the frame buffer to store the color adjusted background image
   mEffectImage = FrameBufferImage::New( mMovementArea.width/4.f, mMovementArea.height/4.f, Pixel::RGBA8888, Dali::Image::UNUSED );
 
   // Prepare the frame buffer to store the color adjusted background image
   mEffectImage = FrameBufferImage::New( mMovementArea.width/4.f, mMovementArea.height/4.f, Pixel::RGBA8888, Dali::Image::UNUSED );
 
-  // Generate the samplers and geometry, which is used by all bubbleActors
-  mSamplerBackground = Sampler::New( mEffectImage, "sBackground" );
-  mSamplerBubbleShape = Sampler::New( mShapeImage, "sBubbleShape" );
+  // Generate the geometry, which is used by all bubbleActors
   mMeshGeometry =  CreateGeometry( mNumBubblePerActor*mDensity );
 
   Shader bubbleShader = CreateBubbleShader (mNumBubblePerActor );
 
   mMaterial = Material::New( bubbleShader );
   mMeshGeometry =  CreateGeometry( mNumBubblePerActor*mDensity );
 
   Shader bubbleShader = CreateBubbleShader (mNumBubblePerActor );
 
   mMaterial = Material::New( bubbleShader );
-  mMaterial.AddSampler( mSamplerBackground );
-  mMaterial.AddSampler( mSamplerBubbleShape );
+  mMaterial.AddTexture( mEffectImage, "sBackground" );
+  mMaterial.AddTexture( mShapeImage,  "sBubbleShape" );
 
   mBubbleActors.resize( mNumActor );
 
 
   mBubbleActors.resize( mNumActor );
 
@@ -195,7 +193,7 @@ void BubbleEmitter::SetBackground( Image bgImage, const Vector3& hsvDelta )
 
 void BubbleEmitter::SetShapeImage( Image shapeImage )
 {
 
 void BubbleEmitter::SetShapeImage( Image shapeImage )
 {
-  mSamplerBubbleShape.SetImage( shapeImage );
+  mMaterial.SetTextureImage( 1, shapeImage );
 }
 
 void BubbleEmitter::SetBubbleScale( float scale )
 }
 
 void BubbleEmitter::SetBubbleScale( float scale )
index 40b4b74..08185a0 100644 (file)
@@ -163,8 +163,6 @@ private:
   FrameBufferImage            mEffectImage;         ///< The image stores the adjusted color of the background image.The bubbles pick color from this image.
   CameraActor                 mCameraActor;         ///< The render task views the scene from the perspective of this actor.
 
   FrameBufferImage            mEffectImage;         ///< The image stores the adjusted color of the background image.The bubbles pick color from this image.
   CameraActor                 mCameraActor;         ///< The render task views the scene from the perspective of this actor.
 
-  Sampler                     mSamplerBackground;    ///< The sampler which provides the background image to material
-  Sampler                     mSamplerBubbleShape;   ///< The sampler which provides the bubble shape image to material
   Geometry                    mMeshGeometry;         ///< The mesh geometry which contains the vertices and indices data
   Material                    mMaterial;             ///< The material which controls the bubble display
   std::vector<BubbleActorPtr> mBubbleActors;         ///< The meshActor vector, its size is mNumShader.
   Geometry                    mMeshGeometry;         ///< The mesh geometry which contains the vertices and indices data
   Material                    mMaterial;             ///< The material which controls the bubble display
   std::vector<BubbleActorPtr> mBubbleActors;         ///< The meshActor vector, its size is mNumShader.
index 84780be..b44f4a1 100644 (file)
@@ -627,11 +627,8 @@ void Model3dView::LoadTextures()
     Image tex0 = ResourceImage::New( imgUrl );
     if( tex0 )
     {
     Image tex0 = ResourceImage::New( imgUrl );
     if( tex0 )
     {
-      Sampler sampler = Sampler::New( tex0, "sDiffuse" );
-      sampler.SetWrapMode(Sampler::REPEAT,Sampler::REPEAT);
-      sampler.SetAffectsTransparency(false);
-
-      mMaterial.AddSampler( sampler );
+      size_t index = mMaterial.AddTexture( tex0, "sDiffuse" );
+      mMaterial.SetTextureAffectsTransparency(index, false );
     }
   }
 
     }
   }
 
@@ -643,12 +640,8 @@ void Model3dView::LoadTextures()
     Image tex1 = ResourceImage::New( imgUrl );
     if (tex1)
     {
     Image tex1 = ResourceImage::New( imgUrl );
     if (tex1)
     {
-      Sampler sampler = Sampler::New( tex1, "sNormal" );
-      sampler.SetWrapMode(Sampler::REPEAT,Sampler::REPEAT);
-      sampler.SetAffectsTransparency(false);
-      sampler.SetFilterMode(Sampler::LINEAR,Sampler::LINEAR);
-
-      mMaterial.AddSampler( sampler );
+      size_t index = mMaterial.AddTexture( tex1, "sNormal" );
+      mMaterial.SetTextureAffectsTransparency(index, false );
     }
   }
 
     }
   }
 
@@ -660,12 +653,8 @@ void Model3dView::LoadTextures()
     Image tex2 = ResourceImage::New( imgUrl );
     if( tex2 )
     {
     Image tex2 = ResourceImage::New( imgUrl );
     if( tex2 )
     {
-      Sampler sampler = Sampler::New( tex2, "sGloss" );
-      sampler.SetWrapMode(Sampler::REPEAT,Sampler::REPEAT);
-      sampler.SetAffectsTransparency(false);
-      sampler.SetFilterMode(Sampler::LINEAR,Sampler::LINEAR);
-
-      mMaterial.AddSampler( sampler );
+      size_t index = mMaterial.AddTexture( tex2, "sGloss" );
+      mMaterial.SetTextureAffectsTransparency(index, false );
     }
   }
 }
     }
   }
 }
index 30a587f..6dc25ca 100644 (file)
@@ -155,22 +155,22 @@ DALI_COMPOSE_SHADER(
 )
 };
 
 )
 };
 
-Sampler::WrapMode GetWrapMode( Gradient::SpreadMethod spread )
+Dali::WrapMode::Type GetWrapMode( Gradient::SpreadMethod spread )
 {
   switch(spread)
   {
     case Gradient::REPEAT:
     {
 {
   switch(spread)
   {
     case Gradient::REPEAT:
     {
-      return Sampler::REPEAT;
+      return Dali::WrapMode::REPEAT;
     }
     case Gradient::REFLECT:
     {
     }
     case Gradient::REFLECT:
     {
-      return Sampler::MIRRORED_REPEAT;
+      return Dali::WrapMode::MIRRORED_REPEAT;
     }
     case Gradient::PAD:
     default:
     {
     }
     case Gradient::PAD:
     default:
     {
-      return Sampler::CLAMP_TO_EDGE;
+      return Dali::WrapMode::CLAMP_TO_EDGE;
     }
   }
 }
     }
   }
 }
@@ -324,11 +324,11 @@ void GradientRenderer::InitializeRenderer( Dali::Renderer& renderer )
   }
 
   Dali::BufferImage lookupTexture = mGradient->GenerateLookupTexture();
   }
 
   Dali::BufferImage lookupTexture = mGradient->GenerateLookupTexture();
-  Sampler sampler = Sampler::New( lookupTexture, UNIFORM_TEXTULRE_NAME );
-  Sampler::WrapMode wrap = GetWrapMode( mGradient->GetSpreadMethod() );
+  Sampler sampler = Sampler::New();
+  Dali::WrapMode::Type wrap = GetWrapMode( mGradient->GetSpreadMethod() );
   sampler.SetWrapMode(  wrap, wrap  );
 
   sampler.SetWrapMode(  wrap, wrap  );
 
-  material.AddSampler( sampler );
+  material.AddTexture( lookupTexture, UNIFORM_TEXTULRE_NAME, sampler );
 
   renderer.RegisterProperty( UNIFORM_ALIGNMENT_MATRIX_NAME, mGradientTransform );
 }
 
   renderer.RegisterProperty( UNIFORM_ALIGNMENT_MATRIX_NAME, mGradientTransform );
 }
index b595a48..0fad543 100644 (file)
@@ -568,18 +568,14 @@ void ImageRenderer::ApplyImageToSampler()
     Material material = mImpl->mRenderer.GetMaterial();
     if( material )
     {
     Material material = mImpl->mRenderer.GetMaterial();
     if( material )
     {
-      for( std::size_t i = 0; i < material.GetNumberOfSamplers(); ++i )
+      int index = material.GetTextureIndex(TEXTURE_UNIFORM_NAME);
+      if( index != -1 )
       {
       {
-        Sampler sampler = material.GetSamplerAt( i );
-        if( sampler.GetUniformName() == TEXTURE_UNIFORM_NAME )
-        {
-          sampler.SetImage( mImage );
-          return;
-        }
+        material.SetTextureImage( index, mImage );
+        return;
       }
 
       }
 
-      Sampler sampler = Sampler::New( mImage, TEXTURE_UNIFORM_NAME );
-      material.AddSampler( sampler );
+      material.AddTexture( mImage,TEXTURE_UNIFORM_NAME );
     }
   }
 }
     }
   }
 }
index cd23466..10f851f 100644 (file)
@@ -172,7 +172,7 @@ void AddVertex( Vector< Vector2 >& vertices, unsigned int x, unsigned int y )
   vertices.PushBack( Vector2( x, y ) );
 }
 
   vertices.PushBack( Vector2( x, y ) );
 }
 
-void RegisterStretchProperties( Sampler& sampler, const char * uniformName, const NinePatchImage::StretchRanges& stretchPixels, uint16_t imageExtent)
+void RegisterStretchProperties( Material& material, const char * uniformName, const NinePatchImage::StretchRanges& stretchPixels, uint16_t imageExtent)
 {
   uint16_t prevEnd = 0;
   uint16_t prevFix = 0;
 {
   uint16_t prevEnd = 0;
   uint16_t prevFix = 0;
@@ -188,7 +188,7 @@ void RegisterStretchProperties( Sampler& sampler, const char * uniformName, cons
 
     std::stringstream uniform;
     uniform << uniformName << "[" << i << "]";
 
     std::stringstream uniform;
     uniform << uniformName << "[" << i << "]";
-    sampler.RegisterProperty( uniform.str(), Vector2( fix, stretch ) );
+    material.RegisterProperty( uniform.str(), Vector2( fix, stretch ) );
 
     prevEnd = end;
     prevFix = fix;
 
     prevEnd = end;
     prevFix = fix;
@@ -199,7 +199,7 @@ void RegisterStretchProperties( Sampler& sampler, const char * uniformName, cons
     prevFix += imageExtent - prevEnd;
     std::stringstream uniform;
     uniform << uniformName << "[" << i << "]";
     prevFix += imageExtent - prevEnd;
     std::stringstream uniform;
     uniform << uniformName << "[" << i << "]";
-    sampler.RegisterProperty( uniform.str(), Vector2( prevFix, prevStretch ) );
+    material.RegisterProperty( uniform.str(), Vector2( prevFix, prevStretch ) );
   }
 }
 
   }
 }
 
@@ -462,20 +462,14 @@ void NPatchRenderer::ApplyImageToSampler()
   Material material = mImpl->mRenderer.GetMaterial();
   if( material )
   {
   Material material = mImpl->mRenderer.GetMaterial();
   if( material )
   {
-    Sampler sampler;
-    for( std::size_t i = 0; i < material.GetNumberOfSamplers(); ++i )
+    int index = material.GetTextureIndex( TEXTURE_UNIFORM_NAME );
+    if( index > -1 )
     {
     {
-      sampler = material.GetSamplerAt( i );
-      if( sampler.GetUniformName() == TEXTURE_UNIFORM_NAME )
-      {
-        sampler.SetImage( mCroppedImage );
-        break;
-      }
+      material.SetTextureImage( index, mCroppedImage );
     }
     }
-    if( !sampler )
+    else
     {
     {
-      sampler = Sampler::New( mCroppedImage, TEXTURE_UNIFORM_NAME );
-      material.AddSampler( sampler );
+      material.AddTexture(  mCroppedImage, TEXTURE_UNIFORM_NAME );
     }
 
     if( mStretchPixelsX.Size() == 1 && mStretchPixelsY.Size() == 1 )
     }
 
     if( mStretchPixelsX.Size() == 1 && mStretchPixelsY.Size() == 1 )
@@ -487,18 +481,18 @@ void NPatchRenderer::ApplyImageToSampler()
       uint16_t stretchWidth = stretchX.GetY() - stretchX.GetX();
       uint16_t stretchHeight = stretchY.GetY() - stretchY.GetX();
 
       uint16_t stretchWidth = stretchX.GetY() - stretchX.GetX();
       uint16_t stretchHeight = stretchY.GetY() - stretchY.GetX();
 
-      sampler.RegisterProperty( "uFixed[0]", Vector2::ZERO );
-      sampler.RegisterProperty( "uFixed[1]", Vector2( stretchX.GetX(), stretchY.GetX()) );
-      sampler.RegisterProperty( "uFixed[2]", Vector2( mImageSize.GetWidth() - stretchWidth, mImageSize.GetHeight() - stretchHeight ) );
-      sampler.RegisterProperty( "uStretchTotal", Vector2( stretchWidth, stretchHeight ) );
+      material.RegisterProperty( "uFixed[0]", Vector2::ZERO );
+      material.RegisterProperty( "uFixed[1]", Vector2( stretchX.GetX(), stretchY.GetX()) );
+      material.RegisterProperty( "uFixed[2]", Vector2( mImageSize.GetWidth() - stretchWidth, mImageSize.GetHeight() - stretchHeight ) );
+      material.RegisterProperty( "uStretchTotal", Vector2( stretchWidth, stretchHeight ) );
     }
     else
     {
     }
     else
     {
-      sampler.RegisterProperty( "uNinePatchFactorsX[0]", Vector2::ZERO );
-      sampler.RegisterProperty( "uNinePatchFactorsY[0]", Vector2::ZERO );
+      material.RegisterProperty( "uNinePatchFactorsX[0]", Vector2::ZERO );
+      material.RegisterProperty( "uNinePatchFactorsY[0]", Vector2::ZERO );
 
 
-      RegisterStretchProperties( sampler, "uNinePatchFactorsX", mStretchPixelsX, mImageSize.GetWidth() );
-      RegisterStretchProperties( sampler, "uNinePatchFactorsY", mStretchPixelsY, mImageSize.GetHeight() );
+      RegisterStretchProperties( material, "uNinePatchFactorsX", mStretchPixelsX, mImageSize.GetWidth() );
+      RegisterStretchProperties( material, "uNinePatchFactorsY", mStretchPixelsY, mImageSize.GetHeight() );
     }
   }
 }
     }
   }
 }
index 3841229..92c5b42 100644 (file)
@@ -263,9 +263,9 @@ Material AtlasGlyphManager::GetMaterial( uint32_t atlasId ) const
   return mAtlasManager.GetMaterial( atlasId );
 }
 
   return mAtlasManager.GetMaterial( atlasId );
 }
 
-Sampler AtlasGlyphManager::GetSampler( uint32_t atlasId ) const
+Image AtlasGlyphManager::GetImage( uint32_t atlasId ) const
 {
 {
-  return mAtlasManager.GetSampler( atlasId );
+  return mAtlasManager.GetImage( atlasId );
 }
 
 AtlasGlyphManager::~AtlasGlyphManager()
 }
 
 AtlasGlyphManager::~AtlasGlyphManager()
index 5ba6740..da659bc 100644 (file)
@@ -121,7 +121,7 @@ public:
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetMaterial
    */
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetMaterial
    */
-  Sampler GetSampler( uint32_t atlasId ) const;
+  Image GetImage( uint32_t atlasId ) const;
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetMetrics
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetMetrics
index 463a3e8..39ce202 100644 (file)
@@ -117,9 +117,9 @@ Material AtlasGlyphManager::GetMaterial( uint32_t atlasId ) const
   return GetImplementation(*this).GetMaterial( atlasId );
 }
 
   return GetImplementation(*this).GetMaterial( atlasId );
 }
 
-Sampler AtlasGlyphManager::GetSampler( uint32_t atlasId ) const
+Image AtlasGlyphManager::GetImage( uint32_t atlasId ) const
 {
 {
-  return GetImplementation(*this).GetSampler( atlasId );
+  return GetImplementation(*this).GetImage( atlasId );
 }
 
 const Toolkit::AtlasGlyphManager::Metrics& AtlasGlyphManager::GetMetrics()
 }
 
 const Toolkit::AtlasGlyphManager::Metrics& AtlasGlyphManager::GetMetrics()
index a74ce28..2deba24 100644 (file)
@@ -164,7 +164,7 @@ public:
    *
    * @return The sampler used by the atlas
    */
    *
    * @return The sampler used by the atlas
    */
-  Sampler GetSampler( uint32_t atlasId ) const;
+  Image GetImage( uint32_t atlasId ) const;
 
   /**
    * @brief Get Glyph Manager metrics
 
   /**
    * @brief Get Glyph Manager metrics
index 7c629fd..80459a8 100644 (file)
@@ -718,9 +718,8 @@ struct AtlasRenderer::Impl : public ConnectionTracker
     quadGeometry.AddVertexBuffer( quadVertices );
     quadGeometry.SetIndexBuffer( quadIndices );
 
     quadGeometry.AddVertexBuffer( quadVertices );
     quadGeometry.SetIndexBuffer( quadIndices );
 
-    Sampler sampler = Sampler::New( meshRecord.mBuffer, "sTexture" );
     Material material = Material::New( mGlyphManager.GetEffectBufferShader() );
     Material material = Material::New( mGlyphManager.GetEffectBufferShader() );
-    material.AddSampler( sampler );
+    material.AddTexture(meshRecord.mBuffer, "sTexture");
 
     Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
 
 
     Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
 
@@ -751,8 +750,8 @@ struct AtlasRenderer::Impl : public ConnectionTracker
     normGeometry.SetIndexBuffer( normIndices );
 
     Material normMaterial = Material::New( mGlyphManager.GetGlyphShadowShader() );
     normGeometry.SetIndexBuffer( normIndices );
 
     Material normMaterial = Material::New( mGlyphManager.GetGlyphShadowShader() );
-    Sampler normSampler =  mGlyphManager.GetSampler( meshRecord.mAtlasId );
-    normMaterial.AddSampler( normSampler );
+    Image normImage =  mGlyphManager.GetImage( meshRecord.mAtlasId );
+    normMaterial.AddTexture( normImage, "sTexture" );
     Dali::Renderer normRenderer = Dali::Renderer::New( normGeometry, normMaterial );
     Actor subActor = Actor::New();
     subActor.AddRenderer( normRenderer );
     Dali::Renderer normRenderer = Dali::Renderer::New( normGeometry, normMaterial );
     Actor subActor = Actor::New();
     subActor.AddRenderer( normRenderer );