// INTERNAL INCLUDES
#include "shared/view.h"
+#include "shared/utility.h"
using namespace Dali;
Property::Map polyhedraVertexFormat;
polyhedraVertexFormat["aPosition"] = Property::VECTOR2;
polyhedraVertexFormat["aHue"] = Property::FLOAT;
- PropertyBuffer polyhedraVertices = PropertyBuffer::New( polyhedraVertexFormat, numSides );
- polyhedraVertices.SetData(polyhedraVertexData);
+ PropertyBuffer polyhedraVertices = PropertyBuffer::New( polyhedraVertexFormat );
+ polyhedraVertices.SetData( polyhedraVertexData, numSides );
// Create the geometry object
Geometry polyhedraGeometry = Geometry::New();
// Hide the indicator bar
application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
- mImage = ResourceImage::New( MATERIAL_SAMPLE );
- Image image = ResourceImage::New( MATERIAL_SAMPLE2 );
+ Texture texture0 = DemoHelper::LoadTexture( MATERIAL_SAMPLE );
+ Texture texture1 = DemoHelper::LoadTexture( MATERIAL_SAMPLE2 );
- mShader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER );
+ Shader shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER );
- mMaterial = Material::New( mShader );
- mMaterial.AddTexture(mImage, "sTexture1");
- mMaterial.AddTexture(image, "sTexture2");
+ TextureSet textureSet = TextureSet::New();
+ textureSet.SetTexture( 0u, texture0 );
+ textureSet.SetTexture( 1u, texture1 );
- mGeometry = CreateGeometry();
+ Geometry geometry = CreateGeometry();
- mRenderer = Renderer::New( mGeometry, mMaterial );
+ mRenderer = Renderer::New( geometry, shader );
+ mRenderer.SetTextures( textureSet );
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
mRenderer.RegisterProperty( "uFadeColor", Color::MAGENTA );
mRenderer.RegisterProperty( "uPointSize", 80.0f );
- mRenderer.SetDepthIndex(0);
+ mRenderer.SetProperty( Renderer::Property::DEPTH_INDEX, 0 );
mMeshActor.SetParentOrigin( ParentOrigin::CENTER );
mMeshActor.SetAnchorPoint( AnchorPoint::CENTER );
Application& mApplication; ///< Application instance
Vector3 mStageSize; ///< The size of the stage
- Image mImage;
- Shader mShader;
- Material mMaterial;
- Geometry mGeometry;
Renderer mRenderer;
Actor mMeshActor;
Renderer mRenderer2;
// Entry point for Linux & SLP applications
//
-int main( int argc, char **argv )
+int DALI_EXPORT_API main( int argc, char **argv )
{
Application application = Application::New( &argc, &argv );