/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
*/
// EXTERNAL INCLUDES
-#include <dali/devel-api/rendering/renderer.h>
#include <dali-toolkit/dali-toolkit.h>
// INTERNAL INCLUDES
#include "shared/view.h"
+#include "shared/utility.h"
using namespace Dali;
// Create vertices
struct Vertex { Vector2 position; float hue; };
- unsigned int numSides = 20;
+ const unsigned int numSides = 20;
Vertex polyhedraVertexData[numSides];
float angle=0;
float sectorAngle = 2.0f * Math::PI / (float) numSides;
// Create the geometry object
Geometry polyhedraGeometry = Geometry::New();
polyhedraGeometry.AddVertexBuffer( polyhedraVertices );
- polyhedraGeometry.SetGeometryType( Geometry::POINTS );
+ polyhedraGeometry.SetType( Geometry::POINTS );
return polyhedraGeometry;
}
// Hide the indicator bar
application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
- Image image0 = ResourceImage::New( MATERIAL_SAMPLE );
- Image image1 = ResourceImage::New( MATERIAL_SAMPLE2 );
+ Texture texture0 = DemoHelper::LoadTexture( MATERIAL_SAMPLE );
+ Texture texture1 = DemoHelper::LoadTexture( MATERIAL_SAMPLE2 );
Shader shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER );
TextureSet textureSet = TextureSet::New();
- textureSet.SetImage( 0u, image0 );
- textureSet.SetImage( 1u, image1 );
+ textureSet.SetTexture( 0u, texture0 );
+ textureSet.SetTexture( 1u, texture1 );
Geometry geometry = CreateGeometry();
Timer mChangeImageTimer;
};
-void RunTest( Application& application )
+int DALI_EXPORT_API main( int argc, char **argv )
{
+ Application application = Application::New( &argc, &argv );
ExampleController test( application );
-
application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
-//
-int main( int argc, char **argv )
-{
- Application application = Application::New( &argc, &argv );
-
- RunTest( application );
-
return 0;
}