const StringEnum DRAW_MODE_VALUES[] =
{
{ "NORMAL", DrawMode::NORMAL },
- { "OVERLAY", DrawMode::OVERLAY },
+ { "OVERLAY_2D", DrawMode::OVERLAY_2D },
{ "STENCIL", DrawMode::STENCIL },
};
const unsigned int DRAW_MODE_VALUES_COUNT = sizeof( DRAW_MODE_VALUES ) / sizeof( DRAW_MODE_VALUES[0] );
DALI_TEST_CHECK( DrawMode::NORMAL == a.GetDrawMode() ); // Ensure overlay is off by default
- a.SetDrawMode( DrawMode::OVERLAY );
+ a.SetDrawMode( DrawMode::OVERLAY_2D );
app.SendNotification();
app.Render(1);
- DALI_TEST_CHECK( DrawMode::OVERLAY == a.GetDrawMode() ); // Check Actor is overlay
+ DALI_TEST_CHECK( DrawMode::OVERLAY_2D == a.GetDrawMode() ); // Check Actor is overlay
a.SetDrawMode( DrawMode::STENCIL );
app.SendNotification();
// b (9)
// c (10)
// a (8)
- a.SetDrawMode( DrawMode::OVERLAY );
+ a.SetDrawMode( DrawMode::OVERLAY_2D );
app.GetGlAbstraction().ClearBoundTextures();
app.SendNotification();
tet_infoline(" UtcDaliActorSetGetOverlay");
Actor parent = Actor::New();
- parent.SetDrawMode(DrawMode::OVERLAY );
- DALI_TEST_CHECK( parent.GetDrawMode() == DrawMode::OVERLAY );
+ parent.SetDrawMode(DrawMode::OVERLAY_2D );
+ DALI_TEST_CHECK( parent.GetDrawMode() == DrawMode::OVERLAY_2D );
END_TEST;
}
const StringEnum DRAW_MODE_TABLE[] =
{
{ "NORMAL", DrawMode::NORMAL },
- { "OVERLAY", DrawMode::OVERLAY },
+ { "OVERLAY_2D", DrawMode::OVERLAY_2D },
{ "STENCIL", DrawMode::STENCIL },
};
const unsigned int DRAW_MODE_TABLE_COUNT = sizeof( DRAW_MODE_TABLE ) / sizeof( DRAW_MODE_TABLE[0] );
void Actor::SetOverlay( bool enable )
{
- // Setting STENCIL will override OVERLAY
+ // Setting STENCIL will override OVERLAY_2D
if( DrawMode::STENCIL != mDrawMode )
{
- SetDrawMode( enable ? DrawMode::OVERLAY : DrawMode::NORMAL );
+ SetDrawMode( enable ? DrawMode::OVERLAY_2D : DrawMode::NORMAL );
}
}
bool Actor::IsOverlay() const
{
- return ( DrawMode::OVERLAY == mDrawMode );
+ return ( DrawMode::OVERLAY_2D == mDrawMode );
}
void Actor::SetDrawMode( DrawMode::Type drawMode )
{
layer->stencilRenderables.push_back( renderable );
}
- else if( DrawMode::OVERLAY == inheritedDrawMode )
+ else if( DrawMode::OVERLAY_2D == inheritedDrawMode )
{
layer->overlayRenderables.push_back( renderable );
}
// It is important that the modified version of these flags are used by the RenderableAttachment.
UpdateNodeTransformValues( node, nodeDirtyFlags, updateBufferIndex );
- // Setting STENCIL will override OVERLAY, if that would otherwise have been inherited.
+ // Setting STENCIL will override OVERLAY_2D, if that would otherwise have been inherited.
inheritedDrawMode |= node.GetDrawMode();
if ( node.HasAttachment() )
* By default a renderable actor will be drawn as a 3D object. It will be depth-tested against
* other objects in the world i.e. it may be obscured if other objects are in front.
*
- * If DrawMode::OVERLAY is used, the actor and its children will be drawn as a 2D overlay.
+ * If DrawMode::OVERLAY_2D is used, the actor and its children will be drawn as a 2D overlay.
* Overlay actors are drawn in a separate pass, after all non-overlay actors within the Layer.
- * For overlay actors, the drawing order is determined by the hierachy (depth-first search order),
+ * For overlay actors, the drawing order is with respect to depth-index property of Renderers,
* and depth-testing will not be used.
*
* If DrawMode::STENCIL is used, the actor and its children will be used to stencil-test other actors
* actors within the Layer.
*
* @param[in] drawMode The new draw-mode to use.
- * @note Setting STENCIL will override OVERLAY, if that would otherwise have been inherited.
+ * @note Setting STENCIL will override OVERLAY_2D, if that would otherwise have been inherited.
* @note Layers do not inherit the DrawMode from their parents.
*/
void SetDrawMode( DrawMode::Type drawMode );
*/
enum Type
{
- NORMAL = 0, ///< binary 00. The default draw-mode
- OVERLAY = 1, ///< binary 01. Draw the actor and its children as an overlay
- STENCIL = 3 ///< binary 11. Draw the actor and its children into the stencil buffer
+ NORMAL = 0, ///< binary 00. The default draw-mode
+ OVERLAY_2D = 1, ///< binary 01. Draw the actor and its children as an overlay
+ STENCIL = 3 ///< binary 11. Draw the actor and its children into the stencil buffer
};
} // namespace DrawMode