/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
TestApplication application;
BufferImage img = BufferImage::New( 1,1 );
// create two transparent actors so there is something to sort
- ImageActor actor = ImageActor::New( img );
- ImageActor actor2 = ImageActor::New( img );
+ Actor actor = CreateRenderableActor( img );
+ Actor actor2 = CreateRenderableActor( img );
actor.SetSize(1,1);
actor.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
actor2.SetSize(1,1);
tet_infoline("Testing Dali::Layer::SetDepthTestDisabled() ");
Layer actor = Layer::New();
+ // Note that IsDepthTestDisabled does not depend on layer behavior,
+ // as 2D layers can still have depth tests performed on a per-renderer basis.
+ // Check default.
DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
- actor.SetBehavior( Layer::LAYER_3D );
-
- Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
- DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_3D", TEST_LOCATION );
+ // Check Set / Unset.
+ actor.SetDepthTestDisabled( false );
DALI_TEST_CHECK( !actor.IsDepthTestDisabled() );
-
actor.SetDepthTestDisabled( true );
DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
+
END_TEST;
}
// Add at least one renderable actor so the GL calls are actually made
BufferImage img = BufferImage::New( 1,1 );
- Actor actor = ImageActor::New( img );
+ Actor actor = CreateRenderableActor( img );
stage.Add( actor );
// flush the queue and render once