std::string GetStencilTestString(void)
{
std::stringstream stream;
- stream << GL_STENCIL_TEST;
+ stream << std::hex << GL_STENCIL_TEST;
return stream.str();
}
std::string GetDepthTestString(void)
{
std::stringstream stream;
- stream << GL_DEPTH_TEST;
+ stream << std::hex << GL_DEPTH_TEST;
return stream.str();
}
DALI_TEST_EQUALS(cullFaceStack.CountMethod("CullFace"), 1, TEST_LOCATION);
std::ostringstream cullModeString;
- cullModeString << GL_FRONT_AND_BACK;
+ cullModeString << std::hex << GL_FRONT_AND_BACK;
DALI_TEST_CHECK(cullFaceStack.FindMethodAndParams("CullFace", cullModeString.str()));
cullFace = renderer.GetProperty<int>(Renderer::Property::FACE_CULLING_MODE);
DALI_TEST_EQUALS(cullFaceStack.CountMethod("CullFace"), 1, TEST_LOCATION);
std::ostringstream cullModeString;
- cullModeString << GL_BACK;
+ cullModeString << std::hex << GL_BACK;
DALI_TEST_CHECK(cullFaceStack.FindMethodAndParams("CullFace", cullModeString.str()));
cullFace = renderer.GetProperty<int>(Renderer::Property::FACE_CULLING_MODE);
DALI_TEST_EQUALS(cullFaceStack.CountMethod("CullFace"), 1, TEST_LOCATION);
std::ostringstream cullModeString;
- cullModeString << GL_FRONT;
+ cullModeString << std::hex << GL_FRONT;
DALI_TEST_CHECK(cullFaceStack.FindMethodAndParams("CullFace", cullModeString.str()));
cullFace = renderer.GetProperty<int>(Renderer::Property::FACE_CULLING_MODE);
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
DALI_TEST_CHECK(!glEnableStack.FindMethod("Enable"));
DALI_TEST_CHECK(!glAbstraction.GetDrawTrace().FindMethod("DrawElements"));
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", params));
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Disable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", params));
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Disable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", "GL_BLEND"));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", params));
END_TEST;
}
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(glEnableStack.FindMethodAndParams("Enable", params));
}
END_TEST;
application.SendNotification();
application.Render();
- TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
- std::ostringstream blendStr;
- blendStr << GL_BLEND;
- DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", blendStr.str().c_str()));
+ TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack::NamedParams params;
+ params["cap"] << std::hex << GL_BLEND;
+ DALI_TEST_CHECK(!glEnableStack.FindMethodAndParams("Enable", params));
}
END_TEST;
scene.GetRootLayer().SetProperty(Layer::Property::BEHAVIOR, Layer::LAYER_3D);
scene.Add(actor);
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
- glAbstraction.EnableEnableDisableCallTrace(true);
- glAbstraction.EnableDepthFunctionCallTrace(true);
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack& glDepthFunctionStack = glAbstraction.GetDepthFunctionTrace();
- TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
- TraceCallStack& glDepthFunctionStack = glAbstraction.GetDepthFunctionTrace();
+ glEnableDisableStack.Enable(true);
+ glDepthFunctionStack.Enable(true);
+ glEnableDisableStack.EnableLogging(true);
+ glDepthFunctionStack.EnableLogging(true);
std::ostringstream depthTestStr;
- depthTestStr << GL_DEPTH_TEST;
+ depthTestStr << std::hex << GL_DEPTH_TEST;
//GL_NEVER
{
DALI_TEST_CHECK(glEnableDisableStack.FindMethodAndParams("Enable", depthTestStr.str().c_str()));
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_NEVER;
+ depthFunctionStr << std::hex << GL_NEVER;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
application.Render();
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_ALWAYS;
+ depthFunctionStr << std::hex << GL_ALWAYS;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
application.Render();
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_LESS;
+ depthFunctionStr << std::hex << GL_LESS;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
application.Render();
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_GREATER;
+ depthFunctionStr << std::hex << GL_GREATER;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
application.Render();
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_EQUAL;
+ depthFunctionStr << std::hex << GL_EQUAL;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
application.Render();
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_NOTEQUAL;
+ depthFunctionStr << std::hex << GL_NOTEQUAL;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
application.Render();
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_LEQUAL;
+ depthFunctionStr << std::hex << GL_LEQUAL;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
application.Render();
std::ostringstream depthFunctionStr;
- depthFunctionStr << GL_GEQUAL;
+ depthFunctionStr << std::hex << GL_GEQUAL;
DALI_TEST_CHECK(glDepthFunctionStack.FindMethodAndParams("DepthFunc", depthFunctionStr.str().c_str()));
}
TestApplication application;
tet_infoline("Test setting the DepthTestMode");
- Renderer renderer = RendererTestFixture(application);
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
- glAbstraction.EnableEnableDisableCallTrace(true);
- TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ Renderer renderer = RendererTestFixture(application);
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ glEnableDisableStack.Enable(true);
+ glEnableDisableStack.EnableLogging(true);
glEnableDisableStack.Reset();
application.SendNotification();
TestApplication application;
tet_infoline("Test the stencil defaults");
- Renderer renderer = RendererTestFixture(application);
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
- glAbstraction.EnableEnableDisableCallTrace(true);
- glAbstraction.EnableStencilFunctionCallTrace(true);
- TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
- TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ Renderer renderer = RendererTestFixture(application);
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ glEnableDisableStack.Enable(true);
+ glEnableDisableStack.EnableLogging(true);
+ glStencilFunctionStack.Enable(true);
+ glStencilFunctionStack.EnableLogging(true);
ResetDebugAndFlush(application, glEnableDisableStack, glStencilFunctionStack);
TestApplication application;
tet_infoline("Test setting the RenderMode to use the stencil buffer");
- Renderer renderer = RendererTestFixture(application);
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
- glAbstraction.EnableEnableDisableCallTrace(true);
- glAbstraction.EnableStencilFunctionCallTrace(true);
- TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
- TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ Renderer renderer = RendererTestFixture(application);
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ glEnableDisableStack.Enable(true);
+ glEnableDisableStack.EnableLogging(true);
+ glStencilFunctionStack.Enable(true);
+ glStencilFunctionStack.EnableLogging(true);
// 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.
TestApplication application;
tet_infoline("Test setting the StencilFunction");
- Renderer renderer = RendererTestFixture(application);
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
- glAbstraction.EnableEnableDisableCallTrace(true);
- glAbstraction.EnableStencilFunctionCallTrace(true);
- TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
- TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ Renderer renderer = RendererTestFixture(application);
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ glEnableDisableStack.Enable(true);
+ glEnableDisableStack.EnableLogging(true);
+ glStencilFunctionStack.Enable(true);
+ glStencilFunctionStack.EnableLogging(true);
// RenderMode must use the stencil for StencilFunction to operate.
renderer.SetProperty(Renderer::Property::RENDER_MODE, RenderMode::STENCIL);
TestApplication application;
tet_infoline("Test setting the StencilOperation");
- Renderer renderer = RendererTestFixture(application);
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
- glAbstraction.EnableEnableDisableCallTrace(true);
- glAbstraction.EnableStencilFunctionCallTrace(true);
- TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
- TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ Renderer renderer = RendererTestFixture(application);
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ glEnableDisableStack.Enable(true);
+ glEnableDisableStack.EnableLogging(true);
+ glStencilFunctionStack.Enable(true);
+ glStencilFunctionStack.EnableLogging(true);
// RenderMode must use the stencil for StencilOperation to operate.
renderer.SetProperty(Renderer::Property::RENDER_MODE, RenderMode::STENCIL);
TestApplication application;
tet_infoline("Test setting the StencilMask");
- Renderer renderer = RendererTestFixture(application);
- TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
- glAbstraction.EnableEnableDisableCallTrace(true);
- glAbstraction.EnableStencilFunctionCallTrace(true);
- TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
- TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ Renderer renderer = RendererTestFixture(application);
+ TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+ TraceCallStack& glEnableDisableStack = glAbstraction.GetEnableDisableTrace();
+ TraceCallStack& glStencilFunctionStack = glAbstraction.GetStencilFunctionTrace();
+ glEnableDisableStack.Enable(true);
+ glEnableDisableStack.EnableLogging(true);
+ glStencilFunctionStack.Enable(true);
+ glStencilFunctionStack.EnableLogging(true);
// RenderMode must use the stencil for StencilMask to operate.
renderer.SetProperty(Renderer::Property::RENDER_MODE, RenderMode::STENCIL);
TraceCallStack& drawTrace = gl.GetDrawTrace();
drawTrace.Reset();
drawTrace.Enable(true);
+ drawTrace.EnableLogging(true);
application.SendNotification();
application.Render(0);