*/
// EXTERNAL INCLUDES
-
-// INTERNAL INCLUDES
-#include "shared/view.h"
-
+#include <dali/devel-api/rendering/renderer.h>
#include <dali-toolkit/dali-toolkit.h>
#include <stdio.h>
#include <sstream>
#include <cstring>
+// INTERNAL INCLUDES
+#include "shared/view.h"
+
using namespace Dali;
namespace
const char* MATERIAL_SAMPLES[] =
{
- DALI_IMAGE_DIR "people-medium-1.jpg",
- DALI_IMAGE_DIR "people-medium-4.jpg",
- DALI_IMAGE_DIR "people-medium-11.jpg",
- DALI_IMAGE_DIR "people-small-16.jpg",
- DALI_IMAGE_DIR "people-medium-15.jpg",
- DALI_IMAGE_DIR "people-medium-6.jpg",
+ DEMO_IMAGE_DIR "people-medium-1.jpg",
+ DEMO_IMAGE_DIR "people-medium-4.jpg",
+ DEMO_IMAGE_DIR "people-medium-11.jpg",
+ DEMO_IMAGE_DIR "people-small-16.jpg",
+ DEMO_IMAGE_DIR "people-medium-15.jpg",
+ DEMO_IMAGE_DIR "people-medium-6.jpg",
};
const unsigned int NUMBER_OF_SAMPLES(sizeof(MATERIAL_SAMPLES)/sizeof(const char*));
// Create indices
unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
Property::Map indexFormat;
- indexFormat["indices"] = Property::UNSIGNED_INTEGER;
+ indexFormat["indices"] = Property::INTEGER;
PropertyBuffer indices = PropertyBuffer::New( indexFormat, 6 );
indices.SetData(indexData);
for( unsigned i=0; i<NUMBER_OF_SAMPLES; ++i)
{
Image image = ResourceImage::New( MATERIAL_SAMPLES[i] );
- Sampler sampler = Sampler::New(image, "sTexture");
Material material = Material::New( mShader );
- material.AddSampler( sampler );
+ material.AddTexture(image, "sTexture");
if( i==0 ) { firstMat = material; }
Renderer renderer = Renderer::New( mGeometry, material );
meshActor.SetSize(175, 175);
meshActor.RegisterProperty("index", (int)i);
- renderer.SetDepthIndex(0);
+ renderer.SetProperty( Renderer::Property::DEPTH_INDEX, 0 );
// Test with actor alpha
meshActor.SetParentOrigin( ParentOrigin::CENTER );
meshActor.SetAnchorPoint( AnchorPoint::CENTER );
meshActor.SetOpacity( i%2?0.7f:1.0f );
- Property::Index index=meshActor.RegisterProperty("hue", i/(float)NUMBER_OF_SAMPLES);
- meshActor.AddUniformMapping( index, "uHue" );
+ meshActor.RegisterProperty("uHue", i/(float)NUMBER_OF_SAMPLES);
meshActor.TouchedSignal().Connect(this, &ExampleController::OnTouched);
std::ostringstream oss;
mDepthIndices[index] = newDepthIndex;
Renderer renderer = actor.GetRendererAt(0);
- renderer.SetDepthIndex(newDepthIndex);
+ renderer.SetProperty( Renderer::Property::DEPTH_INDEX, newDepthIndex);
PrintDepths();
}