1 #ifndef __DALI_INTERNAL_FRAME_BUFFER_TEXTURE_H__
2 #define __DALI_INTERNAL_FRAME_BUFFER_TEXTURE_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
24 #include <dali/internal/render/gl-resources/texture.h>
25 #include <dali/integration-api/bitmap.h>
26 #include <dali/integration-api/debug.h>
36 * Used as a frame buffer for RenderTask
38 class FrameBufferTexture : public Texture
42 * Creates a new texture object
43 * @param[in] width The width (pixels)
44 * @param[in] height The height (pixels)
45 * @param[in] pixelFormat The pixel format
46 * @param context The GL context
48 FrameBufferTexture(unsigned int width, unsigned int height, Pixel::Format pixelFormat, Context& context);
53 virtual ~FrameBufferTexture();
56 * @copydoc Texture::IsFullyOpaque
58 virtual bool IsFullyOpaque() const;
61 * @copydoc Texture::HasAlphaChannel
63 virtual bool HasAlphaChannel() const;
66 * @copydoc Texture::Init
71 * Prepare FBO for rendering.
72 * @return true if the FBO is prepared and its status is GL_FRAMEBUFFER_COMPLETE, otherwise false.
74 virtual bool Prepare();
77 unsigned int mFrameBufferName;
78 unsigned int mRenderBufferName;
81 * @copydoc Texture::CreateGlTexture
83 virtual bool CreateGlTexture();
86 * @copydoc Texture::GlCleanup
88 virtual void GlCleanup();
90 }; // class FrameBufferTexture
92 } //namespace Internal
95 #endif //__DALI_INTERNAL_FRAME_BUFFER_TEXTURE_H__