Actor's Transformation API Cleanup
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-MeshActor.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 #include <iostream>
19
20 #include <stdlib.h>
21 #include <dali/public-api/dali-core.h>
22 #include <dali-test-suite-utils.h>
23
24 using namespace Dali;
25
26 #include <mesh-builder.h>
27
28 void mesh_actor_test_startup(void)
29 {
30   test_return_value = TET_UNDEF;
31 }
32
33 void mesh_actor_test_cleanup(void)
34 {
35   test_return_value = TET_PASS;
36 }
37
38 namespace
39 {
40
41 static Mesh NewMesh()
42 {
43   MeshData meshData;
44   MeshData::VertexContainer    vertices;
45   MeshData::FaceIndices        faces;
46   BoneContainer                bones;
47   ConstructVertices(vertices, 60);
48   ConstructFaces(vertices, faces);
49   Material customMaterial = ConstructMaterial();
50   meshData.SetData(vertices, faces, bones, customMaterial);
51   Mesh mesh = Mesh::New(meshData);
52   return mesh;
53 }
54
55 static AnimatableMesh NewAnimatableMesh()
56 {
57   AnimatableMesh::Faces faces;
58   faces.push_back(0);
59   faces.push_back(1);
60   faces.push_back(2);
61
62   Material customMaterial = Material::New("CustomMaterial");
63   customMaterial.SetOpacity(.76f);
64   customMaterial.SetDiffuseColor(Vector4(0.8f, 0.0f, 0.4f, 1.0f));
65   customMaterial.SetAmbientColor(Vector4(0.2f, 1.0f, 0.6f, 1.0f));
66   customMaterial.SetSpecularColor(Vector4(0.5f, 0.6f, 0.7f, 1.0f));
67
68   AnimatableMesh mesh = AnimatableMesh::New( 10u, faces, customMaterial );
69   return mesh;
70 }
71 } // anonymous namespace
72
73 int UtcDaliMeshActorConstructorVoid(void)
74 {
75   TestApplication application;
76   tet_infoline("Testing Dali::MeshActor::MeshActor()");
77
78   MeshActor actor;
79   DALI_TEST_CHECK(!actor);
80   END_TEST;
81 }
82
83 int UtcDaliMeshActorNew01(void)
84 {
85   TestApplication application;
86   tet_infoline("Testing Dali::MeshActor::New()");
87
88   AnimatableMesh mesh = NewAnimatableMesh();
89   MeshActor actor = MeshActor::New(mesh);
90   application.SendNotification();
91   application.Render();
92   application.Render();
93   application.SendNotification();
94
95   DALI_TEST_CHECK(actor);
96   END_TEST;
97 }
98
99
100 int UtcDaliMeshActorNew03(void)
101 {
102   TestApplication application;
103   tet_infoline("Testing Dali::Mesh::New() - Create with no mesh");
104
105   try
106   {
107     MeshActor actor = MeshActor::New(); // Shouldn't assert
108     tet_result(TET_PASS);
109   }
110   catch (Dali::DaliException& e)
111   {
112     tet_result(TET_FAIL);
113   }
114
115   END_TEST;
116 }
117
118 int UtcDaliMeshActorCreateNoMeshData(void)
119 {
120   TestApplication application;
121   tet_infoline("Testing Dali::Mesh::New() - Create with no mesh data");
122
123   try
124   {
125     MeshData meshData;
126     Mesh mesh = Mesh::New(meshData);
127     MeshActor actor1 = MeshActor::New(mesh);
128   }
129   catch(Dali::DaliException& e)
130   {
131     DALI_TEST_PRINT_ASSERT( e );
132     DALI_TEST_ASSERT(e, "object", TEST_LOCATION);
133   }
134   END_TEST;
135 }
136
137
138 int UtcDaliMeshActorCreateSetData01(void)
139 {
140   TestApplication application;
141   tet_infoline("Testing Dali::MeshData::SetData() - Create with no verts");
142   try
143   {
144     MeshData meshData;
145     MeshData::VertexContainer vertices;
146     MeshData::FaceIndices     faces;
147     BoneContainer             bones;
148     Material                  customMaterial;
149     meshData.SetData(vertices, faces, bones, customMaterial);
150     Mesh mesh = Mesh::New(meshData);
151     MeshActor actor1 = MeshActor::New(mesh);
152   }
153   catch(Dali::DaliException& e)
154   {
155     DALI_TEST_PRINT_ASSERT( e );
156     DALI_TEST_ASSERT(e, "!vertices.empty()", TEST_LOCATION );
157   }
158   END_TEST;
159 }
160
161 int UtcDaliMeshActorCreateSetData02(void)
162 {
163   TestApplication application;
164   tet_infoline("Testing Dali::MeshData::SetData - Create with no faces");
165   try
166   {
167     MeshData meshData;
168     MeshData::VertexContainer    vertices;
169     MeshData::FaceIndices        faces;
170     BoneContainer                bones;
171     Material                     customMaterial;
172     ConstructVertices(vertices, 60);
173     meshData.SetData(vertices, faces, bones, customMaterial);
174     Mesh mesh = Mesh::New(meshData);
175     MeshActor actor1 = MeshActor::New(mesh);
176   }
177   catch(Dali::DaliException& e)
178   {
179     DALI_TEST_PRINT_ASSERT( e );
180     DALI_TEST_ASSERT(e, "!faceIndices.empty", TEST_LOCATION );
181   }
182   END_TEST;
183 }
184
185 int UtcDaliMeshActorCreateSetData03(void)
186 {
187   TestApplication application;
188   tet_infoline("Testing Dali::MeshData::SetData - Create with no mats");
189   try
190   {
191     MeshData meshData;
192     MeshData::VertexContainer    vertices;
193     MeshData::FaceIndices        faces;
194     BoneContainer                bones;
195     Material                     customMaterial;
196     ConstructVertices(vertices, 60);
197     ConstructFaces(vertices, faces);
198     meshData.SetData(vertices, faces, bones, customMaterial);
199     Mesh mesh = Mesh::New(meshData);
200     MeshActor actor1 = MeshActor::New(mesh);
201   }
202   catch(Dali::DaliException& e)
203   {
204     DALI_TEST_PRINT_ASSERT( e );
205     DALI_TEST_ASSERT(e, "material", TEST_LOCATION );
206   }
207   END_TEST;
208 }
209
210 int UtcDaliMeshActorCreateSetData04(void)
211 {
212   TestApplication application;
213   tet_infoline("Testing Dali::MeshActor::SetData()");
214
215   MeshData meshData;
216   MeshData::VertexContainer    vertices;
217   MeshData::FaceIndices        faces;
218   BoneContainer                bones;
219   ConstructVertices(vertices, 60);
220   ConstructFaces(vertices, faces);
221   Material customMaterial = ConstructMaterial();
222   meshData.SetData(vertices, faces, bones, customMaterial);
223
224   Mesh mesh = Mesh::New(meshData);
225   MeshActor actor1 = MeshActor::New(mesh);
226   DALI_TEST_CHECK(actor1);
227   END_TEST;
228 }
229
230
231 int UtcDaliMeshActorDownCast(void)
232 {
233   TestApplication application;
234   tet_infoline("Testing Dali::MeshActor::DownCast()");
235
236   MeshData meshData;
237   MeshData::VertexContainer    vertices;
238   MeshData::FaceIndices        faces;
239   BoneContainer                bones;
240   ConstructVertices(vertices, 60);
241   ConstructFaces(vertices, faces);
242   Material customMaterial = ConstructMaterial();
243   meshData.SetData(vertices, faces, bones, customMaterial);
244   Mesh mesh = Mesh::New(meshData);
245
246   MeshActor actor1 = MeshActor::New(mesh);
247   Actor anActor = Actor::New();
248   anActor.Add(actor1);
249
250   Actor child = anActor.GetChildAt(0);
251   MeshActor meshActor = MeshActor::DownCast(child);
252
253   DALI_TEST_CHECK(meshActor);
254   END_TEST;
255 }
256
257 int UtcDaliMeshActorDownCast2(void)
258 {
259   TestApplication application;
260   tet_infoline("Testing Dali::MeshActor::DownCast()");
261
262   Actor actor1 = Actor::New();
263   Actor anActor = Actor::New();
264   anActor.Add(actor1);
265
266   Actor child = anActor.GetChildAt(0);
267   MeshActor meshActor = MeshActor::DownCast(child);
268   DALI_TEST_CHECK(!meshActor);
269
270   Actor unInitialzedActor;
271   meshActor = DownCast< MeshActor >( unInitialzedActor );
272   DALI_TEST_CHECK(!meshActor);
273   END_TEST;
274 }
275
276 int UtcDaliMeshActorSetMaterial01(void)
277 {
278   TestApplication application;
279   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
280
281   Mesh mesh = NewMesh();
282
283   MeshActor actor = MeshActor::New(mesh);
284   std::string name = "AMeshActor";
285   Stage::GetCurrent().Add(actor);
286   actor.SetName(name);
287   application.SendNotification();
288   application.Render();
289   application.Render();
290   application.SendNotification();
291
292   Material customMaterial = Material::New("CustomMaterial");
293   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
294
295   MeshActor::SetMaterial(actor, name, customMaterial);
296   application.SendNotification();
297   application.Render();
298   application.Render();
299   application.SendNotification();
300
301   DALI_TEST_CHECK( actor.GetMaterial() == customMaterial );
302   END_TEST;
303 }
304
305 int UtcDaliMeshActorSetMaterial01b(void)
306 {
307   TestApplication application;
308   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
309
310   Mesh mesh = NewMesh();
311
312   Actor rootActor = Actor::New();
313   MeshActor meshActor = MeshActor::New(mesh);
314   rootActor.Add(meshActor);
315
316   std::string name = "AMeshActor";
317   meshActor.SetName(name);
318
319   Stage::GetCurrent().Add(rootActor);
320   application.SendNotification();
321   application.Render();
322   application.Render();
323   application.SendNotification();
324
325   Material customMaterial = Material::New("CustomMaterial");
326   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
327
328   MeshActor::SetMaterial(rootActor, name, customMaterial);
329   application.SendNotification();
330   application.Render();
331   application.Render();
332   application.SendNotification();
333
334   DALI_TEST_CHECK(meshActor.GetMaterial() == customMaterial );
335   END_TEST;
336 }
337
338
339 int UtcDaliMeshActorSetMaterial02(void)
340 {
341   TestApplication application;
342   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
343
344   Mesh mesh = NewMesh();
345   MeshActor actor = MeshActor::New(mesh);
346
347   std::string name = "AMeshActor";
348   actor.SetName(name);
349   Stage::GetCurrent().Add(actor);
350   application.SendNotification();
351   application.Render();
352   application.Render();
353   application.SendNotification();
354
355   Material baseMat = actor.GetMaterial();
356   Material customMaterial = Material::New("CustomMaterial");
357   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
358
359   MeshActor::SetMaterial(actor, "NoName", customMaterial);
360   application.SendNotification();
361   application.Render();
362   application.Render();
363   application.SendNotification();
364
365   DALI_TEST_CHECK( actor.GetMaterial() == baseMat );
366   DALI_TEST_CHECK( actor.GetMaterial() != customMaterial );
367   END_TEST;
368 }
369
370 int UtcDaliMeshActorSetMaterial02b(void)
371 {
372   TestApplication application;
373   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
374
375   Mesh mesh = NewMesh();
376
377   MeshActor actor = MeshActor::New(mesh);
378   Stage::GetCurrent().Add(actor);
379
380   std::string name = "AMeshActor";
381   actor.SetName(name);
382   application.SendNotification();
383   application.Render();
384   application.Render();
385   application.SendNotification();
386
387   Material baseMat = actor.GetMaterial();
388   Material customMaterial = Material::New("CustomMaterial");
389   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
390
391   MeshActor::SetMaterial(actor, "NoName", customMaterial);
392   application.SendNotification();
393   application.Render();
394   application.Render();
395   application.SendNotification();
396
397   DALI_TEST_CHECK( actor.GetMaterial() == baseMat );
398   DALI_TEST_CHECK( actor.GetMaterial() != customMaterial );
399   END_TEST;
400 }
401
402
403 int UtcDaliMeshActorSetMaterial03(void)
404 {
405   TestApplication application;
406   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
407
408   Mesh mesh = NewMesh();
409
410   MeshActor actor = MeshActor::New(mesh);
411   std::string name = "AMeshActor";
412   actor.SetName(name);
413   Stage::GetCurrent().Add(actor);
414
415   Material customMaterial = Material::New("CustomMaterial");
416   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
417
418   actor.SetMaterial(customMaterial);
419   application.SendNotification();
420   application.Render(0);
421   application.Render(16);
422   application.SendNotification();
423
424   DALI_TEST_CHECK(actor.GetMaterial() == customMaterial );
425   END_TEST;
426 }
427
428 int UtcDaliMeshActorSetMaterial03b(void)
429 {
430   TestApplication application;
431   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
432
433   Mesh mesh = NewMesh();
434
435   MeshActor actor = MeshActor::New(mesh);
436   std::string name = "AMeshActor";
437   actor.SetName(name);
438   Stage::GetCurrent().Add(actor);
439
440   Material customMaterial = Material::New("CustomMaterial");
441   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
442
443   actor.SetMaterial(customMaterial);
444   application.SendNotification();
445   application.Render(0);
446   application.Render(16);
447   application.SendNotification();
448   DALI_TEST_CHECK(actor.GetMaterial() == customMaterial );
449   END_TEST;
450 }
451
452
453
454 int UtcDaliMeshActorGetMaterial01(void)
455 {
456   TestApplication application;
457   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
458
459   MeshData meshData;
460   MeshData::VertexContainer vertices;
461   MeshData::FaceIndices faces;
462   BoneContainer bones;
463   ConstructVertices(vertices, 60);
464   ConstructFaces(vertices, faces);
465   Material material = ConstructMaterial();
466   meshData.SetData(vertices, faces, bones, material);
467   Mesh mesh = Mesh::New(meshData);
468
469   MeshActor actor = MeshActor::New(mesh);
470   std::string name = "AMeshActor";
471   actor.SetName(name);
472   application.SendNotification();
473   application.Render();
474   application.Render();
475   application.SendNotification();
476
477   Material gotMaterial = actor.GetMaterial();
478
479   DALI_TEST_EQUALS( material.GetOpacity(), gotMaterial.GetOpacity(), TEST_LOCATION );
480   DALI_TEST_EQUALS( material.GetAmbientColor(), gotMaterial.GetAmbientColor(), TEST_LOCATION );
481   DALI_TEST_EQUALS( material.GetDiffuseColor(), gotMaterial.GetDiffuseColor(), TEST_LOCATION );
482   DALI_TEST_EQUALS( material.GetSpecularColor(), gotMaterial.GetSpecularColor(), TEST_LOCATION );
483   END_TEST;
484 }
485
486
487 int UtcDaliMeshActorGetMaterial02(void)
488 {
489   TestApplication application;
490   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
491
492   MeshData meshData;
493   MeshData::VertexContainer vertices;
494   MeshData::FaceIndices faces;
495   BoneContainer bones;
496   ConstructVertices(vertices, 60);
497   ConstructFaces(vertices, faces);
498   Material material = ConstructMaterial();
499   meshData.SetData(vertices, faces, bones, material);
500   Mesh mesh = Mesh::New(meshData);
501
502   MeshActor actor = MeshActor::New(mesh);
503   std::string name = "AMeshActor";
504   actor.SetName(name);
505   application.SendNotification();
506   application.Render();
507   application.Render();
508   application.SendNotification();
509
510   Material gotMaterial = actor.GetMaterial();
511
512   DALI_TEST_EQUALS( material.GetOpacity(), gotMaterial.GetOpacity(), TEST_LOCATION );
513   DALI_TEST_EQUALS( material.GetAmbientColor(), gotMaterial.GetAmbientColor(), TEST_LOCATION );
514   DALI_TEST_EQUALS( material.GetDiffuseColor(), gotMaterial.GetDiffuseColor(), TEST_LOCATION );
515   DALI_TEST_EQUALS( material.GetSpecularColor(), gotMaterial.GetSpecularColor(), TEST_LOCATION );
516   END_TEST;
517 }
518
519
520 namespace
521 {
522
523 Material ConstructMaterial(float opacity, float diffuseOpacity)
524 {
525   Material customMaterial = Material::New("CustomMaterial");
526   customMaterial.SetOpacity(opacity);
527   customMaterial.SetDiffuseColor(Vector4(0.8f, 0.0f, 0.4f, diffuseOpacity));
528   customMaterial.SetAmbientColor(Vector4(0.2f, 1.0f, 0.6f, 1.0f));
529   customMaterial.SetSpecularColor(Vector4(0.5f, 0.6f, 0.7f, 1.0f));
530   return customMaterial;
531 }
532
533 static void TestBlending( TestApplication& application, Material material, float actorOpacity, BlendingMode::Type blendingMode, bool expectedBlend )
534 {
535   MeshData meshData;
536   MeshData::VertexContainer vertices;
537   MeshData::FaceIndices faces;
538   BoneContainer bones;
539   ConstructVertices(vertices, 60);
540   ConstructFaces(vertices, faces);
541   meshData.SetData(vertices, faces, bones, material);
542   Mesh mesh = Mesh::New(meshData);
543
544   application.SendNotification();
545   application.Render(0);
546   application.Render();
547   application.SendNotification();
548
549   MeshActor actor = MeshActor::New(mesh);
550   Stage::GetCurrent().Add(actor);
551
552   actor.SetBlendMode(blendingMode);
553   actor.SetOpacity(actorOpacity);
554
555   TraceCallStack& cullFaceTrace = application.GetGlAbstraction().GetCullFaceTrace();
556   cullFaceTrace.Enable(true);
557   application.SendNotification();
558   application.Render();
559   DALI_TEST_EQUALS( BlendEnabled( cullFaceTrace ), expectedBlend, TEST_LOCATION );
560 }
561 } //anonymous namespace
562
563
564 int UtcDaliMeshActorBlend01(void)
565 {
566   // Set Material with translucent color, actor color opaque, Set Use image alpha to true
567   // Expect blending
568
569   TestApplication application;
570   tet_infoline("Testing Dali::MeshActor::Blend01()");
571
572   TestBlending( application, ConstructMaterial(0.5f, 0.5f), 1.0f, BlendingMode::AUTO, true );
573   END_TEST;
574 }
575
576
577 int UtcDaliMeshActorBlend02(void)
578 {
579   // Set material to translucent, set use image alpha to false, set actor opacity to 1.0f
580   // Expect no blending
581
582   TestApplication application;
583   tet_infoline("Testing Dali::MeshActor::Blend02()");
584   TestBlending( application, ConstructMaterial(0.5f, 0.5f), 1.0f, BlendingMode::OFF, false );
585   END_TEST;
586 }
587
588 int UtcDaliMeshActorBlend03(void)
589 {
590   // Set material to opaque, set use image alpha to true, set actor opacity to 1.0f
591   // Expect no blending
592
593   TestApplication application;
594   tet_infoline("Testing Dali::MeshActor::Blend03()");
595   TestBlending( application, ConstructMaterial(1.0f, 1.0f), 1.0f, BlendingMode::AUTO, false );
596   END_TEST;
597 }
598
599
600 int UtcDaliMeshActorBlend04(void)
601 {
602   // Set material to have image with alpha, set use image alpha to true, set actor opacity to 1.0f
603   // Expect blending
604   TestApplication application;
605   tet_infoline("Testing Dali::MeshActor::Blend04()");
606
607   Material material = ConstructMaterial(1.0f, 1.0f);
608   BufferImage image = BufferImage::New( 100, 50, Pixel::RGBA8888 );
609   material.SetDiffuseTexture( image );
610   application.SendNotification();
611   application.Render(0);
612
613   TestBlending( application, material, 1.0f, BlendingMode::AUTO, true );
614   END_TEST;
615 }
616
617 int UtcDaliMeshActorBlend05(void)
618 {
619   // Set material to have image with alpha, set use image alpha to false, set actor opacity to 1.0f
620   // Expect no blending
621
622   TestApplication application;
623   tet_infoline("Testing Dali::MeshActor::Blend05()");
624
625   Material material = ConstructMaterial(1.0f, 1.0f);
626   BufferImage image = BufferImage::New( 100, 50, Pixel::RGBA8888 );
627   material.SetDiffuseTexture( image );
628   application.SendNotification();
629   application.Render(0);
630
631   TestBlending( application, material, 1.0f, BlendingMode::ON, true );
632   END_TEST;
633 }
634
635
636 int UtcDaliMeshActorBlend06(void)
637 {
638   // Set material to have image without alpha, set use image alpha to true, set actor opacity to 1.0f
639   // Expect no blending
640
641   TestApplication application;
642   tet_infoline("Testing Dali::MeshActor::Blend()");
643
644   Material material = ConstructMaterial(1.0f, 1.0f);
645   BufferImage image = BufferImage::New( 100, 50, Pixel::RGB888 );
646   material.SetDiffuseTexture( image );
647   application.SendNotification();
648   application.Render(0);
649
650   TestBlending( application, material, 1.0f, BlendingMode::AUTO, false );
651   END_TEST;
652 }
653
654 int UtcDaliMeshActorBlend07(void)
655 {
656   // Set material to have framebuffer with alpha, set use image alpha to true, set actor opacity to 1.0f
657   // Expect blending
658   TestApplication application;
659   tet_infoline("Testing Dali::MeshActor::Blend07()");
660   application.Render(0);
661
662   Material material = ConstructMaterial(1.0f, 1.0f);
663   FrameBufferImage image = FrameBufferImage::New( 100, 50, Pixel::RGBA8888 );
664   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
665   RenderTask task = taskList.GetTask( 0u );
666   task.SetTargetFrameBuffer( image ); // To ensure frame buffer is connected
667   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
668   application.SendNotification();
669   application.Render();
670
671   material.SetDiffuseTexture( image ); // (to render from)
672   application.SendNotification();
673   application.Render();
674   application.Render();
675   application.SendNotification();
676
677   TestBlending( application, material, 1.0f, BlendingMode::AUTO, true );
678   END_TEST;
679 }
680
681 int UtcDaliMeshActorBlend08(void)
682 {
683   // Set material to have image with alpha, set use image alpha to false, set actor opacity to 0.5f
684   // Expect blending
685   TestApplication application;
686   tet_infoline("Testing Dali::MeshActor::Blend08()");
687
688   Material material = ConstructMaterial(1.0f, 1.0f);
689   BufferImage image = BufferImage::New( 100, 50, Pixel::RGBA8888 );
690   material.SetDiffuseTexture( image );
691   application.SendNotification();
692   application.Render(0);
693
694   TestBlending( application, material, 0.5f, BlendingMode::AUTO, true );
695   END_TEST;
696 }
697
698 int UtcDaliMeshActorBlend09(void)
699 {
700   // Set material to have image with no alpha, set material opacity to 0.5, set use image alpha to true, set actor opacity to 1.0f
701   // Expect blending
702   TestApplication application;
703   tet_infoline("Testing Dali::MeshActor::Blend08()");
704
705   Material material = ConstructMaterial(0.5f, 1.0f);
706   BufferImage image = BufferImage::New( 100, 50, Pixel::RGB888 );
707   material.SetDiffuseTexture( image );
708   application.SendNotification();
709   application.Render(0);
710
711   TestBlending( application, material, 1.0f, BlendingMode::AUTO, true );
712   END_TEST;
713 }
714
715 // Test that bones update the mesh's bone transform uniforms
716 // (Removed old test - wasn't checking the above information, but instead the property
717 // info, which is tested elsewhere)
718
719 int UtcDaliMeshActorIndices(void)
720 {
721   TestApplication application;
722   Actor basicActor = Actor::New();
723   Mesh mesh = NewMesh();
724   MeshActor meshActor = MeshActor::New(mesh);
725
726   Property::IndexContainer indices;
727   meshActor.GetPropertyIndices( indices );
728   DALI_TEST_CHECK( indices.size() == basicActor.GetPropertyCount() ); // Mesh Actor does not have any properties
729   DALI_TEST_EQUALS( indices.size(), meshActor.GetPropertyCount(), TEST_LOCATION );
730   END_TEST;
731 }
732
733 int UtcDaliAnimatableMeshActorIndices(void)
734 {
735   TestApplication application;
736   Actor basicActor = Actor::New();
737   AnimatableMesh mesh = NewAnimatableMesh();
738   MeshActor meshActor = MeshActor::New(mesh);
739
740   Property::IndexContainer indices;
741   meshActor.GetPropertyIndices( indices );
742   DALI_TEST_CHECK( indices.size() == basicActor.GetPropertyCount() ); // Mesh Actor does not have any properties
743   DALI_TEST_EQUALS( indices.size(), meshActor.GetPropertyCount(), TEST_LOCATION );
744   END_TEST;
745 }