Dali 3D User Interface Engine
shader.h
Go to the documentation of this file.
1 #ifndef DALI_SHADER_H
2 #define DALI_SHADER_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 
21 // EXTERNAL INCLUDES
22 #include <string> // std::string
23 
24 // INTERNAL INCLUDES
25 #include <dali/public-api/object/handle.h> // Dali::Handle
26 #include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
27 
54 #define DALI_COMPOSE_SHADER(STR) #STR
55 
56 namespace Dali
57 {
58 
59 namespace Internal DALI_INTERNAL
60 {
61 class Shader;
62 }
63 
68 {
69 public:
74  {
75  HINT_NONE = 0x00,
76  HINT_REQUIRES_SELF_DEPTH_TEST = 0x01,
77  HINT_OUTPUT_IS_TRANSPARENT = 0x02,
78  HINT_OUTPUT_IS_OPAQUE = 0x04,
79  HINT_MODIFIES_GEOMETRY = 0x08,
80 
81  };
82 
86  struct Property
87  {
88  enum
89  {
91 
92  };
93  };
94 
103  static Shader New( const std::string& vertexShader,
104  const std::string& fragmentShader,
105  ShaderHints hints = ShaderHints(HINT_NONE) );
106 
110  Shader();
111 
117  ~Shader();
118 
124  Shader( const Shader& handle );
125 
133  static Shader DownCast( BaseHandle handle );
134 
141  Shader& operator=( const Shader& handle );
142 
143 public: // Not intended for application developers
148  explicit DALI_INTERNAL Shader( Internal::Shader* effect );
149 };
150 
151 } // namespace Dali
152 
153 #endif // DALI_SHADER_H
Dali Docs Home
Read more about Dali