// INTERNAL INCLUDES
#include <dali/public-api/math/viewport.h>
-#include <dali/public-api/object/constrainable.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/object/handle.h>
+#include <dali/public-api/signals/dali-signal.h>
-namespace Dali DALI_IMPORT_API
+namespace Dali
{
class Actor;
* typically this is a window provided by the native system.
*
* By default Dali provides a single RenderTask, which renders the entire actor hierachy using
- * a default camera actor and GL surface.
+ * a default camera actor and GL surface. If stereoscopic rendering is enabled, Dali will create
+ * two additional render tasks, on for each eye. Each render task will have its own camera parented
+ * to the default camera actor.
*
* The first RenderTask used for input handling will be the last one rendered, which also has input enabled,
* and has a valid source & camera actor; see SetInputEnabled().
* If the refresh rate id REFRESH_ONCE and a "Finish" signal is connected, it will be emitted when the RenderTask is completed.
* Note that all connected signals must be disconnected before the object is destroyed. This is typically done in the
* object destructor, and requires either the Dali::Connection object or Dali::RenderTask handle to be stored.
+ *
+ * Signals
+ * | %Signal Name | Method |
+ * |--------------|-----------------------|
+ * | finished | @ref FinishedSignal() |
*/
-class RenderTask : public Constrainable
+class DALI_IMPORT_API RenderTask : public Handle
{
public:
/**
* @brief Typedef for signals sent by this class.
*/
- typedef SignalV2< void (RenderTask& source) > RenderTaskSignalV2;
+ typedef Signal< void (RenderTask& source) > RenderTaskSignalType;
// Default Properties
static const Property::Index VIEWPORT_POSITION; ///< Property 0, name "viewport-position", type VECTOR2
static const Property::Index VIEWPORT_SIZE; ///< Property 1, name "viewport-size", type VECTOR2
static const Property::Index CLEAR_COLOR; ///< Property 2, name "clear-color", type VECTOR4
- //Signal Names
- static const char* const SIGNAL_FINISHED; ///< Name for Finished signal
-
/**
* @brief A pointer to a function for converting screen to frame-buffer coordinates.
* @param[in,out] coordinates The screen coordinates to convert where (0,0) is the top-left of the screen.
RenderTask& operator=(const RenderTask& rhs);
/**
- * @brief This method is defined to allow assignment of the NULL value,
- * and will throw an exception if passed any other value.
- *
- * Assigning to NULL is an alias for Reset().
- * @param [in] rhs A NULL pointer
- * @return A reference to this handle
- */
- RenderTask& operator=(BaseHandle::NullType* rhs);
-
- /**
* @brief Set the actors to be rendered.
* @param[in] actor This actor and its children will be rendered.
* If actor is an empty handle, then nothing will be rendered.
/**
* @brief Set the refresh-rate of the RenderTask.
*
- * The default is REFRESH_ALWAYS (1), meaning that the RenderTask will be processed every frame.
- * It may be desirable to process less frequently e.g. SetRefreshRate(3) will process once every 3 frames.
- * The REFRESH_ONCE value means that the RenderTask will be processed once only, to take a snap-shot of the scene.
- * Repeatedly calling SetRefreshRate(REFRESH_ONCE) will cause more snap-shots to be taken.
+ * The default is REFRESH_ALWAYS (1), meaning that the RenderTask
+ * will be processed every frame if the scene graph is changing. It
+ * may be desirable to process less frequently. For example,
+ * SetRefreshRate(3) will process once every 3 frames if the scene
+ * graph is changing. If the scene graph is not changing, then the
+ * render task will not be rendered, regardless of this value.
+ *
+ * The REFRESH_ONCE value means that the RenderTask will be
+ * processed once only, to take a snap-shot of the scene.
+ * Repeatedly calling SetRefreshRate(REFRESH_ONCE) will cause more
+ * snap-shots to be taken.
+ *
* @param[in] refreshRate The new refresh rate.
*/
void SetRefreshRate( unsigned int refreshRate );
/**
* @brief If the refresh rate is REFRESH_ONCE, connect to this signal to be notified when a RenderTask has finished.
*/
- RenderTaskSignalV2& FinishedSignal();
+ RenderTaskSignalType& FinishedSignal();
public: // Not intended for application developers