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
43 * Creates a new texture object
44 * @param[in] width The width (pixels)
45 * @param[in] height The height (pixels)
46 * @param[in] pixelFormat The pixel format
47 * @param context The GL context
49 FrameBufferTexture(unsigned int width, unsigned int height, Pixel::Format pixelFormat, Context& context);
54 virtual ~FrameBufferTexture();
57 * @copydoc Texture::IsFullyOpaque
59 virtual bool IsFullyOpaque() const;
62 * @copydoc Texture::HasAlphaChannel
64 virtual bool HasAlphaChannel() const;
67 * @copydoc Texture::Init
72 * Prepare FBO for rendering.
73 * @return true if the FBO is prepared and its status is GL_FRAMEBUFFER_COMPLETE, otherwise false.
75 virtual bool Prepare();
78 unsigned int mFrameBufferName;
79 unsigned int mRenderBufferName;
82 * @copydoc Texture::CreateGlTexture
84 virtual bool CreateGlTexture();
87 * @copydoc Texture::GlCleanup
89 virtual void GlCleanup();
91 }; // class FrameBufferTexture
93 } //namespace Internal
96 #endif //__DALI_INTERNAL_FRAME_BUFFER_TEXTURE_H__