const BlendFactor::Type DEFAULT_BLEND_FACTOR_SRC_ALPHA( BlendFactor::ONE );
const BlendFactor::Type DEFAULT_BLEND_FACTOR_DEST_ALPHA( BlendFactor::ONE_MINUS_SRC_ALPHA );
-const BlendEquation::Type DEFAULT_BLEND_EQUATION_RGB( BlendEquation::ADD );
-const BlendEquation::Type DEFAULT_BLEND_EQUATION_ALPHA( BlendEquation::ADD );
+const BlendEquation::Type DEFAULT_BLEND_EQUATION_RGB( BlendEquation::ADD );
+const BlendEquation::Type DEFAULT_BLEND_EQUATION_ALPHA( BlendEquation::ADD );
/**
* @brief Get GL stencil test enumeration value as a string.
return stream.str();
}
+/**
+ * @brief Get GL depth test enumeration value as a string.
+ * @return The string representation of the value of GL_DEPTH_TEST
+ */
+std::string GetDepthTestString(void)
+{
+ std::stringstream stream;
+ stream << GL_DEPTH_TEST;
+ return stream.str();
+}
+
void ResetDebugAndFlush( TestApplication& application, TraceCallStack& glEnableDisableStack, TraceCallStack& glStencilFunctionStack )
{
glEnableDisableStack.Reset();
tet_infoline("Test setting the blend mode to auto with an opaque color and an image without an alpha channel and a shader with the hint OUTPUT_IS_TRANSPARENT renders with blending enabled");
Geometry geometry = CreateQuadGeometry();
- Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_TRANSPARENT );
+ Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::Hint::OUTPUT_IS_TRANSPARENT );
Renderer renderer = Renderer::New( geometry, shader );
END_TEST;
}
-
-
int UtcDaliRendererAnimatedProperty01(void)
{
TestApplication application;
END_TEST;
}
-
int UtcDaliRendererRenderOrder2DLayer(void)
{
TestApplication application;
// create geometry
Geometry geometry = Geometry::New();
- geometry.SetGeometryType( Geometry::LINE_LOOP );
+ geometry.SetType( Geometry::LINE_LOOP );
// --------------------------------------------------------------------------
// index buffer
// LINE_STRIP, first 15, count 6
{
renderer.SetIndexRange( 15, 6 );
- geometry.SetGeometryType( Geometry::LINE_STRIP );
+ geometry.SetType( Geometry::LINE_STRIP );
sprintf( buffer, "%u, 6, %u, indices", GL_LINE_STRIP, GL_UNSIGNED_SHORT );
application.SendNotification();
application.Render();
// Index out of bounds
{
renderer.SetIndexRange( 15, 30 );
- geometry.SetGeometryType( Geometry::LINE_STRIP );
+ geometry.SetType( Geometry::LINE_STRIP );
sprintf( buffer, "%u, 6, %u, indices", GL_LINE_STRIP, GL_UNSIGNED_SHORT );
application.SendNotification();
application.Render();
// drawing whole buffer starting from 15 ( last valid primitive )
{
renderer.SetIndexRange( 15, 0 );
- geometry.SetGeometryType( Geometry::LINE_STRIP );
+ geometry.SetType( Geometry::LINE_STRIP );
sprintf( buffer, "%u, 6, %u, indices", GL_LINE_STRIP, GL_UNSIGNED_SHORT );
application.SendNotification();
application.Render();
END_TEST;
}
-Renderer StencilTestFixture( TestApplication& application )
+/**
+ * @brief This templatized function checks an enumeration property is setting and getting correctly.
+ * The checks performed are as follows:
+ * - Check the initial/default value.
+ * - Set a different value via enum.
+ * - Check it was set.
+ * - Set a different value via string.
+ * - Check it was set.
+ */
+template< typename T >
+void CheckEnumerationProperty( Renderer& renderer, Property::Index propertyIndex, T initialValue, T firstCheckEnumeration, T secondCheckEnumeration, std::string secondCheckString )
+{
+ DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( initialValue ) );
+ renderer.SetProperty( propertyIndex, firstCheckEnumeration );
+ DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( firstCheckEnumeration ) );
+ renderer.SetProperty( propertyIndex, secondCheckString );
+ DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( secondCheckEnumeration ) );
+}
+
+int UtcDaliRendererEnumProperties(void)
+{
+ TestApplication application;
+ tet_infoline( "Test Renderer enumeration properties can be set with both integer and string values" );
+
+ Geometry geometry = CreateQuadGeometry();
+ Shader shader = CreateShader();
+ Renderer renderer = Renderer::New( geometry, shader );
+
+ /*
+ * Here we use a templatized function to perform several checks on each enumeration property.
+ * @see CheckEnumerationProperty for details of the checks performed.
+ */
+
+ CheckEnumerationProperty< FaceCullingMode::Type >( renderer, Renderer::Property::FACE_CULLING_MODE, FaceCullingMode::NONE, FaceCullingMode::FRONT, FaceCullingMode::BACK, "BACK" );
+ CheckEnumerationProperty< BlendMode::Type >( renderer, Renderer::Property::BLEND_MODE, BlendMode::AUTO, BlendMode::OFF, BlendMode::ON, "ON" );
+ CheckEnumerationProperty< BlendEquation::Type >( renderer, Renderer::Property::BLEND_EQUATION_RGB, BlendEquation::ADD, BlendEquation::SUBTRACT, BlendEquation::REVERSE_SUBTRACT, "REVERSE_SUBTRACT" );
+ CheckEnumerationProperty< BlendEquation::Type >( renderer, Renderer::Property::BLEND_EQUATION_ALPHA, BlendEquation::ADD, BlendEquation::SUBTRACT, BlendEquation::REVERSE_SUBTRACT, "REVERSE_SUBTRACT" );
+ CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_SRC_RGB, BlendFactor::SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+ CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_DEST_RGB, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+ CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_SRC_ALPHA, BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+ CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_DEST_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+ CheckEnumerationProperty< DepthWriteMode::Type >( renderer, Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::AUTO, DepthWriteMode::OFF, DepthWriteMode::ON, "ON" );
+ CheckEnumerationProperty< DepthFunction::Type >( renderer, Renderer::Property::DEPTH_FUNCTION, DepthFunction::LESS, DepthFunction::ALWAYS, DepthFunction::GREATER, "GREATER" );
+ CheckEnumerationProperty< DepthTestMode::Type >( renderer, Renderer::Property::DEPTH_TEST_MODE, DepthTestMode::AUTO, DepthTestMode::OFF, DepthTestMode::ON, "ON" );
+ CheckEnumerationProperty< StencilFunction::Type >( renderer, Renderer::Property::STENCIL_FUNCTION, StencilFunction::ALWAYS, StencilFunction::LESS, StencilFunction::EQUAL, "EQUAL" );
+ CheckEnumerationProperty< RenderMode::Type >( renderer, Renderer::Property::RENDER_MODE, RenderMode::AUTO, RenderMode::NONE, RenderMode::STENCIL, "STENCIL" );
+ CheckEnumerationProperty< StencilOperation::Type >( renderer, Renderer::Property::STENCIL_OPERATION_ON_FAIL, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
+ CheckEnumerationProperty< StencilOperation::Type >( renderer, Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
+ CheckEnumerationProperty< StencilOperation::Type >( renderer, Renderer::Property::STENCIL_OPERATION_ON_Z_PASS, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
+
+ END_TEST;
+}
+
+Renderer RendererTestFixture( TestApplication& application )
{
Geometry geometry = CreateQuadGeometry();
Shader shader = CreateShader();
return renderer;
}
+int UtcDaliRendererSetDepthTestMode(void)
+{
+ TestApplication application;
+ tet_infoline("Test setting the DepthTestMode");
+
+ Renderer renderer = RendererTestFixture( application );
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ glAbstraction.EnableEnableDisableCallTrace( true );
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+
+ glEnableDisableStack.Reset();
+ application.SendNotification();
+ application.Render();
+
+ // Check depth-test is enabled by default.
+ DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetDepthTestString() ) );
+ DALI_TEST_CHECK( !glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
+
+ // Turn off depth-testing. We want to check if the depth buffer has been disabled, so we need to turn off depth-write as well for this case.
+ renderer.SetProperty( Renderer::Property::DEPTH_TEST_MODE, DepthTestMode::OFF );
+ renderer.SetProperty( Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::OFF );
+
+ glEnableDisableStack.Reset();
+ application.SendNotification();
+ application.Render();
+
+ // Check the depth buffer was disabled.
+ DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
+
+ // Turn on automatic mode depth-testing.
+ // Layer behavior is currently set to LAYER_3D so AUTO should enable depth-testing.
+ renderer.SetProperty( Renderer::Property::DEPTH_TEST_MODE, DepthTestMode::AUTO );
+
+ glEnableDisableStack.Reset();
+ application.SendNotification();
+ application.Render();
+
+ // Check depth-test is now enabled.
+ DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetDepthTestString() ) );
+ DALI_TEST_CHECK( !glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
+
+ // Change the layer behavior to LAYER_2D.
+ // Note this will also disable depth testing for the layer by default, we test this first.
+ Stage::GetCurrent().GetRootLayer().SetBehavior( Layer::LAYER_2D );
+
+ glEnableDisableStack.Reset();
+ application.SendNotification();
+ application.Render();
+
+ // Check depth-test is disabled.
+ DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
+
+ // Turn the layer depth-test flag back on, and confirm that depth testing is now on.
+ Stage::GetCurrent().GetRootLayer().SetDepthTestDisabled( false );
+
+ glEnableDisableStack.Reset();
+ application.SendNotification();
+ application.Render();
+
+ // Check depth-test is *still* disabled.
+ DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetDepthTestString() ) );
+
+ END_TEST;
+}
+
+int UtcDaliRendererSetDepthWriteMode(void)
+{
+ TestApplication application;
+ tet_infoline("Test setting the DepthWriteMode");
+
+ Renderer renderer = RendererTestFixture( application );
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+
+ application.SendNotification();
+ application.Render();
+
+ // Check the default depth-write status first.
+ DALI_TEST_CHECK( glAbstraction.GetLastDepthMask() );
+
+ // Turn off depth-writing.
+ renderer.SetProperty( Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::OFF );
+
+ application.SendNotification();
+ application.Render();
+
+ // Check depth-write is now disabled.
+ DALI_TEST_CHECK( !glAbstraction.GetLastDepthMask() );
+
+ // Test the AUTO mode for depth-writing.
+ // As our renderer is opaque, depth-testing should be enabled.
+ renderer.SetProperty( Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::AUTO );
+
+ application.SendNotification();
+ application.Render();
+
+ // Check depth-write is now enabled.
+ DALI_TEST_CHECK( glAbstraction.GetLastDepthMask() );
+
+ // Now make the renderer be treated as translucent by enabling blending.
+ // The AUTO depth-write mode should turn depth-write off in this scenario.
+ renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
+
+ application.SendNotification();
+ application.Render();
+
+ // Check depth-write is now disabled.
+ DALI_TEST_CHECK( !glAbstraction.GetLastDepthMask() );
+
+ END_TEST;
+}
+
int UtcDaliRendererCheckStencilDefaults(void)
{
TestApplication application;
tet_infoline("Test the stencil defaults");
- Renderer renderer = StencilTestFixture( application );
+ Renderer renderer = RendererTestFixture( application );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
glAbstraction.EnableEnableDisableCallTrace( true );
glAbstraction.EnableStencilFunctionCallTrace( true );
END_TEST;
}
-int UtcDaliRendererSetStencilMode(void)
+int UtcDaliRendererSetRenderModeToUseStencilBuffer(void)
{
TestApplication application;
- tet_infoline("Test setting the StencilMode");
+ tet_infoline("Test setting the RenderMode to use the stencil buffer");
- Renderer renderer = StencilTestFixture( application );
+ Renderer renderer = RendererTestFixture( application );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
glAbstraction.EnableEnableDisableCallTrace( true );
glAbstraction.EnableStencilFunctionCallTrace( true );
TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ // Set the StencilFunction to something other than the default, to confirm it is set as a property,
+ // but NO GL call has been made while the RenderMode is set to not use the stencil buffer.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::NONE );
ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
- // Set the StencilFunction to something other than the default, to confirm it is set as a property,
- // but NO GL call has been made while the StencilMode is set to OFF.
renderer.SetProperty( Renderer::Property::STENCIL_FUNCTION, StencilFunction::NEVER );
DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetProperty( Renderer::Property::STENCIL_FUNCTION ).Get<int>() ), static_cast<int>( StencilFunction::NEVER ), TEST_LOCATION );
- ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
+ ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
std::string methodString( "StencilFunc" );
DALI_TEST_CHECK( !glStencilFunctionStack.FindMethod( methodString ) );
- // Now set the StencilMode to ON and check the StencilFunction has changed.
- renderer.SetProperty( Renderer::Property::STENCIL_MODE, StencilMode::ON );
+ // Test the other RenderModes that will not enable the stencil buffer.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::AUTO );
+ ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
+ DALI_TEST_CHECK( !glStencilFunctionStack.FindMethod( methodString ) );
+
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::COLOR );
+ ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
+ DALI_TEST_CHECK( !glStencilFunctionStack.FindMethod( methodString ) );
+
+ // Now set the RenderMode to modes that will use the stencil buffer, and check the StencilFunction has changed.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::STENCIL );
+ ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
+
+ DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetStencilTestString() ) );
+ DALI_TEST_CHECK( glStencilFunctionStack.FindMethod( methodString ) );
+
+ // Test the COLOR_STENCIL RenderMode as it also enables the stencil buffer.
+ // First set a mode to turn off the stencil buffer, so the enable is required.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::COLOR );
+ ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::COLOR_STENCIL );
ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetStencilTestString() ) );
END_TEST;
}
+// Helper function for the SetRenderModeToUseColorBuffer test.
+void CheckRenderModeColorMask( TestApplication& application, Renderer& renderer, RenderMode::Type renderMode, bool expectedValue )
+{
+ // Set the RenderMode property to a value that should not allow color buffer writes.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, renderMode );
+ application.SendNotification();
+ application.Render();
+
+ // Check if ColorMask has been called, and that the values are correct.
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ const TestGlAbstraction::ColorMaskParams& colorMaskParams( glAbstraction.GetColorMaskParams() );
+
+ DALI_TEST_EQUALS<bool>( colorMaskParams.red, expectedValue, TEST_LOCATION );
+ DALI_TEST_EQUALS<bool>( colorMaskParams.green, expectedValue, TEST_LOCATION );
+ DALI_TEST_EQUALS<bool>( colorMaskParams.blue, expectedValue, TEST_LOCATION );
+ DALI_TEST_EQUALS<bool>( colorMaskParams.alpha, expectedValue, TEST_LOCATION );
+}
+
+int UtcDaliRendererSetRenderModeToUseColorBuffer(void)
+{
+ TestApplication application;
+ tet_infoline("Test setting the RenderMode to use the color buffer");
+
+ Renderer renderer = RendererTestFixture( application );
+
+ // Set the RenderMode property to a value that should not allow color buffer writes.
+ // Then check if ColorMask has been called, and that the values are correct.
+ CheckRenderModeColorMask( application, renderer, RenderMode::AUTO, true );
+ CheckRenderModeColorMask( application, renderer, RenderMode::NONE, false );
+ CheckRenderModeColorMask( application, renderer, RenderMode::COLOR, true );
+ CheckRenderModeColorMask( application, renderer, RenderMode::STENCIL, false );
+ CheckRenderModeColorMask( application, renderer, RenderMode::COLOR_STENCIL, true );
+
+ END_TEST;
+}
+
int UtcDaliRendererSetStencilFunction(void)
{
TestApplication application;
tet_infoline("Test setting the StencilFunction");
- Renderer renderer = StencilTestFixture( application );
+ Renderer renderer = RendererTestFixture( application );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
glAbstraction.EnableEnableDisableCallTrace( true );
glAbstraction.EnableStencilFunctionCallTrace( true );
TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
- // StencilMode must be ON for StencilFunction to operate.
- renderer.SetProperty( Renderer::Property::STENCIL_MODE, StencilMode::ON );
+ // RenderMode must use the stencil for StencilFunction to operate.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::STENCIL );
ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
/*
TestApplication application;
tet_infoline("Test setting the StencilOperation");
- Renderer renderer = StencilTestFixture( application );
+ Renderer renderer = RendererTestFixture( application );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
glAbstraction.EnableEnableDisableCallTrace( true );
glAbstraction.EnableStencilFunctionCallTrace( true );
TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
- // StencilMode must be ON for StencilOperation to operate.
- renderer.SetProperty( Renderer::Property::STENCIL_MODE, StencilMode::ON );
+ // RenderMode must use the stencil for StencilOperation to operate.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::STENCIL );
/*
* Lookup table for testing StencilOperation.
TestApplication application;
tet_infoline("Test setting the StencilMask");
- Renderer renderer = StencilTestFixture( application );
+ Renderer renderer = RendererTestFixture( application );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
glAbstraction.EnableEnableDisableCallTrace( true );
glAbstraction.EnableStencilFunctionCallTrace( true );
TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
- // StencilMode must be ON for StencilMask to operate.
- renderer.SetProperty( Renderer::Property::STENCIL_MODE, StencilMode::ON );
+ // RenderMode must use the stencil for StencilMask to operate.
+ renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::STENCIL );
// Set the StencilMask property to a value.
renderer.SetProperty( Renderer::Property::STENCIL_MASK, 0x00 );
END_TEST;
}
-
-int UtcDaliRendererSetWriteToColorBuffer(void)
-{
- TestApplication application;
- tet_infoline("Test setting the WriteToColorBuffer flag");
-
- Renderer renderer = StencilTestFixture( application );
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-
- // Set the StencilMask property to a value.
- renderer.SetProperty( Renderer::Property::WRITE_TO_COLOR_BUFFER, false );
-
- // Check GetProperty returns the same value.
- DALI_TEST_CHECK( !renderer.GetProperty( Renderer::Property::WRITE_TO_COLOR_BUFFER ).Get<bool>() );
-
- application.SendNotification();
- application.Render();
-
- // Check if ColorMask has been called, and that the values are correct.
- const TestGlAbstraction::ColorMaskParams& colorMaskParams( glAbstraction.GetColorMaskParams() );
-
- DALI_TEST_EQUALS<bool>( colorMaskParams.red, false, TEST_LOCATION );
- DALI_TEST_EQUALS<bool>( colorMaskParams.green, false, TEST_LOCATION );
- DALI_TEST_EQUALS<bool>( colorMaskParams.blue, false, TEST_LOCATION );
- DALI_TEST_EQUALS<bool>( colorMaskParams.alpha, false, TEST_LOCATION );
-
- // Set the StencilMask property to true.
- renderer.SetProperty( Renderer::Property::WRITE_TO_COLOR_BUFFER, true );
-
- // Check GetProperty returns the same value.
- DALI_TEST_CHECK( renderer.GetProperty( Renderer::Property::WRITE_TO_COLOR_BUFFER ).Get<bool>() );
-
- application.SendNotification();
- application.Render();
-
- // Check if ColorMask has been called, and that the values are correct.
- const TestGlAbstraction::ColorMaskParams& colorMaskParamsChanged( glAbstraction.GetColorMaskParams() );
-
- DALI_TEST_EQUALS<bool>( colorMaskParamsChanged.red, true, TEST_LOCATION );
- DALI_TEST_EQUALS<bool>( colorMaskParamsChanged.green, true, TEST_LOCATION );
- DALI_TEST_EQUALS<bool>( colorMaskParamsChanged.blue, true, TEST_LOCATION );
- DALI_TEST_EQUALS<bool>( colorMaskParamsChanged.alpha, true, TEST_LOCATION );
-
- END_TEST;
-}