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 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.
25 #include <dali/internal/render/gl-resources/texture.h>
26 #include <dali/integration-api/bitmap.h>
27 #include <dali/integration-api/debug.h>
37 * Used as a frame buffer for RenderTask
39 class FrameBufferTexture : public Texture
44 * Creates a new texture object
45 * @param[in] width The width (pixels)
46 * @param[in] height The height (pixels)
47 * @param context The GL context
49 FrameBufferTexture(unsigned int width, unsigned int height, Context& context);
52 * Creates a new texture object
53 * @param[in] width The width (pixels)
54 * @param[in] height The height (pixels)
55 * @param[in] pixelFormat The pixel format
56 * @param context The GL context
58 FrameBufferTexture(unsigned int width, unsigned int height, Pixel::Format pixelFormat, Context& context);
63 virtual ~FrameBufferTexture();
66 * @copydoc Texture::IsFullyOpaque
68 virtual bool IsFullyOpaque() const;
71 * @copydoc Texture::HasAlphaChannel
73 virtual bool HasAlphaChannel() const;
76 * @copydoc Texture::Init
81 * Prepare FBO for rendering.
82 * @return true if the FBO is prepared and its status is GL_FRAMEBUFFER_COMPLETE, otherwise false.
84 virtual bool Prepare();
87 unsigned int mFrameBufferName;
88 unsigned int mRenderBufferName;
89 Pixel::Format mPixelFormat;
92 * @copydoc Texture::CreateGlTexture
94 virtual bool CreateGlTexture();
97 * @copydoc Texture::GlCleanup
99 virtual void GlCleanup();
101 }; // class FrameBufferTexture
103 } //namespace Internal
106 #endif //__DALI_INTERNAL_FRAME_BUFFER_TEXTURE_H__