7 RenderTasks describe how the Dali scene should be rendered.
9 The {{#crossLink "Stage/getRenderTaskList:method"}}{{/crossLink}} method provides access to an ordered list of render-tasks.
11 Each RenderTask must specify the source actors to be rendered, and a camera actor from
12 which the scene is viewed.
15 RenderTasks may optionally target a frame-buffer, otherwise the default GL surface is used;
16 typically this is a window provided by the native system.
19 By default Dali provides a single RenderTask, which renders the entire actor hierachy using
20 a default camera actor and GL surface. If stereoscopic rendering is enabled, Dali will create
21 two additional render tasks, on for each eye. Each render task will have its own camera parented
22 to the default camera actor.
24 The first RenderTask used for input handling will be the last one rendered, which also has input enabled,
25 and has a valid source & camera actor; see {{#crossLink "RenderTask/setInputEnabled:method"}}{{/crossLink}}.
27 If none of the actors are hit in the last RenderTask rendered, then input handling will continue
28 with the second last RenderTask rendered, and so on.
30 All RenderTasks which target a frame-buffer (i.e. off screen) will be rendered before all RenderTasks
31 which target the default GL surface. This allows the user to render intermediate targets which are used
32 later when targetting the screen.
34 A RenderTask targetting a frame-buffer can still be hit-tested, provided that the
35 screen->frame-buffer coordinate conversion is successful; see SetScreenToFrameBufferMappingActor().
37 var tasklist = dali.stage.getRenderTaskList();
39 var renderTask0 = tasklist.createTask();
41 renderTask0.setSourceActor( myActor );
42 renderTask0.setClearEnabled( true );
43 renderTask0.clearColor = [1.0,0.0,0.0,0.0];
45 renderTask0.clearColor = [1.0,0.0,0.0,0.0];
47 var camera = new dali.CameraActor();
49 renderTask0.setCameraActor( camera );
52 ### Render Task Specific Properties
55 | Name | Type | Writable | Animatable|
56 |------------------------|------------|--------------|-----------|
57 |viewportPosition | VECTOR2 | ✔ | ✘ |
58 |viewportSize | VECTOR2 | ✔ | ✘ |
59 |clearColor | VECTOR4 | ✔ | ✘ |
68 * @property viewportPosition
76 * @property parentOrigin
84 * @property clearColor