From: Ferran Sole Date: Wed, 2 Sep 2015 15:27:14 +0000 (+0100) Subject: Fix rendering order issues of text-label shadow in 3D layers X-Git-Tag: dali_1.1.2~10 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=7f46a327a559bb269e1acf1be475a7c354912df8;hp=2c12e6ecebf7e4254ab033b1d0de64158eb5aead 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 --- 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