Changed SceneGraph::CompareItems and CompareItems3D to compare the render items based...
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-new-renderer.h
index 82b68b9..995f515 100644 (file)
@@ -79,10 +79,12 @@ public:
    * @param[in] bufferIndex The buffer index
    * @param[out] sortAttributes
    */
-  void SetSortAttributes( SceneGraph::RendererWithSortAttributes& sortAttributes ) const
+  void SetSortAttributes( BufferIndex bufferIndex, SceneGraph::RendererWithSortAttributes& sortAttributes ) const
   {
-    sortAttributes.shader = &(mRenderDataProvider->GetShader());
-    sortAttributes.material = &(mRenderDataProvider->GetMaterial());
+    sortAttributes.shader = &( mRenderDataProvider->GetShader() );
+    const SceneGraph::RenderDataProvider::Samplers& samplers = mRenderDataProvider->GetSamplers();
+
+    sortAttributes.textureResourceId = samplers.Empty() ? Integration::InvalidResourceId : samplers[ 0 ]->GetTextureId( bufferIndex );
     sortAttributes.geometry = mRenderGeometry;
   }