#ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__
#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
// 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
{
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
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();
*/
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.
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.
*/
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()
/**
/**
* 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: