END_TEST;
}
+int UtcDaliModelColorMode(void)
+{
+ ToolkitTestApplication application;
+
+ Scene3D::Model model = Scene3D::Model::New(TEST_GLTF_FILE_NAME);
+ model.SetProperty(Dali::Actor::Property::SIZE, Vector2(50, 50));
+ model.SetProperty(Dali::Actor::Property::COLOR, Color::RED);
+
+ application.GetScene().Add(model);
+
+ application.SendNotification();
+ application.Render();
+
+ Actor actor = model.FindChildByName("AnimatedCube");
+ Vector4 childColor = actor[Dali::Actor::Property::COLOR];
+ Vector4 childWorldColor = actor[Dali::Actor::Property::WORLD_COLOR];
+
+ DALI_TEST_EQUALS(childColor, Color::WHITE, TEST_LOCATION);
+ DALI_TEST_EQUALS(childWorldColor, Color::RED, TEST_LOCATION);
+
+ END_TEST;
+}
+
// For ResourceReady
namespace
{
END_TEST;
}
+
+int UtcDaliSceneViewColorMode(void)
+{
+ ToolkitTestApplication application;
+
+ Scene3D::SceneView view = Scene3D::SceneView::New();
+ application.GetScene().Add(view);
+
+ DALI_TEST_EQUALS(view.GetChildAt(0u).GetProperty<int>(Dali::Actor::Property::COLOR_MODE), static_cast<int>(ColorMode::USE_OWN_MULTIPLY_PARENT_ALPHA), TEST_LOCATION);
+
+ view.UseFramebuffer(true);
+
+ DALI_TEST_EQUALS(view.GetChildAt(0u).GetProperty<int>(Dali::Actor::Property::COLOR_MODE), static_cast<int>(ColorMode::USE_OWN_COLOR), TEST_LOCATION);
+
+ view.UseFramebuffer(false);
+
+ DALI_TEST_EQUALS(view.GetChildAt(0u).GetProperty<int>(Dali::Actor::Property::COLOR_MODE), static_cast<int>(ColorMode::USE_OWN_MULTIPLY_PARENT_ALPHA), TEST_LOCATION);
+
+ END_TEST;
+}
Dali::Scene3D::Loader::Customization::Choices choices;
mModelRoot = Actor::New();
+ mModelRoot.SetProperty(Actor::Property::COLOR_MODE, ColorMode::USE_OWN_MULTIPLY_PARENT_COLOR);
BoundingVolume AABB;
for(auto iRoot : scene.GetRoots())
!Dali::Equals(currentFrameBuffer.GetColorTexture().GetWidth(), size.width) ||
!Dali::Equals(currentFrameBuffer.GetColorTexture().GetHeight(), size.height))
{
+ mRootLayer.SetProperty(Dali::Actor::Property::COLOR_MODE, ColorMode::USE_OWN_COLOR);
mRenderTask.ResetViewportGuideActor();
mRenderTask.SetViewport(Dali::Viewport(Vector4::ZERO));
mRenderTask.SetViewportGuideActor(Self());
if(mRenderTask.GetFrameBuffer())
{
+ mRootLayer.SetProperty(Dali::Actor::Property::COLOR_MODE, ColorMode::USE_OWN_MULTIPLY_PARENT_ALPHA);
FrameBuffer framebuffer;
mRenderTask.SetFrameBuffer(framebuffer);
mRenderTask.SetClearEnabled(false);
actor.RegisterProperty(ORIGINAL_MATRIX_PROPERTY_NAME, GetLocalSpace(), Property::AccessMode::READ_ONLY);
+ actor.SetProperty(Actor::Property::COLOR_MODE, ColorMode::USE_OWN_MULTIPLY_PARENT_COLOR);
+
for(auto& renderable : mRenderables)
{
renderable->OnCreate(*this, params, actor);