From 7f46a327a559bb269e1acf1be475a7c354912df8 Mon Sep 17 00:00:00 2001 From: Ferran Sole Date: Wed, 2 Sep 2015 16:27:14 +0100 Subject: [PATCH] Fix rendering order issues of text-label shadow in 3D layers Shadow was being rendered on top of the text when using a 3D layer. To ensure shadow is rendered behind the text, the depth-index of the shadow must be smaller than the depth index of the text. Change-Id: I702433ceef51a08d57872ba49753a6cfedd24d94 --- dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp index 026b4d6..5af46ef 100644 --- a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp @@ -723,8 +723,8 @@ struct AtlasRenderer::Impl : public ConnectionTracker Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material ); - // Ensure shadow is behind the text... - renderer.SetDepthIndex( CONTENT_DEPTH_INDEX + mDepth ); + // Set depth index to -1.0 to make sure shadow is rendered first in 3D layers + renderer.SetDepthIndex( -1.0f ); Actor actor = Actor::New(); actor.AddRenderer( renderer ); actor.SetParentOrigin( ParentOrigin::CENTER ); // Keep all of the origins aligned -- 2.7.4