Merge remote-tracking branch 'origin/tizen' into devel/new_mesh
[platform/core/uifw/dali-core.git] / dali / internal / render / data-providers / sampler-data-provider.h
1 #ifndef DALI_INTERNAL_SCENE_GRAPH_SAMPLER_DATA_PROVIDER_H
2 #define DALI_INTERNAL_SCENE_GRAPH_SAMPLER_DATA_PROVIDER_H
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  */
19
20 #include <dali/public-api/shader-effects/sampler.h>
21 #include <dali/integration-api/resource-declarations.h>
22 #include <dali/internal/common/buffer-index.h>
23
24 namespace Dali
25 {
26 namespace Internal
27 {
28 namespace SceneGraph
29 {
30
31 class SamplerDataProvider
32 {
33 public:
34   typedef Dali::Sampler::FilterMode FilterMode;
35   typedef Dali::Sampler::WrapMode   WrapMode;
36   typedef Dali::Integration::ResourceId ResourceId;
37
38   /**
39    * Constructor
40    */
41   SamplerDataProvider()
42   {
43   }
44
45   /**
46    * Get the sampler's texture unit uniform name
47    * @return The texture unit uniform name
48    */
49   virtual const std::string& GetTextureUnitUniformName() const = 0;
50
51   /**
52    * Get the texture identity associated with the sampler
53    * @return The texture identity
54    */
55   virtual ResourceId GetTextureId( BufferIndex bufferIndex ) const = 0;
56
57   /**
58    * Get the filter mode
59    * @param[in] bufferIndex The buffer index to use
60    * @return The minify filter mode
61    */
62   virtual FilterMode GetMinifyFilterMode( BufferIndex bufferIndex ) const = 0;
63
64   /**
65    * Get the filter mode
66    * @param[in] bufferIndex The buffer index to use
67    * @return The magnify filter mode
68    */
69   virtual FilterMode GetMagnifyFilterMode( BufferIndex bufferIndex ) const = 0;
70
71   /**
72    * Get the horizontal wrap mode
73    * @param[in] bufferIndex The buffer index to use
74    * @return The horizontal wrap mode
75    */
76   virtual WrapMode GetUWrapMode( BufferIndex bufferIndex ) const = 0;
77
78   /**
79    * Get the vertical wrap mode
80    * @param[in] bufferIndex The buffer index to use
81    * @return The vertical wrap mode
82    */
83   virtual WrapMode GetVWrapMode( BufferIndex bufferIndex ) const = 0;
84
85 protected:
86   /**
87    * No deletion through this interface
88    */
89   virtual ~SamplerDataProvider()
90   {
91   }
92 };
93
94 } // namespace SceneGraph
95 } // namespace Internal
96 } // namespace Dali
97
98 #endif // DALI_INTERNAL_SCENE_GRAPH_SAMPLER_DATA_PROVIDER_H