1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/internal/render/data-providers/material-data-provider.h>
22 #include <dali/internal/render/data-providers/node-data-provider.h>
23 #include <dali/internal/render/data-providers/property-buffer-data-provider.h>
24 #include <dali/internal/render/data-providers/uniform-map-data-provider.h>
25 #include <dali/internal/render/renderers/render-texture.h>
36 * Wraps all the data providers for the renderer. This allows the
37 * individual providers to change connections in the update thread without affecting
38 * the current render. It essentially provides double buffering of the
39 * provider accessor through the message system. It does not take ownership
42 * @todo - Add set of bools to state what changed (For improving performance)
44 class RenderDataProvider
47 typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
48 typedef std::vector< Render::Texture > Textures;
52 * The RendererAttachment that creates this object will initialize the members
60 ~RenderDataProvider();
65 * Set the material data provider
66 * @param[in] materialDataProvider The material data provider
68 void SetMaterial( const MaterialDataProvider& materialDataProvider );
71 * Get the material data provider
72 * @return the material data provider
74 const MaterialDataProvider& GetMaterial() const;
77 * Set the uniform map data provider
78 * @param[in] uniformMapDataProvider The uniform map data provider
80 void SetUniformMap(const UniformMapDataProvider& uniformMapDataProvider);
83 * Get the uniform map data provider
85 const UniformMapDataProvider& GetUniformMap() const;
88 * Set the shader data provider
89 * @param[in] shader The shader data provider
91 void SetShader( Shader& shader );
97 Shader& GetShader() const;
100 * Returns the list of textures
101 * @return The list of textures
103 const Textures& GetTextures() const;
106 const MaterialDataProvider* mMaterialDataProvider;
107 const UniformMapDataProvider* mUniformMapDataProvider;
111 // Give Renderer access to our private data to reduce copying vectors on construction.
112 friend class Renderer;
119 #endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__