Fixed texture mesh example after changed uniform precedence. 93/48593/1
authorFerran Sole <ferran.sole@samsung.com>
Wed, 23 Sep 2015 09:35:57 +0000 (10:35 +0100)
committerFerran Sole <ferran.sole@samsung.com>
Wed, 23 Sep 2015 09:35:57 +0000 (10:35 +0100)
Now actor's properties have precedence over Renderers properties as uniforms

Change-Id: Ie893579e3d59bfa4bc4b1b99939b0bf236c2efdd

examples/textured-mesh/textured-mesh-example.cpp

index 3b65701..1597aca 100644 (file)
@@ -165,9 +165,7 @@ public:
     mMeshActor.AddRenderer( mRenderer );
     mMeshActor.SetSize(400, 400);
 
-    Property::Index fadeColorIndex = mMeshActor.RegisterProperty( "uFadeColor", Color::GREEN );
-
-    fadeColorIndex = mRenderer.RegisterProperty( "uFadeColor", Color::MAGENTA );
+    Property::Index fadeColorIndex = mRenderer.RegisterProperty( "uFadeColor", Color::MAGENTA );
     mRenderer.SetDepthIndex(0);
 
     mMeshActor.SetParentOrigin( ParentOrigin::TOP_CENTER );
@@ -181,11 +179,10 @@ public:
     mMeshActor2.SetSize(400, 400);
 
     mMeshActor2.RegisterProperty( "a-n-other-property", Color::GREEN );
-    Property::Index fadeColorIndex2 = mMeshActor2.RegisterProperty( "uFadeColor", Color::GREEN );
 
     mRenderer2.RegisterProperty( "a-n-other-property", Vector3::ZERO );
     mRenderer2.RegisterProperty( "a-coefficient", 0.008f );
-    fadeColorIndex2 = mRenderer2.RegisterProperty( "uFadeColor", Color::BLUE );
+    Property::Index fadeColorIndex2 = mRenderer2.RegisterProperty( "uFadeColor", Color::BLUE );
     mRenderer2.SetDepthIndex(0);
 
     mMeshActor2.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );