Support to get shader language version for shader static API
[platform/core/uifw/dali-core.git] / dali / integration-api / graphics-config.h
1 #ifndef DALI_INTEGRATION_GRAPHICS_CONFIG_H
2 #define DALI_INTEGRATION_GRAPHICS_CONFIG_H
3
4 /*
5  * Copyright (c) 2024 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 #include <dali/devel-api/rendering/renderer-devel.h>
22
23 namespace Dali::Integration
24 {
25 /**
26  * GraphicsConfig is an abstract interface, used to access OpenGRAPHICS services.
27  * A concrete implementation must be created for each platform, and provided when creating the
28  * Dali::Integration::Core object.
29  */
30 class GraphicsConfig
31 {
32 protected:
33   // Protected construction & deletion
34   GraphicsConfig()          = default; ///< Protected constructor so an instance of this class cannot be created.
35   virtual ~GraphicsConfig() = default; ///< Virtual protected destructor, no deletion through this interface.
36
37 public:
38   // Not copyable but movable
39   GraphicsConfig(const GraphicsConfig&) = delete;            ///< Deleted copy constructor.
40   GraphicsConfig(GraphicsConfig&&)      = default;           ///< Default move constructor.
41   GraphicsConfig& operator=(const GraphicsConfig&) = delete; ///< Deleted copy assignment operator.
42   GraphicsConfig& operator=(GraphicsConfig&&) = default;     ///< Default move assignment operator.
43
44   /**
45    * Returns current graphicses can support the blend equation
46    * @Return true current graphicses support the blend equation
47    */
48   virtual bool IsBlendEquationSupported(DevelBlendEquation::Type blendEquation) = 0;
49
50   /**
51    * Returns shading language version.
52    * @Return shading language version.
53    */
54   virtual uint32_t GetShaderLanguageVersion() = 0;
55
56   /**
57    * Returns shader prefix of shading language version.
58    * @Return shader prefix of shading language version.
59    */
60   virtual std::string GetShaderVersionPrefix() = 0;
61
62   /**
63    * Returns vertex shader prefix including shading language version.
64    * @Return vertex shader prefix including shading language version.
65    */
66   virtual std::string GetVertexShaderPrefix() = 0;
67
68   /**
69    * Returns fragment shader prefix including shading language version and extension information.
70    * @Return fragment shader prefix including shading language version and extension information.
71    */
72   virtual std::string GetFragmentShaderPrefix() = 0;
73 };
74
75 } // namespace Dali::Integration
76
77 #endif