[3.0] Combine StencilMode and WriteToColorBuffer to RenderMode
[platform/core/uifw/dali-core.git] / dali / public-api / rendering / renderer.h
index 3a7a7fb..2d0d02f 100644 (file)
@@ -20,7 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/object/handle.h>                // Dali::Handle
-#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_OBJECT_PROPERTY_START_INDEX
+#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_RENDERER_PROPERTY_START_INDEX
 #include <dali/public-api/rendering/geometry.h>           // Dali::Geometry
 #include <dali/public-api/rendering/texture-set.h>        // Dali::TextureSet
 
@@ -41,9 +41,9 @@ namespace FaceCullingMode
  */
 enum Type
 {
-  NONE,                ///< None of the faces should be culled               @SINCE_1_1.43
-  FRONT,               ///< Cull front face, back face should never be shown @SINCE_1_1.43
-  BACK,                ///< Cull back face, back face should never be shown  @SINCE_1_1.43
+  NONE,                ///< None of the faces should be culled                 @SINCE_1_1.43
+  FRONT,               ///< Cull front face, front faces should never be shown @SINCE_1_1.43
+  BACK,                ///< Cull back face, back faces should never be shown   @SINCE_1_1.43
   FRONT_AND_BACK,      ///< Cull front and back faces; if the geometry is composed of triangles none of the faces will be shown @SINCE_1_1.43
 };
 
@@ -162,6 +162,24 @@ enum Type
 
 } // namespace DepthFunction
 
+namespace RenderMode
+{
+
+/**
+ * @brief Controls how this renderer uses its stencil properties and writes to the color buffer.
+ * @SINCE_1_2.5
+ */
+enum Type
+{
+  NONE,         ///< Don’t write to either color or stencil buffer (But will potentially render to depth buffer). @SINCE_1_2.5
+  AUTO,         ///< Managed by the Actor Clipping API. This is the default.                                      @SINCE_1_2.5
+  COLOR,        ///< Ingore stencil properties.  Write to the color buffer.                                       @SINCE_1_2.5
+  STENCIL,      ///< Use the stencil properties. Do not write to the color buffer.                                @SINCE_1_2.5
+  COLOR_STENCIL ///< Use the stencil properties AND Write to the color buffer.                                    @SINCE_1_2.5
+};
+
+} // namespace RenderMode
+
 namespace StencilFunction
 {
 
@@ -183,22 +201,6 @@ enum Type
 
 } // namespace StencilFunction
 
-namespace StencilMode
-{
-
-/**
- * @brief How the stencil buffer will be managed.
- * @SINCE_1_1.43
- */
-enum Type
-{
-  OFF,       ///< Off for this renderer                                  @SINCE_1_1.43
-  AUTO,      ///< Managed by the Actor clipping API. This is the default @SINCE_1_1.43
-  ON         ///< On for this renderer. Select this to use the Renderer stencil properties to manage behavior. Note that Actor clipping management is bypassed for this renderer @SINCE_1_1.43
-};
-
-} // namespace StencilMode
-
 namespace StencilOperation
 {
 
@@ -242,7 +244,7 @@ public:
        * @note The default value is 0
        * @SINCE_1_1.43
        */
-      DEPTH_INDEX = DEFAULT_OBJECT_PROPERTY_START_INDEX,
+      DEPTH_INDEX = DEFAULT_RENDERER_PROPERTY_START_INDEX,
 
       /**
        * @brief name "faceCullingMode", type INTEGER
@@ -353,6 +355,14 @@ public:
       DEPTH_TEST_MODE,
 
       /**
+       * @brief name "renderMode", type INTEGER
+       * @see RenderMode
+       * @note The default value is RenderMode::AUTO
+       * @SINCE_1_2.5
+       */
+      RENDER_MODE,
+
+      /**
        * @brief name "stencilFunction", type INTEGER
        * @see StencilFunction
        * @note The default value is StencilFunction::ALWAYS
@@ -382,14 +392,6 @@ public:
       STENCIL_MASK,
 
       /**
-       * @brief name "stencilMode", type INTEGER
-       * @see StencilMode
-       * @note The default value is StencilMode::AUTO
-       * @SINCE_1_1.43
-       */
-      STENCIL_MODE,
-
-      /**
        * @brief name "stencilOperationOnFail", type INTEGER
        * @see StencilOperation
        * @note The default value is StencilOperation::KEEP
@@ -412,15 +414,6 @@ public:
        * @SINCE_1_1.43
        */
       STENCIL_OPERATION_ON_Z_PASS,
-
-      /**
-       * @brief name "writeToColorBuffer", type BOOLEAN
-       * This allows per-renderer control of writing to the color buffer.
-       * For example: This can be turned off to write to the stencil or depth buffers only.
-       * @note The default value is True
-       * @SINCE_1_1.43
-       */
-      WRITE_TO_COLOR_BUFFER
     };
   };