From: Francisco Santos Date: Wed, 12 Mar 2014 17:52:35 +0000 (+0000) Subject: Fixed shader test cases to match code changes. X-Git-Tag: dali-2014-wk16-release~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7b9baff133e230a9d7aa1f17f6fe58fa1d60a21;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Fixed shader test cases to match code changes. Change-Id: If2f1d15c7f7cdf56d555481b63f5dc0f0addce7b Signed-off-by: Francisco Santos --- diff --git a/automated-tests/dali-test-suite/shader-effects/utc-Dali-BendyEffect.cpp b/automated-tests/dali-test-suite/shader-effects/utc-Dali-BendyEffect.cpp index 7e94e93..7823b8f 100644 --- a/automated-tests/dali-test-suite/shader-effects/utc-Dali-BendyEffect.cpp +++ b/automated-tests/dali-test-suite/shader-effects/utc-Dali-BendyEffect.cpp @@ -130,14 +130,14 @@ static void UtcDaliBendyDefaultValuesEffect() application.SendNotification(); application.Render(); - Vector2 leftCorner( Stage::GetCurrent().GetSize() * 0.5f ); - leftCorner.x = -leftCorner.x; + Vector2 topLeft( Stage::GetCurrent().GetSize() * 0.5f ); + topLeft.y = -topLeft.y; - // Gets converted to opengl viewport coordinates + // Gets converted to opengl view space DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( effect.GetCenterPropertyName().c_str(), - leftCorner ) ); + topLeft ) ); DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( @@ -173,14 +173,17 @@ static void UtcDaliBendyCustomValuesEffect() application.SendNotification(); application.Render(); + Vector2 bottomRight( Stage::GetCurrent().GetSize() * 0.5f ); + bottomRight.x = -bottomRight.x; + // Gets converted to opengl viewport coordinates DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( effect.GetCenterPropertyName().c_str(), - Vector2(240.0f, -400.0f) ) ); + bottomRight ) ); direction.Normalize(); - direction.y *= -1.0f; + direction.x *= -1.0f; DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( effect.GetDirectionPropertyName().c_str(), diff --git a/automated-tests/dali-test-suite/shader-effects/utc-Dali-ShearEffect.cpp b/automated-tests/dali-test-suite/shader-effects/utc-Dali-ShearEffect.cpp index 9d5966f..8eddd88 100644 --- a/automated-tests/dali-test-suite/shader-effects/utc-Dali-ShearEffect.cpp +++ b/automated-tests/dali-test-suite/shader-effects/utc-Dali-ShearEffect.cpp @@ -128,9 +128,8 @@ static void UtcDaliShearEffectPropertyNames() Vector2 ToScreenPosition(Vector2 value) { Vector2 stageSize = Dali::Stage::GetCurrent().GetSize(); - value.x = value.x - stageSize.x * 0.5f; + value.x = stageSize.x * 0.5f - value.x; value.y = value.y - stageSize.y * 0.5f; - value.y *= -1.0f; return value; } diff --git a/automated-tests/dali-test-suite/shader-effects/utc-Dali-WaterEffect.cpp b/automated-tests/dali-test-suite/shader-effects/utc-Dali-WaterEffect.cpp index f0e731b..9f6314e 100644 --- a/automated-tests/dali-test-suite/shader-effects/utc-Dali-WaterEffect.cpp +++ b/automated-tests/dali-test-suite/shader-effects/utc-Dali-WaterEffect.cpp @@ -162,8 +162,8 @@ static void UtcDaliWaterEffectDefaultValues() application.SendNotification(); application.Render(); - Vector2 leftCorner( Stage::GetCurrent().GetSize() * 0.5f ); - leftCorner.x = -leftCorner.x; + Vector2 topLeft( Stage::GetCurrent().GetSize() * 0.5f ); + topLeft.y = -topLeft.y; for ( unsigned int i = 0; i < effect.GetNumberOfWaves(); ++i ) { @@ -174,7 +174,7 @@ static void UtcDaliWaterEffectDefaultValues() DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( effect.GetCenterPropertyName(i).c_str(), - leftCorner ) ); + topLeft ) ); DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( effect.GetPropagationPropertyName(i).c_str(), @@ -208,13 +208,13 @@ static void UtcDaliWaterEffectCustomValues() effect.GetAmplitudePropertyName(0).c_str(), 0.5f ) ); - Vector2 leftCorner( Stage::GetCurrent().GetSize() * 0.5f ); - leftCorner.x = -leftCorner.x; + Vector2 centerPoint( Stage::GetCurrent().GetSize() * 0.5f ); + centerPoint.y = -centerPoint.y; DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( effect.GetCenterPropertyName(0).c_str(), - Vector2( leftCorner.x + 10.0f, leftCorner.y - 10.0f ) ) ); + Vector2( centerPoint.x - 10.0f, centerPoint.y + 10.0f ) ) ); DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( effect.GetPropagationPropertyName(0).c_str(),