1 #ifndef DALI_INTERNAL_RENDER_SURFACE_FRAME_BUFFER_H
2 #define DALI_INTERNAL_RENDER_SURFACE_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/internal/render/renderers/render-frame-buffer.h>
22 #include <dali/integration-api/render-surface.h>
35 class SurfaceFrameBuffer : public FrameBuffer
41 * @param[in] surface The render surface
43 SurfaceFrameBuffer( Integration::RenderSurface* surface );
48 virtual ~SurfaceFrameBuffer();
51 * @copydoc Dali::Internal::Renderer::FrameBuffer::Initialize()
53 void Initialize( Context& context ) override;
56 * @copydoc Dali::Internal::Renderer::FrameBuffer::Destroy()
58 void Destroy( Context& context ) override;
61 * @copydoc Dali::Internal::Renderer::FrameBuffer::GlContextDestroyed()
63 void GlContextDestroyed() override;
66 * @copydoc Dali::Internal::Renderer::FrameBuffer::Bind()
68 void Bind( Context& context ) override;
71 * @copydoc Dali::Internal::Renderer::FrameBuffer::GetWidth()
73 uint32_t GetWidth() const override;
76 * @copydoc Dali::Internal::Renderer::FrameBuffer::GetHeight()
78 uint32_t GetHeight() const override;
81 * @copydoc Dali::Internal::Renderer::FrameBuffer::IsSurfaceBacked()
83 bool IsSurfaceBacked() override { return true; };
88 * Called after this frame buffer is rendered in the render manager
93 * Gets the context holding the GL state of rendering for the surface
96 Context* GetContext();
99 * @brief Gets whether the depth buffer is required
100 * @return TRUE if the depth buffer is required
102 Integration::DepthBufferAvailable GetDepthBufferRequired();
105 * @brief Gets whether the stencil buffer is required
106 * @return TRUE if the stencil buffer is required
108 Integration::StencilBufferAvailable GetStencilBufferRequired();
111 * @brief Gets the background color of the surface.
112 * @return The background color
114 Vector4 GetBackgroundColor();
118 Integration::RenderSurface* mSurface; ///< The render surface
119 Context* mContext; ///< The context holding the GL state of rendering for the surface backed frame buffer
123 } // namespace Render
125 } // namespace Internal
130 #endif // DALI_INTERNAL_RENDER_SURFACE_FRAME_BUFFER_H