1 #ifndef DALI_INTERNAL_RENDER_FRAME_BUFFER_H
2 #define DALI_INTERNAL_RENDER_FRAME_BUFFER_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.
21 #include <dali/public-api/rendering/frame-buffer.h>
22 #include <dali/internal/render/gl-resources/context.h>
23 #include <dali/internal/render/renderers/render-sampler.h>
24 #include <dali/integration-api/gl-defines.h>
45 virtual ~FrameBuffer() {};
48 * Creates a FrameBuffer object in the GPU.
49 * @param[in] context The GL context
51 virtual void Initialize( Context& context ) = 0;
54 * Deletes the framebuffer object from the GPU
55 * @param[in] context The GL context
57 virtual void Destroy( Context& context ) = 0;
60 * Called by RenderManager to inform the framebuffer that the context has been destroyed
62 virtual void GlContextDestroyed() = 0;
65 * @brief Bind the framebuffer
66 * @param[in] context The GL context
68 virtual void Bind( Context& context ) = 0;
71 * @brief Get the width of the FrameBuffer
72 * @return The width of the framebuffer
74 virtual uint32_t GetWidth() const = 0;
77 * @brief Get the height of the FrameBuffer
78 * @return The height of the framebuffer
80 virtual uint32_t GetHeight() const = 0;
83 * @brief Check whether the FrameBuffer is backed by a render surface
84 * @return True if the FrameBuffer is backed by a render surface
86 virtual bool IsSurfaceBacked() = 0;
91 * @brief Undefined copy constructor. FrameBuffer cannot be copied
93 FrameBuffer( const FrameBuffer& rhs ) = delete;
96 * @brief Undefined assignment operator. FrameBuffer cannot be copied
98 FrameBuffer& operator=( const FrameBuffer& rhs ) = delete;
102 } // namespace Render
104 } // namespace Internal
109 #endif // DALI_INTERNAL_RENDER_FRAME_BUFFER_H