Merge "Add ImageVisualShaderFactory" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image-visual-shader-factory.h
1 #ifndef DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H
2 #define DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H
3
4 /*
5  * Copyright (c) 2018 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 // EXTERNAL INCLUDES
21
22 // INTERNAL INCLUDES
23 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 namespace Internal
32 {
33
34 /**
35  * ImageVisualShaderFactory is an object that provides and shares shaders between image visuals
36  */
37 class ImageVisualShaderFactory
38 {
39 public:
40
41 public:
42
43   /**
44    * @brief Constructor
45    */
46   ImageVisualShaderFactory();
47
48   /**
49    * @brief Destructor
50    */
51   ~ImageVisualShaderFactory();
52
53   /**
54    * Get the standard image rendering shader.
55    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
56    * @param[in] atlasing Whether texture atlasing is applied.
57    * @param[in] defaultTextureWrapping Whether the default texture wrap mode is applied.
58    */
59   Shader GetShader( VisualFactoryCache& factoryCache, bool atlasing, bool defaultTextureWrapping );
60
61   /**
62    * Request the default vertex shader source.
63    * @return The default vertex shader source.
64    */
65   const char* GetVertexShaderSource();
66
67   /**
68    * Request the default fragment shader source.
69    * @return The default fragment shader source.
70    */
71   const char* GetFragmentShaderSource();
72
73 protected:
74
75   /**
76    * Undefined copy constructor.
77    */
78   ImageVisualShaderFactory(const ImageVisualShaderFactory&);
79
80   /**
81    * Undefined assignment operator.
82    */
83   ImageVisualShaderFactory& operator=(const ImageVisualShaderFactory& rhs);
84
85 private:
86 };
87
88 } // namespace Internal
89
90 } // namespace Toolkit
91
92 } // namespace Dali
93
94 #endif // DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H