Merge remote-tracking branch 'origin/tizen' into devel/new_mesh
[platform/core/uifw/dali-core.git] / dali / internal / render / data-providers / material-data-provider.h
1 #ifndef DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H
2 #define DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H
3 /*
4  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #include <dali/public-api/common/dali-vector.h>
20 #include <dali/public-api/actors/blending.h>
21
22 namespace Dali
23 {
24 namespace Internal
25 {
26 namespace SceneGraph
27 {
28
29 /**
30  * Interface to provide data of the material to the renderer.
31  * This interface must not be used to pass object pointers.
32  */
33 class MaterialDataProvider
34 {
35 public:
36   /**
37    * Construtor
38    */
39   MaterialDataProvider()
40   {
41   }
42
43   virtual const Vector4& GetBlendColor( BufferIndex bufferIndex ) const = 0;
44
45   /**
46    * Get the RGB source factor
47    * @return the RGB source factor
48    */
49   virtual BlendingFactor::Type GetBlendSrcFactorRgb( BufferIndex bufferIndex ) const = 0;
50
51   /**
52    * Get the Alpha source factor
53    * @return the Alpha source factor
54    */
55   virtual BlendingFactor::Type GetBlendSrcFactorAlpha( BufferIndex bufferIndex ) const = 0;
56
57   /**
58    * Get the RGB destination factor
59    * @return the RGB destination factor
60    */
61   virtual BlendingFactor::Type GetBlendDestFactorRgb( BufferIndex bufferIndex ) const = 0;
62
63   /**
64    * Get the Alpha destination factor
65    * @return the Alpha destination factor
66    */
67   virtual BlendingFactor::Type GetBlendDestFactorAlpha( BufferIndex bufferIndex ) const = 0;
68
69   /**
70    * Get the RGB blending equation
71    * @return the RGB blending equation
72    */
73   virtual BlendingEquation::Type GetBlendEquationRgb( BufferIndex bufferIndex ) const = 0;
74
75   /**
76    * Get the Alpha blending equation
77    * @return the Alpha blending equation
78    */
79   virtual BlendingEquation::Type GetBlendEquationAlpha( BufferIndex bufferIndex ) const = 0;
80
81 protected:
82   /**
83    * Destructor. No deletion through this interface
84    */
85   virtual ~MaterialDataProvider()
86   {
87   }
88 };
89
90 } // namespace SceneGraph
91 } // namespace Internal
92 } // namespace Dali
93
94 #endif // DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H