X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fmodel3d-view%2Fmodel3d-view-impl.cpp;h=a4f927a4ff481a17a64edca6bfe054ae12bab434;hp=9c2298295888c0e611c856ef14cd8dbd318a88cc;hb=b1e8521ad77e7b4e62b59613b2edef64429130e9;hpb=cd2db445fc95fed65cb9d966e672cb6976a10d0d diff --git a/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp b/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp index 9c22982..a4f927a 100644 --- a/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp +++ b/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,9 +25,8 @@ #include #include #include -#include #include -#include +#include // INTERNAL INCLUDES #include @@ -60,12 +59,11 @@ enum TextureIndex Texture LoadTexture( const char* imageUrl ) { Texture texture; - Dali::BitmapLoader loader = Dali::BitmapLoader::New( imageUrl ); - loader.Load(); - PixelData pixelData = loader.GetPixelData(); - if( pixelData ) + Devel::PixelBuffer pixelBuffer = LoadImageFromFile( imageUrl ); + if( pixelBuffer ) { - texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() ); + texture = Texture::New( TextureType::TEXTURE_2D, pixelBuffer.GetPixelFormat(), pixelBuffer.GetWidth(), pixelBuffer.GetHeight() ); + PixelData pixelData = Devel::PixelBuffer::Convert( pixelBuffer ); texture.Upload( pixelData ); texture.GenerateMipmaps(); } @@ -426,7 +424,7 @@ Property::Value Model3dView::GetProperty( BaseObject* object, Property::Index in ///////////////////////////////////////////////////////////// -void Model3dView::OnStageConnection( int depth ) +void Model3dView::OnSceneConnection( int depth ) { CustomActor self = Self(); self.AddRenderer( mRenderer ); @@ -448,7 +446,7 @@ void Model3dView::OnStageConnection( int depth ) constraint.Apply(); } - Control::OnStageConnection( depth ); + Control::OnSceneConnection( depth ); } ///////////////////////////////////////////////////////////