// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
#include <dali/public-api/common/stage.h>
-#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
+#include <dali/devel-api/adaptor-framework/image-loading.h>
#include <dali/devel-api/adaptor-framework/file-loader.h>
#include <dali/devel-api/scripting/enum-helper.h>
#include <dali/devel-api/scripting/scripting.h>
Texture LoadTexture( const char* imageUrl, bool generateMipmaps )
{
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 );
if( generateMipmaps )
InitializeRenderer();
actor.AddRenderer( mImpl->mRenderer );
+
+ // Mesh loaded and ready to display
+ ResourceReady();
}
void MeshVisual::DoCreatePropertyMap( Property::Map& map ) const
map.Insert( Toolkit::MeshVisual::Property::LIGHT_POSITION, mLightPosition );
}
+void MeshVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
+{
+ // Do nothing
+}
+
void MeshVisual::InitializeRenderer()
{
//Try to load the geometry from the file.