DALI_ENUM_TO_STRING_WITH_SCOPE(BlendMode, AUTO)
DALI_ENUM_TO_STRING_WITH_SCOPE(BlendMode, ON)
DALI_ENUM_TO_STRING_WITH_SCOPE(BlendMode, ON_WITHOUT_CULL)
+ DALI_ENUM_TO_STRING_WITH_SCOPE(BlendMode, OFF_ONLY_OPAQUE)
DALI_ENUM_TO_STRING_TABLE_END(BLEND_MODE)
DALI_ENUM_TO_STRING_TABLE_BEGIN(BLEND_EQUATION)
break;
}
+ case BlendMode::OFF_ONLY_OPAQUE: // the renderer should never use blending
+ {
+ // renderer should determine opacity using the actor color
+ float alpha = node.GetWorldColor(updateBufferIndex).a;
+ if(alpha <= FULLY_TRANSPARENT)
+ {
+ opacityType = Renderer::TRANSPARENT;
+ }
+ else if(alpha < FULLY_OPAQUE)
+ {
+ opacityType = Renderer::TRANSLUCENT;
+ }
+ else
+ {
+ opacityType = Renderer::OPAQUE;
+ }
+ break;
+ }
case BlendMode::OFF: // the renderer should never use blending
default:
{
*/
enum Type
{
- OFF, ///< Blending is disabled. @SINCE_1_1.43
- AUTO, ///< Blending is enabled if there is alpha channel. This is the default mode. @SINCE_1_1.43
- ON, ///< Blending is enabled. @SINCE_1_1.43
- ON_WITHOUT_CULL ///< Blending is enabled, and don't cull the renderer @SINCE_2_0.43
+ OFF, ///< Blending is disabled. @SINCE_1_1.43
+ AUTO, ///< Blending is enabled if there is alpha channel. This is the default mode. @SINCE_1_1.43
+ ON, ///< Blending is enabled. @SINCE_1_1.43
+ ON_WITHOUT_CULL, ///< Blending is enabled, and don't cull the renderer @SINCE_2_0.43
+ OFF_ONLY_OPAQUE
};
} // namespace BlendMode