#include <dali/public-api/rendering/renderer.h>
#include <dali/public-api/rendering/texture-set.h>
#include <dali/public-api/rendering/shader.h>
-#include <dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h>
+#include <dali-toolkit/devel-api/controls/visual-factory/visual-factory.h>
using namespace Dali;
using namespace Dali::Toolkit;
return resourcePtr;
}
-void TestControlRendererRender( ToolkitTestApplication& application,
+void TestVisualRender( ToolkitTestApplication& application,
Actor& actor,
- ControlRenderer& controlRenderer,
+ Visual& visual,
std::size_t expectedSamplers = 0,
ImageDimensions imageDimensions = ImageDimensions(),
Integration::ResourcePointer resourcePtr = Integration::ResourcePointer())
actor.SetSize( 200.f, 200.f );
Stage::GetCurrent().Add( actor );
- controlRenderer.SetSize( Vector2(200.f, 200.f) );
- controlRenderer.SetOnStage( actor );
+ visual.SetSize( Vector2(200.f, 200.f) );
+ visual.SetOnStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
} // namespace
-void dali_renderer_factory_startup(void)
+void dali_visual_factory_startup(void)
{
test_return_value = TET_UNDEF;
}
-void dali_renderer_factory_cleanup(void)
+void dali_visual_factory_cleanup(void)
{
test_return_value = TET_PASS;
}
-int UtcDaliRendererFactoryGet(void)
+int UtcDaliVisualFactoryGet(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactory" );
+ tet_infoline( "UtcDaliVisualFactory" );
//Register type
TypeInfo type;
- type = TypeRegistry::Get().GetTypeInfo( "RendererFactory" );
+ type = TypeRegistry::Get().GetTypeInfo( "VisualFactory" );
DALI_TEST_CHECK( type );
BaseHandle handle = type.CreateInstance();
DALI_TEST_CHECK( handle );
- RendererFactory factory;
- factory = RendererFactory::Get();
+ VisualFactory factory;
+ factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
- RendererFactory newFactory = RendererFactory::Get();
+ VisualFactory newFactory = VisualFactory::Get();
DALI_TEST_CHECK( newFactory );
// Check that renderer factory is a singleton
END_TEST;
}
-int UtcDaliRendererFactoryCopyAndAssignment(void)
+int UtcDaliVisualFactoryCopyAndAssignment(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryCopyAndAssignment" );
- RendererFactory factory = RendererFactory::Get();
+ tet_infoline( "UtcDaliVisualFactoryCopyAndAssignment" );
+ VisualFactory factory = VisualFactory::Get();
- RendererFactory factoryCopy( factory );
+ VisualFactory factoryCopy( factory );
DALI_TEST_CHECK(factory == factoryCopy);
- RendererFactory emptyFactory;
- RendererFactory emptyFactoryCopy( emptyFactory );
+ VisualFactory emptyFactory;
+ VisualFactory emptyFactoryCopy( emptyFactory );
DALI_TEST_CHECK(emptyFactory == emptyFactoryCopy);
- RendererFactory factoryEquals;
+ VisualFactory factoryEquals;
factoryEquals = factory;
DALI_TEST_CHECK(factory == factoryEquals);
- RendererFactory emptyFactoryEquals;
+ VisualFactory emptyFactoryEquals;
emptyFactoryEquals = emptyFactory;
DALI_TEST_CHECK( emptyFactory == emptyFactoryEquals );
END_TEST;
}
-int UtcDaliRendererFactoryGetColorRenderer1(void)
+int UtcDaliVisualFactoryGetColorVisual1(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetColorRenderer1: Request color renderer with a Property::Map" );
+ tet_infoline( "UtcDaliVisualFactoryGetColorVisual1: Request color visual with a Property::Map" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
propertyMap.Insert("rendererType", "COLOR");
propertyMap.Insert("mixColor", testColor);
- ControlRenderer controlRenderer = factory.CreateControlRenderer(propertyMap);
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
- TestControlRendererRender( application, actor, controlRenderer );
+ TestVisualRender( application, actor, visual );
Vector4 actualValue(Vector4::ZERO);
TestGlAbstraction& gl = application.GetGlAbstraction();
END_TEST;
}
-int UtcDaliRendererFactoryGetColorRenderer2(void)
+int UtcDaliVisualFactoryGetColorVisual2(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetColorRenderer2: Request color renderer with a Vector4" );
+ tet_infoline( "UtcDaliVisualFactoryGetColorVisual2: Request color visual with a Vector4" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
Dali::Property::Map map;
map[ "rendererType" ] = "COLOR";
map[ "mixColor" ] = testColor;
- ControlRenderer controlRenderer = factory.CreateControlRenderer( map );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( map );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
- TestControlRendererRender( application, actor, controlRenderer );
+ TestVisualRender( application, actor, visual );
Vector4 actualValue(Vector4::ZERO);
TestGlAbstraction& gl = application.GetGlAbstraction();
DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "mixColor", actualValue ) );
DALI_TEST_EQUALS( actualValue, testColor, TEST_LOCATION );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
}
-int UtcDaliRendererFactoryGetBorderRenderer1(void)
+int UtcDaliVisualFactoryGetBorderVisual1(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetBorderRenderer1: Request border renderer with a Property::Map" );
+ tet_infoline( "UtcDaliVisualFactoryGetBorderVisual1: Request border visual with a Property::Map" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
propertyMap.Insert("borderColor", testColor);
propertyMap.Insert("borderSize", testSize);
- ControlRenderer controlRenderer = factory.CreateControlRenderer(propertyMap);
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
actor.SetSize(200.f, 200.f);
Stage::GetCurrent().Add( actor );
- controlRenderer.SetSize(Vector2(200.f, 200.f));
- controlRenderer.SetOnStage( actor );
+ visual.SetSize(Vector2(200.f, 200.f));
+ visual.SetOnStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
int blendMode = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::BLEND_MODE );
DALI_TEST_CHECK( gl.GetUniformValue<float>( "borderSize", actualSize ) );
DALI_TEST_EQUALS( actualSize, testSize, TEST_LOCATION );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
}
-int UtcDaliRendererFactoryGetBorderRenderer2(void)
+int UtcDaliVisualFactoryGetBorderVisual2(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetBorderRenderer2: Request border renderer with a borderSize and a borderColor" );
+ tet_infoline( "UtcDaliVisualFactoryGetBorderVisual2: Request border visual with a borderSize and a borderColor" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Vector4 testColor( 1.f, 0.5f, 0.3f, 1.f );
propertyMap[ "rendererType" ] = "BORDER";
propertyMap[ "borderColor" ] = testColor;
propertyMap[ "borderSize" ] = testSize;
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
actor.SetSize(200.f, 200.f);
Stage::GetCurrent().Add( actor );
- controlRenderer.SetSize(Vector2(200.f, 200.f));
- controlRenderer.SetOnStage( actor );
+ visual.SetSize(Vector2(200.f, 200.f));
+ visual.SetOnStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
DALI_TEST_CHECK( gl.GetUniformValue<float>( "borderSize", actualSize ) );
DALI_TEST_EQUALS( actualSize, testSize, TEST_LOCATION );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
// enable the anti-aliasing
Dali::Property::Map map;
map[ "borderColor" ] = testColor;
map[ "borderSize" ] = testSize;
map[ "antiAliasing" ] = true;
- controlRenderer = factory.CreateControlRenderer( map );
- controlRenderer.SetOnStage( actor );
+ visual = factory.CreateVisual( map );
+ visual.SetOnStage( actor );
application.SendNotification();
application.Render(0);
END_TEST;
}
-int UtcDaliRendererFactoryGetLinearGradientRenderer(void)
+int UtcDaliVisualFactoryGetLinearGradientVisual(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliRendererFactoryGetRadialGradientRenderer");
+ tet_infoline("UtcDaliVisualFactoryGetRadialGradientVisual");
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
stopColors.PushBack( Color::GREEN );
propertyMap.Insert("stopColor", stopColors);
- ControlRenderer controlRenderer = factory.CreateControlRenderer(propertyMap);
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK( visual );
// A lookup texture is generated and pass to shader as sampler
Actor actor = Actor::New();
- TestControlRendererRender( application, actor, controlRenderer, 1u );
+ TestVisualRender( application, actor, visual, 1u );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
}
-int UtcDaliRendererFactoryGetRadialGradientRenderer(void)
+int UtcDaliVisualFactoryGetRadialGradientVisual(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliRendererFactoryGetRadialGradientRenderer");
+ tet_infoline("UtcDaliVisualFactoryGetRadialGradientVisual");
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
stopColors.PushBack( Color::GREEN );
propertyMap.Insert("stopColor", stopColors);
- ControlRenderer controlRenderer = factory.CreateControlRenderer(propertyMap);
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK( visual );
// A lookup texture is generated and pass to shader as sampler
Actor actor = Actor::New();
- TestControlRendererRender( application, actor, controlRenderer, 1u );
+ TestVisualRender( application, actor, visual, 1u );
Matrix3 alignMatrix( radius, 0.f, 0.f, 0.f, radius, 0.f, center.x, center.y, 1.f );
alignMatrix.Invert();
END_TEST;
}
-int UtcDaliRendererFactoryDefaultOffsetsGradientRenderer(void)
+int UtcDaliVisualFactoryDefaultOffsetsGradientVisual(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliRendererFactoryGetRadialGradientRenderer");
+ tet_infoline("UtcDaliVisualFactoryGetRadialGradientVisual");
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
stopColors.PushBack( Color::GREEN );
propertyMap.Insert("stopColor", stopColors);
- ControlRenderer controlRenderer = factory.CreateControlRenderer(propertyMap);
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual(propertyMap);
+ DALI_TEST_CHECK( visual );
// A lookup texture is generated and pass to shader as sampler
Actor actor = Actor::New();
- TestControlRendererRender( application, actor, controlRenderer, 1u );
+ TestVisualRender( application, actor, visual, 1u );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
}
-int UtcDaliRendererFactoryGetImageRenderer1(void)
+int UtcDaliVisualFactoryGetImageVisual1(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetImageRenderer1: Request image renderer with a Property::Map" );
+ tet_infoline( "UtcDaliVisualFactoryGetImageVisual1: Request image renderer with a Property::Map" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_IMAGE_FILE_NAME );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
// For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied.
Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD );
bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, width, height,width, height );
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(width, height),
Integration::ResourcePointer( bitmap ) );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
END_TEST;
}
-int UtcDaliRendererFactoryGetImageRenderer2(void)
+int UtcDaliVisualFactoryGetImageVisual2(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetImageRenderer2: Request image renderer with an image handle" );
+ tet_infoline( "UtcDaliVisualFactoryGetImageVisual2: Request image renderer with an image handle" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME);
- ControlRenderer controlRenderer = factory.CreateControlRenderer( image );
+ Visual visual = factory.CreateVisual( image );
Actor actor = Actor::New();
// For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied.
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(width, height),
Integration::ResourcePointer(bitmap) );
END_TEST;
}
-int UtcDaliRendererFactoryGetNPatchRenderer1(void)
+int UtcDaliVisualFactoryGetNPatchVisual1(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetNPatchRenderer1: Request 9-patch renderer with a Property::Map" );
+ tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual1: Request 9-patch renderer with a Property::Map" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
const unsigned int ninePatchImageHeight = 18;
propertyMap.Insert( "url", TEST_NPATCH_FILE_NAME );
{
tet_infoline( "whole grid" );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
ninePatchResource );
propertyMap.Insert( "borderOnly", true );
{
tet_infoline( "border only" );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
ninePatchResource );
END_TEST;
}
-int UtcDaliRendererFactoryGetNPatchRenderer2(void)
+int UtcDaliVisualFactoryGetNPatchVisual2(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetNPatchRenderer2: Request n-patch renderer with a Property::Map" );
+ tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual2: Request n-patch renderer with a Property::Map" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
const unsigned int ninePatchImageWidth = 18;
propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_NPATCH_FILE_NAME );
{
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
TestGlAbstraction& gl = application.GetGlAbstraction();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
ninePatchResource );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
propertyMap.Insert( "borderOnly", true );
{
tet_infoline( "border only" );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
TestGlAbstraction& gl = application.GetGlAbstraction();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
Actor actor = Actor::New();
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
ninePatchResource );
DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
}
END_TEST;
}
-int UtcDaliRendererFactoryGetNPatchRenderer3(void)
+int UtcDaliVisualFactoryGetNPatchVisual3(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetNPatchRenderer3: Request 9-patch renderer with an image url" );
+ tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual3: Request 9-patch renderer with an image url" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
const unsigned int ninePatchImageHeight = 18;
stretchRangesY.PushBack( Uint16Pair( 4, 5 ) );
Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( TEST_NPATCH_FILE_NAME, ImageDimensions() );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( TEST_NPATCH_FILE_NAME, ImageDimensions() );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
ninePatchResource );
END_TEST;
}
-int UtcDaliRendererFactoryGetNPatchRenderer4(void)
+int UtcDaliVisualFactoryGetNPatchVisual4(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetNPatchRenderer4: Request n-patch renderer with an image url" );
+ tet_infoline( "UtcDaliVisualFactoryGetNPatchVisual4: Request n-patch visual with an image url" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
const unsigned int ninePatchImageHeight = 18;
stretchRangesY.PushBack( Uint16Pair( 25, 27 ) );
Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( TEST_NPATCH_FILE_NAME, ImageDimensions() );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( TEST_NPATCH_FILE_NAME, ImageDimensions() );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(ninePatchImageWidth, ninePatchImageHeight),
ninePatchResource );
END_TEST;
}
-int UtcDaliRendererFactoryGetNPatchRendererN1(void)
+int UtcDaliVisualFactoryGetNPatchVisualN1(void)
{
//This should still load but display an error image
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetNPatchRendererN: Request n-patch renderer with an invalid image url" );
+ tet_infoline( "UtcDaliVisualFactoryGetNPatchVisualN: Request n-patch visual with an invalid image url" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( "ERROR.9.jpg", ImageDimensions() );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( "ERROR.9.jpg", ImageDimensions() );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(),
Integration::ResourcePointer(bitmap) );
END_TEST;
}
-int UtcDaliRendererFactoryGetNPatchRendererN2(void)
+int UtcDaliVisualFactoryGetNPatchVisualN2(void)
{
//This should still load but display an error image
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetNPatchRendererN: Request n-patch renderer with an invalid Property::Map" );
+ tet_infoline( "UtcDaliVisualFactoryGetNPatchVisualN: Request n-patch visual with an invalid Property::Map" );
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
propertyMap.Insert( "rendererType", 111 );
propertyMap.Insert( "url", "ERROR.9.jpg" );
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
Actor actor = Actor::New();
TraceCallStack& textureTrace = gl.GetTextureTrace();
textureTrace.Enable(true);
- TestControlRendererRender( application, actor, controlRenderer, 1u,
+ TestVisualRender( application, actor, visual, 1u,
ImageDimensions(),
Integration::ResourcePointer(bitmap) );
END_TEST;
}
-int UtcDaliRendererFactoryGetSvgRenderer(void)
+int UtcDaliVisualFactoryGetSvgVisual(void)
{
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetSvgRenderer: Request svg renderer with a svg url" );
+ tet_infoline( "UtcDaliVisualFactoryGetSvgVisual: Request svg visual with a svg url" );
- RendererFactory factory = RendererFactory::Get();
- ControlRenderer controlRenderer = factory.CreateControlRenderer( TEST_SVG_FILE_NAME, ImageDimensions() );
- DALI_TEST_CHECK( controlRenderer );
+ VisualFactory factory = VisualFactory::Get();
+ Visual visual = factory.CreateVisual( TEST_SVG_FILE_NAME, ImageDimensions() );
+ DALI_TEST_CHECK( visual );
TestGlAbstraction& gl = application.GetGlAbstraction();
TraceCallStack& textureTrace = gl.GetTextureTrace();
Actor actor = Actor::New();
actor.SetSize( 200.f, 200.f );
Stage::GetCurrent().Add( actor );
- controlRenderer.SetSize( Vector2(200.f, 200.f) );
- controlRenderer.SetOnStage( actor );
+ visual.SetSize( Vector2(200.f, 200.f) );
+ visual.SetOnStage( actor );
application.SendNotification();
application.Render();
//Creates a mesh renderer from the given propertyMap and tries to load it on stage in the given application.
//This is expected to succeed, which will then pass the test.
-void MeshRendererLoadsCorrectlyTest( Property::Map& propertyMap, ToolkitTestApplication& application )
+void MeshVisualLoadsCorrectlyTest( Property::Map& propertyMap, ToolkitTestApplication& application )
{
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
- //Create a mesh renderer.
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ //Create a mesh visual.
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
- //Create an actor on stage to house the renderer.
+ //Create an actor on stage to house the visual.
Actor actor = Actor::New();
actor.SetSize( 200.f, 200.f );
Stage::GetCurrent().Add( actor );
- controlRenderer.SetSize( Vector2( 200.f, 200.f ) );
- controlRenderer.SetOnStage( actor );
+ visual.SetSize( Vector2( 200.f, 200.f ) );
+ visual.SetOnStage( actor );
//Ensure set on stage.
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( actualScaleMatrix, testScaleMatrix, Math::MACHINE_EPSILON_100, TEST_LOCATION );
//Finish by setting off stage, and ensuring this was successful.
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
}
-//Creates a mesh renderer from the given propertyMap and tries to load it on stage in the given application.
+//Creates a mesh visual from the given propertyMap and tries to load it on stage in the given application.
//This is expected to fail, which will then pass the test.
-void MeshRendererDoesNotLoadCorrectlyTest( Property::Map& propertyMap, ToolkitTestApplication& application )
+void MeshVisualDoesNotLoadCorrectlyTest( Property::Map& propertyMap, ToolkitTestApplication& application )
{
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
- //Create a mesh renderer.
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ //Create a mesh visual.
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
- //Create an actor on stage to house the renderer.
+ //Create an actor on stage to house the visual.
Actor actor = Actor::New();
actor.SetSize( 200.f, 200.f );
Stage::GetCurrent().Add( actor );
- controlRenderer.SetSize( Vector2( 200.f, 200.f ) );
- controlRenderer.SetOnStage( actor );
+ visual.SetSize( Vector2( 200.f, 200.f ) );
+ visual.SetOnStage( actor );
//Ensure set on stage.
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
DALI_TEST_CHECK( !application.GetGlAbstraction().GetUniformValue<Matrix>( "uObjectMatrix", scaleMatrix ) );
//Finish by setting off stage, and ensuring this was successful.
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
}
//Test if mesh loads correctly when supplied with only the bare minimum requirements, an object file.
-int UtcDaliRendererFactoryGetMeshRenderer1(void)
+int UtcDaliVisualFactoryGetMeshVisual1(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer1: Request mesh renderer with a valid object file only" );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual1: Request mesh visual with a valid object file only" );
+
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
END_TEST;
}
+
//Test if mesh loads correctly when supplied with an object file as well as a blank material file and images directory.
-int UtcDaliRendererFactoryGetMeshRenderer2(void)
+int UtcDaliVisualFactoryGetMeshVisual2(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer2: Request mesh renderer with blank material file and images directory" );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual2: Request mesh visual with blank material file and images directory" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "texturesPath", "" );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
END_TEST;
}
//Test if mesh loads correctly when supplied with all main parameters, an object file, a material file and a directory location.
-int UtcDaliRendererFactoryGetMeshRenderer3(void)
+int UtcDaliVisualFactoryGetMeshVisual3(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer3: Request mesh renderer with all parameters correct" );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual3: Request mesh visual with all parameters correct" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
END_TEST;
}
-//Test if mesh renderer can load a correctly supplied mesh without a normal map or gloss map in the material file.
-int UtcDaliRendererFactoryGetMeshRenderer4(void)
+//Test if mesh visual can load a correctly supplied mesh without a normal map or gloss map in the material file.
+int UtcDaliVisualFactoryGetMeshVisual4(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer4: Request mesh renderer with diffuse texture but not normal or gloss." );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual4: Request mesh visual with diffuse texture but not normal or gloss." );
- //Set up renderer properties.
+
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
+
END_TEST;
}
-//Test if mesh renderer can load when made to use diffuse textures only.
-int UtcDaliRendererFactoryGetMeshRenderer5(void)
+//Test if mesh visual can load when made to use diffuse textures only.
+int UtcDaliVisualFactoryGetMeshVisual5(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer5: Request mesh renderer and make it only use diffuse textures." );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual5: Request mesh visual and make it only use diffuse textures." );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "shaderType", "DIFFUSE_TEXTURE" );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
+
END_TEST;
}
-//Test if mesh renderer can load when made to not use the supplied textures.
-int UtcDaliRendererFactoryGetMeshRenderer6(void)
+//Test if mesh visual can load when made to not use the supplied textures.
+int UtcDaliVisualFactoryGetMeshVisual6(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer6: Request mesh renderer and make it not use any textures." );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual6: Request mesh visual and make it not use any textures." );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "shaderType", "TEXTURELESS" );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
END_TEST;
}
-//Test if mesh renderer loads correctly when light position is manually set.
-int UtcDaliRendererFactoryGetMeshRenderer7(void)
+//Test if mesh visual loads correctly when light position is manually set.
+int UtcDaliVisualFactoryGetMeshVisual7(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer7: Request mesh renderer with custom light position." );
- //Set up renderer properties.
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual7: Request mesh visual with custom light position." );
+
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "lightPosition", Vector3( 0.0, 1.0, 2.0 ) );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
END_TEST;
}
-//Test if mesh renderer loads correctly when supplied an object file without face normals or texture points.
+//Test if mesh visual loads correctly when supplied an object file without face normals or texture points.
//Note that this notably tests object loader functionality.
-int UtcDaliRendererFactoryGetMeshRenderer8(void)
+int UtcDaliVisualFactoryGetMeshVisual8(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRenderer5: Request mesh renderer with normal-less object file." );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisual5: Request mesh visual with normal-less object file." );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_SIMPLE_OBJ_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Test to see if mesh loads correctly.
- MeshRendererLoadsCorrectlyTest( propertyMap, application );
+ MeshVisualLoadsCorrectlyTest( propertyMap, application );
END_TEST;
}
-//Test if mesh renderer handles the case of lacking an object file.
-int UtcDaliRendererFactoryGetMeshRendererN1(void)
+//Test if mesh visual handles the case of lacking an object file.
+int UtcDaliVisualFactoryGetMeshVisualN1(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRendererN1: Request mesh renderer without object file" );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisualN1: Request mesh visual without object file" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Test to see if mesh doesn't load with these properties, as expected.
- MeshRendererDoesNotLoadCorrectlyTest( propertyMap, application );
+ MeshVisualDoesNotLoadCorrectlyTest( propertyMap, application );
+
END_TEST;
}
-//Test if mesh renderer handles the case of being passed invalid material and images urls.
-int UtcDaliRendererFactoryGetMeshRendererN2(void)
+//Test if mesh visual handles the case of being passed invalid material and images urls.
+int UtcDaliVisualFactoryGetMeshVisualN2(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetMeshRendererN2: Request mesh renderer with invalid material and images urls" );
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisualN2: Request mesh visual with invalid material and images urls" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "texturesPath", "also invalid" );
//Test to see if mesh doesn't load with these properties, as expected.
- MeshRendererDoesNotLoadCorrectlyTest( propertyMap, application );
+ MeshVisualDoesNotLoadCorrectlyTest( propertyMap, application );
+
END_TEST;
}
-//Test if mesh renderer handles the case of being passed an invalid object url
-int UtcDaliRendererFactoryGetMeshRendererN3(void)
+//Test if mesh visual handles the case of being passed an invalid object url
+int UtcDaliVisualFactoryGetMeshVisualN3(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
+ tet_infoline( "UtcDaliVisualFactoryGetMeshVisualN3: Request mesh visual with invalid object url" );
- tet_infoline( "UtcDaliRendererFactoryGetMeshRendererN3: Request mesh renderer with invalid object url" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", "invalid" );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Test to see if mesh doesn't load with these properties, as expected.
- MeshRendererDoesNotLoadCorrectlyTest( propertyMap, application );
+ MeshVisualDoesNotLoadCorrectlyTest( propertyMap, application );
END_TEST;
}
-//Creates a primitive renderer with the given property map and tests to see if it correctly loads in the given application.
-void TestPrimitiveRendererWithProperties( Property::Map& propertyMap, ToolkitTestApplication& application )
+//Creates a primitive visual with the given property map and tests to see if it correctly loads in the given application.
+void TestPrimitiveVisualWithProperties( Property::Map& propertyMap, ToolkitTestApplication& application )
{
- RendererFactory factory = RendererFactory::Get();
+ VisualFactory factory = VisualFactory::Get();
DALI_TEST_CHECK( factory );
- //Create a primitive renderer.
- ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
- DALI_TEST_CHECK( controlRenderer );
+ //Create a primitive visual.
+ Visual visual = factory.CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
- //Create an actor on stage to house the renderer.
+ //Create an actor on stage to house the visual.
Actor actor = Actor::New();
actor.SetSize( 200.f, 200.f );
Stage::GetCurrent().Add( actor );
- controlRenderer.SetSize( Vector2( 200.f, 200.f ) );
- controlRenderer.SetOnStage( actor );
+ visual.SetSize( Vector2( 200.f, 200.f ) );
+ visual.SetOnStage( actor );
//Ensure set on stage.
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
- //Tell test application to load the renderer.
+ //Tell test application to load the visual.
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actualScaleMatrix, testScaleMatrix, Math::MACHINE_EPSILON_100, TEST_LOCATION );
//Finish by setting off stage, and ensuring this was successful.
- controlRenderer.SetOffStage( actor );
+ visual.SetOffStage( actor );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
}
//Test if primitive shape loads correctly when supplied with only the bare minimum requirements, the shape to use.
-int UtcDaliRendererFactoryGetPrimitiveRenderer1(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual1(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer1: Request primitive renderer with a shape only" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual1: Request primitive visual with a shape only" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "CUBE" );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape loads correctly when supplied with all possible parameters
-int UtcDaliRendererFactoryGetPrimitiveRenderer2(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual2(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer2: Request primitive renderer with everything" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual2: Request primitive visual with everything" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "CUBE" );
propertyMap.Insert( "lightPosition", Vector3( 0.9, 1.0, 1.1 ) );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape loads a sphere correctly.
-int UtcDaliRendererFactoryGetPrimitiveRenderer3(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual3(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer3: Request primitive renderer to display a sphere" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual3: Request primitive visual to display a sphere" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "SPHERE" );
propertyMap.Insert( "stacks", 20 );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape loads a conic section correctly.
-int UtcDaliRendererFactoryGetPrimitiveRenderer4(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual4(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer4: Request primitive renderer to display a conic section" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual4: Request primitive visual to display a conic section" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "CONICAL_FRUSTRUM" );
propertyMap.Insert( "scaleHeight", 50.0f );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape loads a bevelled cube correctly.
-int UtcDaliRendererFactoryGetPrimitiveRenderer5(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual5(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer5: Request primitive renderer to display a bevelled cube" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual5: Request primitive visual to display a bevelled cube" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "BEVELLED_CUBE" );
propertyMap.Insert( "bevelPercentage", 0.7f );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape loads an octahedron correctly.
-int UtcDaliRendererFactoryGetPrimitiveRenderer6(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual6(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer6: Request primitive renderer to display an octahedron" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual6: Request primitive visual to display an octahedron" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "OCTAHEDRON" );
propertyMap.Insert( "shapeColor", Vector4( 0.5, 0.5, 0.5, 1.0 ) );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape loads a cone correctly.
-int UtcDaliRendererFactoryGetPrimitiveRenderer7(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual7(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer7: Request primitive renderer to display a cone" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual7: Request primitive visual to display a cone" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "CONE" );
propertyMap.Insert( "scaleHeight", 50.0f );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape loads correctly when light position is manually set.
-int UtcDaliRendererFactoryGetPrimitiveRenderer8(void)
+int UtcDaliVisualFactoryGetPrimitiveVisual8(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRenderer8: Request primitive renderer with set light position" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual8: Request primitive visual with set light position" );
- //Set up renderer properties.
+ //Set up visual properties.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
propertyMap.Insert( "shape", "SPHERE" );
propertyMap.Insert( "lightPosition", Vector3( 0.0, 1.0, 2.0 ) );
//Test to see if shape loads correctly.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}
//Test if primitive shape renderer handles the case of not being passed a specific shape to use.
-int UtcDaliRendererFactoryGetPrimitiveRendererN1(void)
+int UtcDaliVisualFactoryGetPrimitiveVisualN1(void)
{
//Set up test application first, so everything else can be handled.
ToolkitTestApplication application;
- tet_infoline( "UtcDaliRendererFactoryGetPrimitiveRendererN1: Request primitive renderer without shape" );
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisualN1: Request primitive visual without shape" );
- //Set up renderer properties, without supplying shape.
+ //Set up visual properties, without supplying shape.
Property::Map propertyMap;
propertyMap.Insert( "rendererType", "PRIMITIVE" );
//Test to see if shape loads regardless of missing input.
- TestPrimitiveRendererWithProperties( propertyMap, application );
+ TestPrimitiveVisualWithProperties( propertyMap, application );
END_TEST;
}