Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / effects / inc / renderer / engine-model / FUiEffects_RendererEngineModelTextureProperty.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FUiEffects_RendererEngineModelTextureProperty.h
20  * @brief       Texture property in material
21  *
22  */
23
24 #ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_PROPERTY_H_
25 #define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_PROPERTY_H_
26
27 #include <renderer/engine-model/FUiEffects_RendererEngineModelProperty.h>
28 #include <renderer/engine-model/FUiEffects_RendererEngineModelPropertyVisitor.h>
29
30 #include <vector>
31
32 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel
33 {
34
35 class TextureProperty:
36         public Property
37 {
38 public:
39         virtual void Visit(PropertyVisitor& v);
40
41         class InternalFormat
42         {
43         public:
44                 enum InternalFormatEnum //Number of colour components
45                 {
46                         ONE_COMPONENT = 0       ,
47                         TWO_COMPONENTS          ,
48                         THREE_COMPONENTS        ,
49                         FOUR_COMPONENTS         ,
50                         DEPTH_COMPONENT         ,
51                         DEPTH_COMPONENT_16  ,
52                         DEPTH_COMPONENT_24  ,
53                         DEPTH_COMPONENT_32  ,
54                         RGB                     ,
55                         RGBA                            ,
56                         BGRA
57                 };
58                 typedef InternalFormatEnum Value;
59         };
60
61         class DataFormat
62         {
63         public:
64                 enum DataFormatEnum //Format of the pixel data
65                 {
66                         RGB = 0                 ,
67                         BGR                     ,
68                         RGBA                    ,
69                         BGRA                    ,
70                         LUMINANCE               ,
71                         LUMINANCE_ALPHA
72                 };
73                 typedef DataFormatEnum Value;
74         };
75
76         class DataType
77         {
78         public:
79                 enum DataTypeEnum //Data type of pixel data
80                 {
81                         UNSIGNED_BYTE = 0       ,
82                         BYTE                            ,
83                         UNSIGNED_SHORT          ,
84                         SHORT                   ,
85                         UNSIGNED_INT            ,
86                         INT                                     ,
87                         FLOAT                           ,
88                         UNSIGNED_SHORT_565
89                 };
90                 typedef DataTypeEnum Value;
91         };
92
93         class FilterType
94         {
95         public:
96                 enum FilterTypeEnum
97                 {
98                         NEAREST = 0                             ,
99                         LINEAR                  ,
100                         NEAREST_MIPMAP_NEAREST  ,
101                         LINEAR_MIPMAP_NEAREST   ,
102                         NEAREST_MIPMAP_LINEAR   ,
103                         LINEAR_MIPMAP_LINEAR
104                 };
105                 typedef FilterTypeEnum Value;
106         };
107
108         class WrapType
109         {
110         public:
111                 enum WrapTypeEnum
112                 {
113                         CLAMP = 0               ,
114                         CLAMP_TO_BORDER ,
115                         CLAMP_TO_EDGE   ,
116                         MIRRORED_REPEAT ,
117                         REPEAT
118                 };
119                 typedef WrapTypeEnum Value;
120         };
121
122         TextureProperty(void);
123         virtual ~TextureProperty(void);
124
125         virtual InternalFormat::Value GetInternalFormat(void) const = 0;
126         virtual DataFormat::Value GetDataFormat(void) const = 0;
127         virtual DataType::Value GetDataType(void) const = 0;
128         virtual FilterType::Value GetMinFilter(void) const = 0;
129         virtual FilterType::Value GetMagFilter(void) const = 0;
130         virtual WrapType::Value GetWrapS(void) const = 0;
131         virtual WrapType::Value GetWrapT(void) const = 0;
132         virtual WrapType::Value GetWrapR(void) const = 0;
133 };
134
135 typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr<TextureProperty> TexturePropertyPtr;
136
137 }}}}} //Tizen::Ui::Effects::_Renderer::EngineModel
138
139 #endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_PROPERTY_H_