Removing rendering backend
[platform/core/uifw/dali-core.git] / dali / internal / update / rendering / scene-graph-frame-buffer.h
1 #ifndef DALI_INTERNAL_SCENE_GRAPH_FRAME_BUFFER_H
2 #define DALI_INTERNAL_SCENE_GRAPH_FRAME_BUFFER_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 // INTERNAL INCLUDES
21 #include <dali/public-api/rendering/frame-buffer.h>
22 #include <dali/internal/update/rendering/scene-graph-texture.h>
23
24 namespace Dali
25 {
26 namespace Internal
27 {
28
29 namespace SceneGraph
30 {
31
32 class FrameBuffer
33 {
34 public:
35
36   /**
37    * Constructor
38    * @param[in] width The width of the FrameBuffer
39    * @param[in] height The height of the FrameBuffer
40    * @param[in] attachments The attachments comprising the format of the FrameBuffer (bit-mask)
41    */
42   FrameBuffer( unsigned int width, unsigned int height, unsigned int attachments );
43
44   /**
45    * Destructor
46    */
47   ~FrameBuffer();
48
49   /**
50    * @brief Attach a texture for color rendering. Valid only for Framebuffers with COLOR attachments.
51    * param[in] context The GL context
52    * @param[in] texture The texture that will be used as output when rendering
53    * @param[in] mipmapLevel The mipmap of the texture to be attached
54    * @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
55    */
56   void AttachColorTexture( SceneGraph::Texture* texture, unsigned int mipmapLevel, unsigned int layer );
57
58   /**
59    * @brief Get the width of the FrameBuffer
60    * @return The width of the framebuffer
61    */
62   unsigned int GetWidth() const;
63
64   /**
65    * @brief Get the height of the FrameBuffer
66    * @return The height of the framebuffer
67    */
68   unsigned int GetHeight() const;
69
70 private:
71
72   unsigned int mWidth;
73   unsigned int mHeight;
74 };
75
76
77 } // namespace SceneGraph
78
79 } // namespace Internal
80
81 } // namespace Dali
82
83
84 #endif // DALI_INTERNAL_SCENE_GRAPH_FRAME_BUFFER_H