#include <math.h> //floor, log2
// INTERNAL INCLUDES
-#include <dali/devel-api/images/native-image-interface-extension.h>
+
namespace Dali
{
if( mNativeImage )
{
- mNativeImage->GlExtensionDestroy();
+ mNativeImage->DestroyResource();
}
}
}
{
if( mNativeImage )
{
- if( mNativeImage->GlExtensionCreate() )
+ if( mNativeImage->CreateResource() )
{
- NativeImageInterface::Extension* extension = mNativeImage->GetExtension();
- if( extension )
- {
- mTarget = extension->GetEglImageTextureTarget();
- }
+ mTarget = mNativeImage->GetTextureTarget();
context.GenTextures( 1, &mId );
context.BindTexture( mTarget, mId );
if( mNativeImage->TargetTexture() != 0u )
{
context.DeleteTextures( 1, &mId );
- mNativeImage->GlExtensionDestroy();
+ mNativeImage->DestroyResource();
mId = 0u;
}
}
{
if( !mIsCompressed )
{
- context.TexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, 0 );
+ context.TexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, nullptr );
}
else
{
- context.CompressedTexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, 0 );
+ context.CompressedTexImage2D(GL_TEXTURE_2D, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, nullptr );
}
}
else if( mType == TextureType::TEXTURE_CUBE )
{
for( uint32_t i(0); i<6; ++i )
{
- context.TexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, 0 );
+ context.TexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, mGlFormat, mPixelDataType, nullptr );
}
}
else
{
for( uint32_t i(0); i<6; ++i )
{
- context.CompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, 0 );
+ context.CompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, mGlInternalFormat, mWidth, mHeight, 0, 0, nullptr );
}
}
context.TexParameteri( mTarget, GL_TEXTURE_WRAP_R, GL_WRAP_DEFAULT );
void Texture::Upload( Context& context, PixelDataPtr pixelData, const Internal::Texture::UploadParams& params )
{
- DALI_ASSERT_ALWAYS( mNativeImage == NULL );
+ DALI_ASSERT_ALWAYS( mNativeImage == nullptr );
//Get pointer to the data of the PixelData object
uint8_t* buffer( pixelData->GetBuffer() );