#define DALI_RENDERER_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Dali
{
+class RenderCallback;
+
/**
* @addtogroup dali_core_rendering_effects
* @{
*/
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
+ USE_ACTOR_OPACITY ///< Blending is enabled when the actor is not opaque @SINCE_2_2.7
};
} // namespace BlendMode
static Renderer New(Geometry& geometry, Shader& shader);
/**
+ * @brief Creates a new Renderer object with RenderCallback.
+ *
+ * @SINCE_2_1.18
+ * @param[in] renderCallback Valid RenderCallback
+ * @return A handle to the Renderer
+ */
+ static Renderer New(RenderCallback& renderCallback);
+
+ /**
* @brief Default constructor, creates an empty handle
*
* @SINCE_1_1.43
* @SINCE_1_9.22
* @param[in] rhs A reference to the moved handle
*/
- Renderer(Renderer&& rhs);
+ Renderer(Renderer&& rhs) noexcept;
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Renderer& operator=(Renderer&& rhs);
+ Renderer& operator=(Renderer&& rhs) noexcept;
/**
* @brief Sets the geometry to be used by this renderer.
*/
Shader GetShader() const;
+ /**
+ * @brief Sets RenderCallback to be used for native rendering
+ *
+ * @SINCE_2_1.15
+ * @param[in] callback Pointer to a valid RenderCallback object
+ */
+ void SetRenderCallback(RenderCallback* callback);
+
public:
+ /// @cond internal
/**
* @brief The constructor.
* @note Not intended for application developers.
* @param[in] pointer A pointer to a newly allocated Renderer
*/
explicit DALI_INTERNAL Renderer(Internal::Renderer* pointer);
+ /// @endcond
};
/**