void SetCameraNode( Node* node );
/**
- * Retrieve the camera node.
- * @return The scene is viewed from the perspective of this node.
- */
- Node* GetCameraNode() const;
-
- /**
* Set the frame-buffer used as a render target.
* @param[in] resourceId The resource ID of the frame-buffer, or zero if not rendering off-screen.
*/
bool GetClearEnabled() const;
/**
+ * @copydoc Dali::RenderTask::SetCullMode()
+ */
+ void SetCullMode( bool mode );
+
+ /**
+ * @copydoc Dali::RenderTask::GetCullMode()
+ */
+ bool GetCullMode() const;
+
+ /**
* Set the refresh-rate of the RenderTask.
* @param[in] refreshRate The new refresh rate.
*/
bool IsRenderRequired();
/**
+ * Set whether all resources were available when the render-task was processed
+ * @param[in] resourcesComplete True if the resources of the source tree are completely loaded.
+ */
+ void SetResourcesFinished( bool resourcesFinished );
+
+ /**
* Process a frame. This method is called each frame for every ready render task, regardless
* of whether it needs to render (so that the frame counter can be updated).
- * @param[in] resourcesComplete true if the resources of the source tree are completely loaded.
*/
- void UpdateState( bool resourcesComplete );
+ void UpdateState();
/**
* Return true only if currently waiting for the render task to
*/
void SetCompleteStatusManager( CompleteStatusManager* completeStatusManager );
+ /**
+ * @return A pointer to the camera used by the RenderTask
+ */
+ Node* GetCamera() const;
+
private:
/**
CameraAttachment* mCameraAttachment;
unsigned int mFrameBufferResourceId;
+ bool mResourcesFinished:1; ///< True if all resources were available when the render-task was processed
bool mWaitingToRender:1; ///< True when an render once to FBO is waiting
bool mNotifyTrigger:1; ///< True if a render once render task has finished renderering
bool mExclusive: 1; ///< Whether the render task has exclusive access to the source actor (node in the scene graph implementation).
bool mClearEnabled: 1; ///< Whether previous results are cleared.
+ bool mCullMode: 1; ///< Whether renderers should be frustum culled
FrameBufferTexture* mRenderTarget;
Viewport mViewport;
new (slot) LocalType( &task, &RenderTask::SetClearEnabled, enabled );
}
+inline void SetCullModeMessage( EventToUpdate& eventToUpdate, RenderTask& task, bool mode )
+{
+ typedef MessageValue1< RenderTask, bool > LocalType;
+
+ // Reserve some memory inside the message queue
+ unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+
+ // Construct message in the message queue memory; note that delete should not be called on the return value
+ new (slot) LocalType( &task, &RenderTask::SetCullMode, mode );
+}
+
inline void SetRefreshRateMessage( EventToUpdate& eventToUpdate, RenderTask& task, unsigned int refreshRate )
{
typedef MessageValue1< RenderTask, unsigned int > LocalType;