X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fgl-resources%2Fnative-frame-buffer-texture.cpp;h=7899963e8c83484bf1b5f79a6061d5abcf944f44;hb=b5e8136ac4179b011e72830370c9cf2272117e22;hp=e762dbf6d526c1e77bcb807479b7bb7b22771bbc;hpb=be21964ff61008c134e303456e4e6e6900aad486;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/gl-resources/native-frame-buffer-texture.cpp b/dali/internal/render/gl-resources/native-frame-buffer-texture.cpp index e762dbf..7899963 100644 --- a/dali/internal/render/gl-resources/native-frame-buffer-texture.cpp +++ b/dali/internal/render/gl-resources/native-frame-buffer-texture.cpp @@ -20,6 +20,7 @@ // INTERNAL INCLUDES #include +#include #include namespace Dali @@ -28,10 +29,9 @@ namespace Dali namespace Internal { -NativeFrameBufferTexture::NativeFrameBufferTexture( NativeImagePtr nativeImage, Context& context) +NativeFrameBufferTexture::NativeFrameBufferTexture( NativeImageInterfacePtr nativeImage, Context& context) : FrameBufferTexture(nativeImage->GetWidth(), nativeImage->GetHeight(), - nativeImage->GetPixelFormat(), context), mNativeImage(nativeImage) { @@ -47,13 +47,12 @@ NativeFrameBufferTexture::~NativeFrameBufferTexture() bool NativeFrameBufferTexture::IsFullyOpaque() const { - // TODO - Should test actual texture... return !HasAlphaChannel(); } bool NativeFrameBufferTexture::HasAlphaChannel() const { - return Pixel::HasAlpha(mNativeImage->GetPixelFormat()); + return mNativeImage->RequiresBlending(); } bool NativeFrameBufferTexture::Init() @@ -76,7 +75,7 @@ bool NativeFrameBufferTexture::CreateGlTexture() if( mNativeImage->GlExtensionCreate() ) { mContext.GenTextures(1, &mId); - mContext.ActiveTexture(GL_TEXTURE7); // bind in unused unit so rebind works the first time + mContext.ActiveTexture( TEXTURE_UNIT_UPLOAD ); // bind in unused unit so rebind works the first time mContext.Bind2dTexture(mId); mContext.PixelStorei(GL_UNPACK_ALIGNMENT, 1); // We always use tightly packed data @@ -124,7 +123,6 @@ void NativeFrameBufferTexture::GlCleanup() mNativeImage.Reset(); } - } //namespace Internal } //namespace Dali