Merge remote-tracking branch 'origin/tizen' into devel/new_mesh
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-manager.h
index 41553eb..3c86f3a 100644 (file)
  */
 
 // INTERNAL INCLUDES
-#include <dali/internal/common/message.h>
+#include <dali/public-api/math/rect.h>
 #include <dali/internal/render/common/post-process-resource-dispatcher.h>
-#include <dali/internal/render/gl-resources/bitmap-texture.h>
-#include <dali/internal/update/common/double-buffered.h>
 #include <dali/internal/update/resources/resource-manager-declarations.h>
-#include <dali/public-api/math/rect.h>
 
 namespace Dali
 {
@@ -40,17 +37,17 @@ struct Vector4;
 namespace Internal
 {
 class Context;
+class ProgramCache;
 
 namespace SceneGraph
 {
 class Renderer;
 class RenderQueue;
-class DynamicsDebugRenderer;
-class RenderMaterial;
 class TextureCache;
 class RenderInstruction;
 class RenderInstructionContainer;
 class RenderTracker;
+class Shader;
 
 /**
  * RenderManager is responsible for rendering the result of the previous "update", which
@@ -86,13 +83,6 @@ public:
   TextureCache& GetTextureCache();
 
   /**
-   * Retrieves the context. Can only be called inside render thread
-   * TODO remove this when programs are initialized in render thread
-   * @return reference to the context
-   */
-  Context& GetContext();
-
-  /**
    * @copydoc Dali::Integration::Core::ContextCreated()
    */
   void ContextCreated();
@@ -128,14 +118,6 @@ public:
    */
   void SetFrameDeltaTime( float deltaTime );
 
-#ifdef DYNAMICS_SUPPORT
-  /**
-   * create a dynamics debug renderer
-   * @param[in] debugRenderer The dynamics world debug renderer
-   */
-  void InitializeDynamicsDebugRenderer(DynamicsDebugRenderer* debugRenderer);
-#endif
-
   /**
    * Returns the rectangle for the default surface (probably the application window).
    * @return Rectangle for the surface.
@@ -157,23 +139,6 @@ public:
   void RemoveRenderer( Renderer* renderer );
 
   /**
-   * Adds a RenderMaterial to the render manager for MeshRenderers to use.
-   * The RenderManager takes ownership of the material
-   * @param[in] renderMaterial
-   * @post renderMaterial is owned by RenderManager
-   */
-  void AddRenderMaterial( RenderMaterial* renderMaterial );
-
-  /**
-   * Removes a RenderMaterial from the RenderManager
-   * RenderManager will destroy the material
-   * @pre renderManager owns the materail
-   * @param[in] renderMaterial
-   * @post renderMaterial is destroyed
-   */
-  void RemoveRenderMaterial( RenderMaterial* renderMaterial );
-
-  /**
    * Adds a render tracker to the RenderManager. RenderManager takes ownership of the
    * tracker. The lifetime of the tracker is related to the lifetime of the tracked
    * object, usually an offscreen render task.
@@ -187,6 +152,18 @@ public:
    */
   void RemoveRenderTracker( RenderTracker* renderTracker );
 
+  /**
+   * Set the default shader that is to be used in absence of custom shader
+   * @param[in] shader that is the default one
+   */
+  void SetDefaultShader( Shader* shader );
+
+  /**
+   * returns the Program controller for sending program messages
+   * @return the ProgramController
+   */
+  ProgramCache* GetProgramCache();
+
   // This method should be called from Core::Render()
 
   /**
@@ -201,8 +178,10 @@ private:
   /**
    * Helper to process a single RenderInstruction.
    * @param[in] instruction A description of the rendering operation.
+   * @param[in] defaultShader default shader to use.
+   * @param[in] elapsedTime from previous render.
    */
-  void DoRender( RenderInstruction& instruction, float elapsedTime );
+  void DoRender( RenderInstruction& instruction, Shader& defaultShader, float elapsedTime );
 
 private: