1 #ifndef __DALI_INTERNAL_NATIVE_TEXTURE_H__
2 #define __DALI_INTERNAL_NATIVE_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.
22 #include <dali/integration-api/gl-defines.h>
23 #include <dali/public-api/images/native-image-interface.h>
24 #include <dali/internal/render/gl-resources/texture.h>
36 * Native texture class.
37 * Used for handing already loaded image data to Dali.
40 class NativeTexture : public Texture
45 * @pre nativeImg has to be initialized. (GLTexture is already created)
46 * @param nativeImg the NativeImage to be used
47 * @param context the GL context
49 NativeTexture(NativeImageInterface* nativeImg, Context& context);
54 virtual ~NativeTexture();
57 * @copydoc Texture::Bind
59 virtual bool Bind( GLenum target, TextureUnit textureunit );
62 * @copydoc Texture::IsFullyOpaque
64 virtual bool IsFullyOpaque() const;
67 * @copydoc Texture::HasAlphaChannel
69 virtual bool HasAlphaChannel() const;
72 * @copydoc Texture::Init
78 * @copydoc Texture::CreateGlTexture
80 virtual bool CreateGlTexture();
83 * @copydoc Texture::GlCleanup
85 virtual void GlCleanup();
90 NativeImageInterfacePtr mNativeImage; ///< reference to NativeImage the Texture was created from
93 } //namespace Internal
97 #endif //__DALI_INTERNAL_NATIVE_TEXTURE_H__