1 #ifndef __DALI_INTERNAL_TEXTURE_FACTORY_H__
2 #define __DALI_INTERNAL_TEXTURE_FACTORY_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.
21 #include <dali/public-api/object/ref-object.h>
22 #include <dali/public-api/images/native-image.h>
39 namespace TextureFactory
42 * Creates a new texture object from a Bitmap
43 * @param[in] bitmap The Bitmap
44 * @param[in] context The GL context
45 * @return A newly allocated texture
47 Internal::Texture* NewBitmapTexture( Integration::Bitmap* const bitmap, Context& context );
50 * Creates a new bitmap texture object of the given dimensions.
51 * @param[in] width The width (pixels)
52 * @param[in] height The height (pixels)
53 * @param[in] pixelFormat The pixel format
54 * @param[in] clearPixels True if the pixel data should be cleared first
55 * @param[in] context The GL context
57 Internal::Texture* NewBitmapTexture( unsigned int width,
59 Pixel::Format pixelFormat,
64 * Creates a texture object from a native image (eg.: EGLImage).
65 * @param[in] nativeImage The native image to load
66 * @param[in] context The GL context
67 * @return A newly allocated texture
69 Internal::Texture* NewNativeImageTexture( NativeImage& nativeImage, Context& context );
72 * @copydoc FrameBufferTexture::FrameBufferTexture
73 * @return A newly allocated texture
75 Internal::Texture* NewFrameBufferTexture( unsigned int width,
77 Pixel::Format pixelFormat,
81 * @copydoc FrameBufferTexture::FrameBufferTexture
82 * @return A newly allocated texture
84 Internal::Texture* NewFrameBufferTexture( NativeImagePtr nativeImage, Context& context );
88 } // namespace Internal
92 #endif // __DALI_INTERNAL_TEXTURE_FACTORY_H__