[dali_1.4.11] Merge branch 'devel/master'
[platform/core/uifw/dali-demo.git] / examples / image-view-url / image-view-url-example.cpp
index 2bd3518..624709e 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/image-loader/texture-manager.h>
 
 #include "shared/view.h"
@@ -59,7 +58,8 @@ class ImageViewUrlApp : public ConnectionTracker
 {
 public:
   ImageViewUrlApp( Application& application )
-  : mApplication( application )
+  : mApplication( application ),
+    mDeltaPropertyIndex( Property::INVALID_INDEX )
   {
     // Connect to the Application's Init signal
     mApplication.InitSignal().Connect( this, &ImageViewUrlApp::Create );
@@ -116,7 +116,7 @@ private:
       Property::Map customShader;
       customShader[Toolkit::Visual::Shader::Property::FRAGMENT_SHADER] = FILTER_FRAGMENT_SOURCE;
       Property::Map visualMap;
-      visualMap.Insert(Toolkit::DevelVisual::Property::SHADER, customShader);
+      visualMap.Insert(Toolkit::Visual::Property::SHADER, customShader);
       mActorForInput.SetProperty(Toolkit::ImageView::Property::IMAGE, visualMap);
 
       mDeltaPropertyIndex = mActorForInput.RegisterProperty(DELTA_UNIFORM_NAME, 0.f);
@@ -139,7 +139,7 @@ private:
                                     Pixel::RGB888,
                                     unsigned(TARGET_SIZE.width),
                                     unsigned(TARGET_SIZE.height));
-      auto framebuffer = FrameBuffer::New(TARGET_SIZE.width, TARGET_SIZE.height, Pixel::RGB888);
+      auto framebuffer = FrameBuffer::New(TARGET_SIZE.width, TARGET_SIZE.height, FrameBuffer::Attachment::NONE );
       framebuffer.AttachColorTexture(mOutputTexture);
 
       renderTask.SetFrameBuffer(framebuffer);
@@ -199,20 +199,10 @@ private:
   Texture mOutputTexture;
 };
 
-void RunTest( Application& application )
-{
-  ImageViewUrlApp test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );
-
-  RunTest( application );
-
+  ImageViewUrlApp test( application );
+  application.MainLoop();
   return 0;
 }