/*
- * 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.
#include <dali/public-api/animation/constraints.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
-#include <dali/public-api/images/resource-image.h>
#include <dali/devel-api/adaptor-framework/file-loader.h>
-#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
+#include <dali/devel-api/adaptor-framework/image-loading.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/model3d-view/obj-loader.h>
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();
}
/////////////////////////////////////////////////////////////
-void Model3dView::OnStageConnection( int depth )
+void Model3dView::OnSceneConnection( int depth )
{
CustomActor self = Self();
self.AddRenderer( mRenderer );
constraint.Apply();
}
- Control::OnStageConnection( depth );
+ Control::OnSceneConnection( depth );
}
///////////////////////////////////////////////////////////