1 #ifndef DALI_TOOLKIT_INTERNAL_CONTROL_RENDERERS_H
2 #define DALI_TOOLKIT_INTERNAL_CONTROL_RENDERERS_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <dali/dali.h>
21 #include <dali-toolkit/internal/graphics/builtin-shader-extern-gen.h>
30 #define BASIC_VERTEX_SOURCE SHADER_CONTROL_RENDERERS_VERT
31 #define BASIC_FRAGMENT_SOURCE SHADER_CONTROL_RENDERERS_FRAG
34 * Helper method for rendering an image with custom shader.
35 * @param[in] vertextSrc The custom vertex shader.
36 * @param[in] fragmentSrc The custom fragment shader.
37 * @return A newly created renderer.
39 Dali::Renderer CreateRenderer( std::string_view vertexSrc, std::string_view fragmentSrc );
42 * Helper method for rendering an image with custom shader.
43 * @param[in] vertextSrc The custom vertex shader.
44 * @param[in] fragmentSrc The custom fragment shader.
45 * @param[in] gridSize The number of grid sub-divisions required.
46 * @return A newly created renderer.
48 Dali::Renderer CreateRenderer( std::string_view vertexSrc, std::string_view fragmentSrc, Dali::Shader::Hint::Value hints, Dali::Uint16Pair gridSize );
51 * Helper method for setting the first texture passed to a renderer.
52 * @param[in] renderer The renderer using the texture.
53 * @param[in] texture The texture to set.
55 void SetRendererTexture( Dali::Renderer renderer, Dali::Texture texture );
58 * Helper method for setting the first texture passed to a renderer.
59 * @param[in] renderer The renderer using the texture.
60 * @param[in] framebuffer A frame buffer color texture attached.
62 void SetRendererTexture( Dali::Renderer renderer, Dali::FrameBuffer frameBuffer );
64 } // namespace Internal
65 } // namespace Toolkit
68 #endif // DALI_TOOLKIT_INTERNAL_CONTROL_RENDERERS_H