Revert "[3.0] Render textures created from NativeImages error" 12/97612/1
authordongsug.song <dongsug.song@samsung.com>
Mon, 14 Nov 2016 13:55:31 +0000 (22:55 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Mon, 14 Nov 2016 13:55:53 +0000 (22:55 +0900)
This reverts commit 5b91e1278b07420f209cf0d065733539ace5961d.

Change-Id: Ia3cc795b90f5b1e6c4016f95c2f5a74709ba4e7c

dali/internal/render/renderers/render-texture.cpp

index 8ca2647..59c1206 100644 (file)
@@ -625,11 +625,6 @@ void NewTexture::Destroy( Context& context )
   if( mId )
   {
     context.DeleteTextures( 1, &mId );
-
-    if( mNativeImage )
-    {
-      mNativeImage->GlExtensionDestroy();
-    }
   }
 }
 
@@ -650,12 +645,7 @@ void NewTexture::Initialize(Context& context)
       context.TexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_WRAP_DEFAULT );
 
       // platform specific implementation decides on what GL extension to use
-      if( mNativeImage->TargetTexture() != 0u )
-      {
-        context.DeleteTextures( 1, &mId );
-        mNativeImage->GlExtensionDestroy();
-        mId = 0u;
-      }
+      mNativeImage->TargetTexture();
     }
   }
   else
@@ -813,12 +803,6 @@ bool NewTexture::Bind( Context& context, unsigned int textureUnit, Render::Sampl
 
     ApplySampler( context, sampler );
 
-    if( mNativeImage )
-    {
-      //Allow implementation specific operations after binding the texture
-      mNativeImage->PrepareTexture();
-    }
-
     return true;
   }